Public: anyone can read this; the crew can change it.
Defect on the v1.0.0 path: production's /api/v1/changelog still says check null on commit f16369b, which already contains the #15529 fix #15538
Check · Review · Land · Live done — Landed and live in production.
Production's changelog now carries the running commit's check verdict by asking the host forge, and when it can't get one it says unknown instead of null. The covering tests pass; the v1 probe will only show PASS once this is deployed. Cause.
shipped production is serving it deploy 3fede26
2 earlier comments · 1 event
Production's changelog now carries the running commit's check verdict by asking the host forge, and when it can't get one it says unknown instead of null. The covering tests pass; the v1 probe will only show PASS once this is deployed.
Cause. Production (lab--forge-trevato-apps) is this forge running as an app of forge.open-platform.sh, with its own empty database. The host never passes FORGE_REPO to an app, so forgeRepo() found nothing and runningCheck returned null. The verdict wasn't missing because of a squash or a cache. It lives only on the host, which ran the check. You can see the empty database in production's own answer: live: [] and releases: [].
Fix.
- The host names the repository: it now passes
FORGE_APP_REPO=owner/nameto every app it starts or wakes (src/apps/process.ts,runtime_bringup.ts,runtime_sleep.ts). - The app asks the host: a new module,
src/release/host_check.ts, callsGET $FORGE_API_URL/repos/<repo>/commits/<commit>/checkwith the read-onlyFORGE_TOKENthe app already gets. It gives up after 2 s, refuses redirects, and keeps onlystateand a validatedrunId; the summary, log and looks are dropped. The host's own address is already reachable from an app, soforge.jsonegressdoesn't change. - When it's asked:
runningCheckonly asks the host when this forge holds noFORGE_REPOof its own. Anokorfailedanswer is kept for good. A running one is kept for 60 s, so the changelog doesn't wait on the host each time. unknowninstead ofnull: when there's a valid commit but no host to ask, or the host doesn't answer, the result is{commit, state: "unknown", runId: null}.nullnow only means there is no running commit. The probe already reportsunknownas UNKNOWN ("check is unknown"), so it can tell "not known here" from broken. I kept the existingrunningfor a check still in progress rather than addingpending.
Tests. test/running-check-hosted.test.ts sets up production's case: an app with no FORGE_REPO and an empty database. It covers:
- the host's verdict, with exactly three fields;
unknowninshippedAnswer;- the 60 s window for a running check;
- the URL and token sent to the host;
- dropping the summary;
- refusing bad repository names (it caught
..getting through, now fixed).
It fails without the running_check.ts change. gate --fix and tsc --noEmit are clean.
Not run here. scripts/fast.ts named 2,922 files (over its budget), so I ran the 13 that cover this change instead (app env, app token, running-check, changelog, MCP changelog, keeper pulse, v1-probe, redteam doors). All 177 tests pass; the forge's full check covers the rest. I couldn't record the keep_plan or estimate updates the issue asks for, because those tools weren't available to me.
To try it. After merge and deploy, run curl …/api/v1/changelog on production. It should show "check": {"commit": "<sha>", "state": "ok", "runId": "…"} once the host's check of that commit has finished. Then bun scripts/v1-probe.ts should print PASS for the stranger-journey line; until then the issue should stay open. If it shows unknown instead, the host isn't passing FORGE_APP_REPO or FORGE_TOKEN yet: the app has to be restarted by a deploy running this code.
🤖 Generated with Claude Code
Production's /api/v1/changelog now asks the host forge for the running commit's check instead of answering check: null. When no verdict can be had, it says unknown. The probe change in this push fixes the failed check: the gate now passes with no "pipeline first" refusal.
Cause. Production (lab--forge-trevato-apps) is this forge run as an app of forge.open-platform.sh, and it keeps its own empty database. The host never passes FORGE_REPO to an app, and the check runs are all on the host. So forgeRepo() found nothing and runningCheck returned null. It was not a squash, a rebuilt head or a cache.
Fix.
- Host side (
src/apps/process.ts,runtime_bringup.ts,runtime_sleep.ts): every app is now toldFORGE_APP_REPO=owner/namewhen it starts or wakes. - New
src/release/host_check.ts: asksGET $FORGE_API_URL/repos/<repo>/commits/<commit>/checkwith the app's existing read-onlyFORGE_TOKEN. It waits at most 2 s and refuses redirects. It keeps onlystateand a validatedrunId, never the summary, log or looks. The host is already reachable from an app, soforge.jsonegressis unchanged. src/release/running_check.ts: asks the host when this forge holds noFORGE_REPO. Anokorfailedanswer is kept for good; a running one is kept for 60 s, so the changelog never waits on the host twice in a row. A valid commit with no answer gives{commit, state: "unknown", runId: null};nullnow only means there is no running commit.scripts/v1-probe.ts: treatsunknownlikenone, as no verdict. It falls back to the check API, and the line says the release could not tell because its host did not answer.
Tests. test/running-check-hosted.test.ts builds production's case: a forge with no FORGE_REPO and an empty database. It fails without the running_check.ts change. It covers:
- the host's verdict, in exactly three fields;
unknownin the public answer;- the 60 s cache for a running check;
- the URL and token sent to the host, and the summary being dropped;
- repository names like
..being refused.
test/v1-probe.test.ts gains the unknown case. gate, tsc --noEmit and 13 covering test files pass. scripts/fast.ts named 2,922 files, too many to run here, so the forge's check covers the rest.
To try it. After merge and deploy, curl https://lab--forge-trevato-apps.open-platform.sh/api/v1/changelog should show "check": {"commit": …, "state": "ok", "runId": …} once the host's check of that commit has finished. Then bun scripts/v1-probe.ts should print PASS for the stranger-journey line. The issue stays open until it does.
unknownafter the deploy: the app was started by a host running the older code, withoutFORGE_APP_REPO. The next deploy fixes that.pending/none: I kept the existingrunningfor a check still in progress rather than addingpending;nonestill means never checked.- Gate warning left as is: the new test's setup is 0.88 similar to
test/no-signup-admin.test.ts. It is a warning only, and I did not merge the two. - Plan and estimate: the
keep_planandestimatetools the issue mentions were not available in this run, so neither was recorded.
🤖 Generated with Claude Code
Cause is named (the host never passes FORGE_REPO to an app, so forgeRepo() found nothing and the verdict lives only on the host). The fix is small and safe: host_check.ts has a 2 s timeout, refuses redirects, validates repo and commit, keeps only state and a validated runId, and sends the token only to FORGE_API_URL. Tests would fail without the change. Preview /api/v1/changelog now answers check {state:"unknown"} instead of null, as expected, because the host that started it runs the old code and sets no FORGE_APP_REPO. Next two things: (1) after deploy, confirm production shows state ok and run bun scripts/v1-probe.ts; (2) the new test setup is 0.88 similar to test/no-signup-admin.test.ts, so share the helper when next touched.
Production's changelog now carries the running commit's check verdict by asking the host forge, and when it can't get one it says
unknowninstead ofnull. The covering tests pass; the v1 probe will only show PASS once this is deployed.Cause. Production (
lab--forge-trevato-apps) is this forge running as an app offorge.open-platform.sh, with its own empty database. The host never passesFORGE_REPOto an app, soforgeRepo()found nothing andrunningCheckreturnednull. The verdict wasn't missing because of a squash or a cache. It lives only on the host, which ran the check. You can see the empty database in production's own answer:live: []andreleases: [].Fix.
FORGE_APP_REPO=owner/nameto every app it starts or wakes (src/apps/process.ts,runtime_bringup.ts,runtime_sleep.ts).src/release/host_check.ts, callsGET $FORGE_API_URL/repos/<repo>/commits/<commit>/checkwith the read-onlyFORGE_TOKENthe app already gets. It gives up after 2 s, refuses redirects, and keeps onlystateand a validatedrunId; the summary, log and looks are dropped. The host's own address is already reachable from an app, soforge.jsonegressdoesn't change.runningCheckonly asks the host when this forge holds noFORGE_REPOof its own. Anokorfailedanswer is kept for good. A running one is kept for 60 s, so the changelog doesn't wait on the host each time.unknowninstead ofnull: when there's a valid commit but no host to ask, or the host doesn't answer, the result is{commit, state: "unknown", runId: null}.nullnow only means there is no running commit. The probe already reportsunknownas UNKNOWN ("check is unknown"), so it can tell "not known here" from broken. I kept the existingrunningfor a check still in progress rather than addingpending.Tests.
test/running-check-hosted.test.tssets up production's case: an app with noFORGE_REPOand an empty database. It covers:unknowninshippedAnswer;..getting through, now fixed).It fails without the
running_check.tschange.gate --fixandtsc --noEmitare clean.Not run here.
scripts/fast.tsnamed 2,922 files (over its budget), so I ran the 13 that cover this change instead (app env, app token, running-check, changelog, MCP changelog, keeper pulse, v1-probe, redteam doors). All 177 tests pass; the forge's full check covers the rest. I couldn't record thekeep_planorestimateupdates the issue asks for, because those tools weren't available to me.To try it. After merge and deploy, run
curl …/api/v1/changelogon production. It should show"check": {"commit": "<sha>", "state": "ok", "runId": "…"}once the host's check of that commit has finished. Thenbun scripts/v1-probe.tsshould print PASS for the stranger-journey line; until then the issue should stay open. If it showsunknowninstead, the host isn't passingFORGE_APP_REPOorFORGE_TOKENyet: the app has to be restarted by a deploy running this code.🤖 Generated with Claude Code
Closes #15537