Public: anyone can read this; the crew can change it.

Production's changelog carries the running commit's check verdict even when the forge's repository is private #15529

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

/api/v1/changelog and MCP releases now include the running commit's check verdict even when the forge's own repository (FORGEREPO) is private. Before, src/release/runningcheck.ts only ever looked the repository up through publicForgeRepo, which skips private repositories, so production answered check: null.

Notes

shipped production is serving it deploy 3fede26

opened this

/api/v1/changelog and MCP releases now include the running commit's check verdict even when the forge's own repository (FORGE_REPO) is private. Before, src/release/running_check.ts only ever looked the repository up through publicForgeRepo, which skips private repositories, so production answered check: null. That is why scripts/v1-probe.ts printed UNKNOWN on the stranger-journey line.

The lookup now finds FORGE_REPO whatever its visibility. Still asked of the running commit only, and only {commit, state, runId} comes back: no summary, no log, no other commit. One comment in the file gives the reason: the commit is already in the same public answer, and whether its tests passed is the release's own claim. src/core/forge_repo.ts is unchanged, so the changelog list, security.txt and notes still ignore a private repository.

Tests: in test/running-check.test.ts, the private-forge case used to expect null. That test reflected the old behaviour, so I replaced it. The new test checks that a private forge returns the verdict both from runningCheck and from shippedAnswer, with exactly the keys commit, runId and state, and without the private summary. It fails when the source change is reverted. bun x tsc --noEmit and bun scripts/gate.ts --fix pass. scripts/fast.ts named 151 test files (about 12 minutes), so I ran 13 of them here: the changelog, shipped-answer, release, version, MCP releases card, MCP anonymous and test-honesty suites, plus the import and export checks. All 104 tests passed. The forge's check runs the rest on push.

Not done yet: the issue is only closed out once the probe prints PASS or FAIL instead of UNKNOWN against production after this ships. A person checks that.

To try: with a private FORGE_REPO and FORGE_COMMIT set to a checked commit, GET /api/v1/changelog should show check: {commit, state, runId}. After release, run bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh and read the stranger-journey line.

I did not call the keep_plan or estimate tools the issue asks for: neither is available in this session.

🤖 Generated with Claude Code

Closes #15528

1 earlier comment · 1 event
commented

/api/v1/changelog and MCP releases now include the running commit's check verdict even when the forge's own repository (FORGE_REPO) is private. Before, src/release/running_check.ts only ever looked the repository up through publicForgeRepo, which skips private repositories, so production answered check: null. That is why scripts/v1-probe.ts printed UNKNOWN on the stranger-journey line.

The lookup now finds FORGE_REPO whatever its visibility. Still asked of the running commit only, and only {commit, state, runId} comes back: no summary, no log, no other commit. One comment in the file gives the reason: the commit is already in the same public answer, and whether its tests passed is the release's own claim. src/core/forge_repo.ts is unchanged, so the changelog list, security.txt and notes still ignore a private repository.

Tests: in test/running-check.test.ts, the private-forge case used to expect null. That test reflected the old behaviour, so I replaced it. The new test checks that a private forge returns the verdict both from runningCheck and from shippedAnswer, with exactly the keys commit, runId and state, and without the private summary. It fails when the source change is reverted. bun x tsc --noEmit and bun scripts/gate.ts --fix pass. scripts/fast.ts named 151 test files (about 12 minutes), so I ran 13 of them here: the changelog, shipped-answer, release, version, MCP releases card, MCP anonymous and test-honesty suites, plus the import and export checks. All 104 tests passed. The forge's check runs the rest on push.

Not done yet: the issue is only closed out once the probe prints PASS or FAIL instead of UNKNOWN against production after this ships. A person checks that.

To try: with a private FORGE_REPO and FORGE_COMMIT set to a checked commit, GET /api/v1/changelog should show check: {commit, state, runId}. After release, run bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh and read the stranger-journey line.

I did not call the keep_plan or estimate tools the issue asks for: neither is available in this session.

🤖 Generated with Claude Code

Changes requested — before the latest push

Behaviour is right and the test is good, but one clean-up is needed before this lands. (1) src/release/running_check.ts re-implements the FORGE_REPO owner/name parse that publicForgeRepo already does in src/core/forge_repo.ts (same split, same getRepo). Two copies of one rule will drift. Extract the parse into forge_repo.ts as an exported forgeRepo(app) returning the repo whatever its visibility, have publicForgeRepo call it and add the public check, and have running_check.ts call it; then it no longer imports getRepo directly. (2) Box 1 asks for the reason in one line; the new comment is three wrapped lines. Make it one sentence (wrap it only if the gate forces). Note on the preview: /api/v1/changelog there answers check:null for commit 6b148a9, so the preview does not show the verdict. If the preview has no FORGE_REPO or no check for that commit, say so in the pull; the unit test is the proof. No direction conflict: this is the v1 path defect, small and single-purpose.

commented

/api/v1/changelog and MCP releases now include the running commit's check verdict even when the forge's own repository is private. Before this, src/release/running_check.ts looked the repository up only through publicForgeRepo, so a private repository gave check: null. That is why the probe's stranger-journey line read UNKNOWN on production.

Only the running commit is looked up, and only {commit, state, runId} comes back: no summary, no log, no other commit.

Review follow-up: reading FORGE_REPO (the owner/name split and the getRepo call) now happens in one place: a new exported forgeRepo(app) in src/core/forge_repo.ts that returns the repository whatever its visibility. publicForgeRepo calls it and adds the public check, and running_check.ts calls it and no longer imports getRepo. The reason for exposing the verdict is now a single comment line in running_check.ts; the gate left it unwrapped.

Tests: in test/running-check.test.ts, the old private-forge case expected null. That expectation was the behaviour this issue fixes, so I replaced it. The new case checks that a private forge returns the verdict both from runningCheck and from shippedAnswer, with exactly the keys commit, runId and state, and that the run's private summary does not appear. It fails without the change.

bun scripts/gate.ts --fix and bun x tsc --noEmit pass. Locally I ran only the tests closest to the change: the running-check, changelog and shipped-answer suites, plus the unused-exports, src-imports, kernel-boundary and test-honesty checks; all passed. scripts/fast.ts named 151 files, so the full set runs in the forge's check on push.

The preview can't show the verdict. Its /api/v1/changelog answers check: null for commit 6b148a9. The preview is seeded with preview-admin/sample, and it has no FORGE_REPO repository with a check for that commit, so there is nothing to show; the unit test is the proof here.

Not done until production proves it: after release, bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh should print PASS or FAIL instead of UNKNOWN on the stranger-journey line. A person checks that.

🤖 Generated with Claude Code

Approved

Both earlier asks are met. FORGE_REPO is now read in one place (forgeRepo in src/core/forge_repo.ts, which publicForgeRepo builds on), and the reason for exposing the verdict is one comment line in running_check.ts. The private-repo test checks the verdict from runningCheck and from shippedAnswer, with exactly three keys and no summary, and it fails without the change. Only the running commit is asked, so nothing wider leaves. This touches no page, so there is no phone or keyboard impact. The preview cannot show the verdict: it has no FORGE_REPO with a check for its commit, so the unit test is the proof. Next, two things: 1) after release, run scripts/v1-probe.ts against production and confirm the stranger-journey line prints PASS or FAIL, not UNKNOWN. 2) Non-blocking: add a short docs note that private forges expose the running commit state, so operators know.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs