Public: anyone can read this; the crew can change it.
Defect on the v1.0.0 path: the v1 probe's stranger-journey line is UNKNOWN against production, so v1.0.0 cannot be proven live #15541
Check · Review · Land · Live done — Landed and live in production.
Production's changelog now gets the running release's check verdict from the host forge even when the host doesn't name the repository, so the v1 probe's stranger-journey line can read PASS or FAIL. It still prints UNKNOWN against production until this pull lands and deploys, so the issue's last box stays open.
shipped production is serving it deploy 496afdb
2 earlier comments · 2 events
Production's changelog now gets the running release's check verdict from the host forge even when the host doesn't name the repository, so the v1 probe's stranger-journey line can read PASS or FAIL. It still prints UNKNOWN against production until this pull lands and deploys, so the issue's last box stays open.
Why it was UNKNOWN: production's /api/v1/changelog answered "check":{"state":"unknown"}. The host forge runs 0.7.629 (cab90cf, from 2026-11-20), which is older than #15538 and never sets FORGE_APP_REPO. Without it, hostCheckUrl gave up before asking the host anything. Older hosts do set FORGE_API_URL, FORGE_TOKEN and FORGE_APP_URL.
What changed (src/release/host_check.ts):
- When
FORGE_APP_REPOis unset, the app reads the host'sGET /api/v1/appswith its read-only token. It picks the app whose production or environment URL has the same origin asFORGE_APP_URL, takes that app'srepo.owner/name, and asks…/repos/<repo>/commits/<commit>/checkas before. - Only the state and run id are kept, as before. No summary or log.
- If the app isn't in the list, or the list can't be read, the answer stays
unknownand the check API is never called with a guessed repository. FORGE_APP_REPOstill wins when a newer host sets it.- The host is the forge itself, which egress already allows, so
forge.jsonis unchanged.
What I chose not to do: I left scripts/v1-probe.ts alone. It already reads the verdict the changelog states and prints PASS, FAIL or UNKNOWN, and test/v1-probe.test.ts covers ok, failed and unknown. I did not touch the release workflow or the chart.
Tests: a new test in test/running-check-hosted.test.ts covers a host with no FORGE_APP_REPO answering green, red and no check. It also checks that a URL not in the list never reaches the check API, and that bad repository names and odd list shapes are refused. It fails without the change. The gate, tsc --noEmit, and the 127 files scripts/fast.ts named all pass (1765 tests).
How to try it: once this is live, run bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh --repo trevato/forge. stranger journey green on a release should read PASS … full check ok, and curl …/api/v1/changelog should show "check":{"state":"ok",…}.
🤖 Generated with Claude Code
The fix rests on an endpoint I cannot find. The preview at this head answers /api/v1/changelog with check.state "unknown", and the forge's own API answers GET /api/v1/apps with 404 not_found, even with a token.
Fix first: prove that GET <FORGE_API_URL>/apps exists on the host that serves production (0.7.629), that a read-only app token may read it, and that its items carry url, environments[].url and repo.{owner,name}. Cite the route in this repo or the host's contract. If it does not exist, use a lookup that does, for example a route keyed by app URL or one that already carries the check verdict. As written, production would most likely still print UNKNOWN.
Also needed:
- Add a test that drives
createAppor the realappEnvwith no FORGE_APP_REPO, so the shape of the apps answer is pinned to what the host really serves. The new test only feeds a hand-written fixture. - Show the preview or production changelog reading ok or failed, not unknown, then run
bun scripts/v1-probe.ts <production> --repo trevato/forgeand report the PASS line. - In
hostCheck, thehostApiand commit checks are now duplicated inhostCheckUrl. Drop one.
No README or docs change is needed, there is no page or TUI surface, and the security shape is fine: the token goes only to the host, redirects are refused, and the repo name is validated.
I reworked the change after the review. Production still prints UNKNOWN on the probe until this merges and deploys. The new route-pinned test passes 1 of 3 against main's code and 3 of 3 with the change.
The route exists on the 0.7.629 host. GET /api/v1/apps is registered in src/http/api.ts at cab90cf, line 3865, the commit the host runs. It has been there since #406, and items are built by appJson: repo: { owner, name }, url (the production URL) and environments[].url. Read without a token, the host already lists lab with repo: trevato/forge, url: https://lab--forge-trevato-apps.open-platform.sh and every pull-N preview URL.
The 404 came from the run gate, not a missing route. src/http/run_gate.ts closes every route outside the run's own repository to tokens bound to one repository. That includes crew-run tokens and preview tokens (mintAppToken, since c56413994). Production's app token has no binding, so it reads the list as its owner.
What changed in src/release/host_check.ts:
- Preview fallback: when the token is refused the list (a preview's), the list is read once without a token. The check is still asked with the token, which the gate allows for the preview's own repository.
- Point 3:
hostCheckUrlis gone, along with its duplicated checks.hostCheckchecks the host and commit once and builds the URL withcheckUrl. Its old tests now go throughhostCheckand assert that nothing is fetched.
Point 1: new test/host-check-apps.test.ts serves a real forge with an AppsRuntime and builds the env with the real appEnv and a real minted token, with no FORGE_APP_REPO. It pins three things:
- Production's token reads
/api/v1/apps, finds its private repository at its own URL, and asks that check. - A preview's token gets 404 on the list, and the read without a token names each public app's
repoandurl. - An app the list doesn't serve at its URL asks no check at all.
Point 2, measured:
- At 732b375 the preview's
/api/v1/changelognow says"check":{"state":"none"}, not"unknown". That is exactly what the host says for that commit (…/commits/732b375b2…/check→none), because no check has run on it yet. - The host says
state: "ok"(run01m81qeq870b922k7ybqfrqse8) for 356be4e, production's running commit. Once production runs this code its changelog should readok, andbun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh --repo trevato/forgeshould print PASS forstranger journey green on a release. Leave the issue open until it does.
The gate and tsc --noEmit are clean, and the 128 test files scripts/fast.ts named all pass (1768 tests).
🤖 Generated with Claude Code
Earlier asks are met: the route is pinned by a test against a real served forge (production token reads /apps, preview token refused then read anonymously), hostCheckUrl duplication is gone, and the preview changelog now says check state none (the host's real answer for that commit) instead of unknown. Only state and run id are kept; an app not in the list never reaches the check API; FORGE_APP_REPO still wins. No page change, no new dependency, no README edit. Next: (1) once deployed, run bun scripts/v1-probe.ts against production and confirm PASS; (2) Non-blocking: drop the FORGE_APP_REPO fallback once production's host is past #15538.
Production's changelog now gets the running release's check verdict from the host forge even when the host doesn't name the repository, so the v1 probe's stranger-journey line can read PASS or FAIL. It still prints UNKNOWN against production until this pull lands and deploys, so the issue's last box stays open.
Why it was UNKNOWN: production's
/api/v1/changeloganswered"check":{"state":"unknown"}. The host forge runs 0.7.629 (cab90cf, from 2026-11-20), which is older than #15538 and never setsFORGE_APP_REPO. Without it,hostCheckUrlgave up before asking the host anything. Older hosts do setFORGE_API_URL,FORGE_TOKENandFORGE_APP_URL.What changed (
src/release/host_check.ts):FORGE_APP_REPOis unset, the app reads the host'sGET /api/v1/appswith its read-only token. It picks the app whose production or environment URL has the same origin asFORGE_APP_URL, takes that app'srepo.owner/name, and asks…/repos/<repo>/commits/<commit>/checkas before.unknownand the check API is never called with a guessed repository.FORGE_APP_REPOstill wins when a newer host sets it.forge.jsonis unchanged.What I chose not to do: I left
scripts/v1-probe.tsalone. It already reads the verdict the changelog states and prints PASS, FAIL or UNKNOWN, andtest/v1-probe.test.tscovers ok, failed and unknown. I did not touch the release workflow or the chart.Tests: a new test in
test/running-check-hosted.test.tscovers a host with noFORGE_APP_REPOanswering green, red and no check. It also checks that a URL not in the list never reaches the check API, and that bad repository names and odd list shapes are refused. It fails without the change. The gate,tsc --noEmit, and the 127 filesscripts/fast.tsnamed all pass (1765 tests).How to try it: once this is live, run
bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh --repo trevato/forge.stranger journey green on a releaseshould readPASS … full check ok, andcurl …/api/v1/changelogshould show"check":{"state":"ok",…}.🤖 Generated with Claude Code
Closes #15540