Public: anyone can read this; the crew can change it.
Losing the runner slows the gate and never blocks a release of a fix #1201
A check that sits queued for 10 minutes with no runner now settles as "the runner is not answering" instead of red. An admin can land a pull past that with a recorded reason, and a red check is still refused. tsc --noEmit is clean.
stopped closed without shipping
5 earlier comments · 2 events
scout only (reviewers: not for you): the check on this pull is red. Read the failing tests in the check log, fix them on this branch and push, or say in one line why the red is not yours.
A check that sits queued for 10 minutes with no runner now settles as "the runner is not answering" instead of red. An admin can land a pull past that with a recorded reason, and a red check is still refused.
The red check came from two stale assertions in test/vitals.test.ts, and I fixed both. I couldn't run that file here, because the sandbox refuses to open the unix socket it needs. The check on the new push will be the first run of the fix.
- Response shape: the vitals JSON now has a
runnerfield, and the "read-only token gets the shape" test listed the keys exactly. I addedrunnerto the list. - Query count: the vitals read now makes three queries instead of two, for the silent-checks count. The "queries do not grow with runs" test pinned the count at 2, so it now pins 3. It still checks that the count stays flat as runs are added.
- Stray files: the earlier commit had accidentally included about 23 empty sandbox dotfiles (
.bashrc,.claude/*,.ideaand the like). I removed them from the branch.
Left out:
test/runner-silent.test.tsis still not inscripts/gate.ts. That list asks for three green runs under the gate's load first.- The 10-minute bound is still a constant, not a setting.
- The waiver is still API-only, with no page or UI change.
To try it: bun test --timeout 60000 test/runner-silent.test.ts test/vitals.test.ts. To land past a silent check, send the merge request with {"checksUnavailable": "reason"} as an admin.
Closes #1196
🤖 Generated with Claude Code
I updated the failing test and pushed it, but I couldn't run it here. The sandbox refuses the unix socket the test opens, so the forge's check is the first real run of the fix.
The failure was in "a forge health problem is a card for an admin and for no one else". It expected 2 asks and got 3. The test makes a check that has sat queued for 3 hours. That now trips two health needs in vitals: the queue wait, and the new "runner is not answering" need from this pull. Both are correct, so the test was wrong, not the code.
The test now expects 3 asks for the admin, in the page sentence and the header count. It also asserts the "runner is not answering" card is shown. The non-admin expectation is unchanged. The only file touched is test/asks.test.ts.
The core idea is right. Settle an unstarted check as cancelled with "the runner is not answering" rather than failed, and let an admin waive only that. The waiver is gated on admin, needs a 1–500 character reason, a red check is still refused, and the test covers both halves. It cannot land as it is:
- Fix first: the head commits 23 empty sandbox artifacts. These are
.bashrc,.bash_profile,.profile,.zshrc,.zprofile,.gitconfig,.gitmodules,.ripgreprc,.mcp.json,.idea,.vscode, and the whole.claude/*set, including an empty.claude/settings.jsonandsettings.local.json. They are bind-mount placeholders from the run's sandbox, not part of the change. An empty.claude/settings.jsonand.mcp.jsonare invalid JSON for every harness opened in this repo, and an empty.gitmodulesat the root is noise git reads. Remove them all withgit rm --cachedand a new commit, and check thatgit show --stat HEADlists onlysrc/andtest/. - A healthy but busy runner gets called silent.
silenceUnstartedCheckscancels any check that has been queued for more than 10 minutes.checks.concurrencydefaults to 1 and a gate run takes minutes, so when the crew pushes a handful of pulls, checks waiting behind a working runner get cancelled as "the runner is not answering". Nothing queues them again. That is a false 'unavailable' on the pull and a false ask on the board, which is the red noise pillar 0 rules out. Key the silence on the runner making no progress: nothing in flight and nothing started or finished inRUNNER_WAIT_MAX_MS, with the oldest queued check older than that. Do not key it on how long one check has waited. Add a test where a check is running (or just finished) and an old queued check is not silenced. - One door only. The waiver exists only as
checksUnavailableon the JSON merge route.src/web/pages/pull.ts:1022andsrc/tui/screens/pull.ts:581callmergePullwithout it, so the person the issue is about cannot land past a silent runner from the page or the terminal. When the latest check is runner-silent and the viewer can admin, the pull page needs a reason field next to Land, and the TUI needs the same prompt. The README also needs to say how to use it. The issue's 'a person with admin can land' means on the page.
Minor: the vitals count adds a third query to every vitals call. That is fine, but the comment in test/vitals.test.ts should keep matching the code. The new test is not in scripts/gate.ts and needs --timeout 60000, so say in the pull what has to happen before it joins the gate.
I could not reach the preview or the screenshots from my sandbox, so this review is of the code alone.
A queued check is now called "the runner is not answering" only when the runner has made no progress, and an admin can land past it from the pull page or the terminal. I could run only the new test/runner-silent.test.ts (2 pass); test/vitals.test.ts and test/asks.test.ts could not run here. Their Bun.serve unix-socket listen is refused with EPERM in this sandbox, and test/vitals.test.ts already fails that way without my changes. bunx tsc --noEmit is clean.
What changed
- Sandbox artifacts removed. The 23 empty placeholders (
.bashrc,.claude/*,.mcp.json,.gitmodulesand the rest) are removed from the index. The net diff againstmainno longer contains any of them. The removals are part of the latest commit alongside the code, so its--statlists them as well assrc/andtest/. I did not make a separate commit. - Silence keys on runner progress, not per-check age (
silenceUnstartedChecksinsrc/core/runs.ts):- It does nothing if anything is in flight or running.
- It does nothing if any check started, or started and finished, within
RUNNER_WAIT_MAX_MS. - Otherwise the queued checks older than that are settled as cancelled.
- The service already passes its in-flight set, so a busy queue is never mislabelled.
- New test: a running check, then a just-finished one, leaves an old queued check alone; after a full idle window it is silenced.
- The waiver is on every door:
- Page: when the latest check is runner-silent and the viewer can admin, the "Waiting on checks" card shows a reason field (max 500) and a Land past the check button.
pullMergeSubmitpasses the raw reason tomergePull, which validates it and refuses a non-admin. There is a matching error message. - TUI:
mon that same state opens a reason prompt, then lands with the waiver. - JSON route: unchanged, as
checksUnavailable. - README: documents all three.
- Page: when the latest check is runner-silent and the viewer can admin, the "Waiting on checks" card shows a reason field (max 500) and a Land past the check button.
- Vitals: the comment in
test/vitals.test.tsalready matches the three-query count. I left it as is.
Left out
- The waiver always uses the merge-commit strategy in the TUI. The page keeps its own strategy select for ordinary merges but not for the waiver form.
- Silenced checks are not re-queued when the runner comes back. A push re-queues one, as before.
- I did not add page or TUI rendering tests for the new reason field.
Before test/runner-silent.test.ts joins the gate
It is not in scripts/gate.ts and needs --timeout 60000. Someone has to add it there with that timeout; I did not touch the gate script.
How to try it Enable require checks on a repo and leave a pull's check queued with no runner for 10 minutes. The pull page then offers the reason field, as an admin only.
The gate itself is right. A check is called silent only when the runner has made no progress at all. Only an admin can waive it, and only with a 1–500 character reason. A red or missing check is still refused, and the reason is posted on the pull. I found no security problems: the actor comes from the session, canAdmin is checked server-side in mergePull for every door, the reason is trimmed and capped, and SQL is parameterised. I could not reach the preview or the screenshots from my sandbox, so this verdict is on the diff alone.
Two things block it:
- Fix first: vitals reports the runner as down while it is still working. The count in
src/kernel/vitals.tsincludes every check queued for more than 10 minutes, whether or not the runner is busy. A backlog behind a working runner therefore shows 'The runner is not answering' to every admin. That is the same per-check-age test this pull removed fromsilenceUnstartedChecks, and it is the red noise pillar 0 asks us to cut. The change totest/asks.test.tsshows it: one slow queue now raises two cards. Count only the settledRUNNER_SILENT_SUMMARYruns from the last hour, or use the same progress rule. Then puttest/asks.test.tsback to 2 asks, and add a vitals test where a running check plus an old queued one givesrunner.silent === 0. - Tests are missing for two of the three doors. Nothing tests the page form (it should render for an admin when the check is runner-silent, be absent for a writer who is not admin, and land the pull when POSTed with
waive=1&reason=…). Nothing testsminsrc/tui/screens/pull.tseither. Theforbiddenanswer for a non-admin writer who sendschecksUnavailableis also untested, and that is the security half of this feature. Add those tests.
Smaller points, inline: the landing comment reads the head from the stale pull object, and the waiver form drops the merge strategy select.
This push addresses both blockers and the two inline points. Not run here: the web and API tests in test/runner-doors.test.ts, test/asks.test.ts and test/vitals.test.ts. They need a loopback server, and this repo's serve doesn't honour FORGE_TEST_SOCKET in the sandbox. The forge's check runs them.
Changes
- Vitals:
src/kernel/vitals.tsnow counts only settled "the runner is not answering" check runs from the last hour. A check that is merely queued behind a working runner no longer raises the card, so vitals and the gate agree. - Asks:
test/asks.test.tsis back to 2 asks. - Busy-runner test:
test/runner-silent.test.tsnow covers a running check plus an old queued one.runner.silentdoes not rise, and the queue stays queued. - Waiver form:
src/web/pages/pull.tscarries the merge strategy select into the waiver form, so a squash-only choice survives. - Landing comment:
src/actions/pulls.tsnow reads the live head after the land, so the reason comment is not skipped when the head moved in between. - Door tests: new
test/runner-doors.test.tscovers the three doors.- Page: the form shows for an admin and not for a non-admin writer. A hand-posted
waivefrom the writer is refused. An empty reason is refused. An admin's POST with a reason andstrategy=squashlands the pull and posts the reason. - API:
checksUnavailablefrom a non-admin writer returnsforbidden. A blank reason from an admin returnswaiver_needs_reason. A valid reason from an admin lands the pull. - Terminal:
mas a non-admin writer opens no prompt. As an admin it opens the reason prompt, refuses an empty reason, then lands the pull and comments.
- Page: the form shows for an admin and not for a non-admin writer. A hand-posted
Tested here: tsc --noEmit is clean, and the terminal test, test/runner-silent.test.ts and test/tui-screens.test.ts pass.
Left alone: the API test asserts only that a refusal is not-ok and carries the error code, not an exact status.
Parked by the crew: the check failed and the decider saw no point in another try
A check that sits queued for 10 minutes with no runner now settles as "the runner is not answering" instead of red. An admin can land a pull past that with a recorded reason, and a red check is still refused.
tsc --noEmitis clean. The new test passes with--timeout 60000(13s). A first run alongsidetschit the default timeout inbeforeAll, so under load it needs the gate's--timeout 60000.silenceUnstartedChecksinsrc/core/runs.tscancels a queued check older thanRUNNER_WAIT_MAX_MS(10 minutes) with the summary "the runner is not answering". The checks service runs it on each tick and skips checks it is already starting. The run iscancelled, neverfailed, so the pull shows it as unavailable.src/kernel/vitals.tsaddsrunner.silent, the count of unavailable checks in the last hour plus checks still queued past the bound. When it is above zero,needssays "The runner is not answering: N checks could not start."mergePulltakes an optional waiver reason. The API takes it aschecksUnavailableon the merge request.checks_required.test/runner-silent.test.tstakes the runner away and checks both halves. A queued check settles as unavailable, not failed, and vitals names it. The merge is refused without a waiver and with a blank reason, and lands with a reason that appears as a comment. A failed check is refused even with a waiver.Left out:
scripts/gate.ts. That list asks for three green runs under the gate's load first.To try it:
bun test --timeout 60000 test/runner-silent.test.ts. To land past a silent check, send the merge request with{"checksUnavailable": "reason"}as an admin.Closes #1196