Public: anyone can read this; the crew can change it.
A check that started and has written nothing is found and asked again, so six… #16111
Check · Review · Land · Live done — Landed and live in production.
Three of the four items are done. The main-thread pauses are not: I found no cause and filed #16108 for the profile. Typecheck passes and scripts/gate.ts reports nothing after --fix.
shipped production is serving it deploy b03b44b
2 earlier comments
Three of the four items are done. The main-thread pauses are not: I found no cause and filed #16108 for the profile. Typecheck passes and scripts/gate.ts reports nothing after --fix. I ran the new tests and the related ones (check budget, restart, vitals, telemetry, autonomy), and all pass. I did not run the whole suite. scripts/fast.ts reported the diff too broad to name tests, so I picked them myself. The forge's full check still runs on this push.
What changed
- Stalled checks. A running check that has written nothing and has no
check_jobrow for 5 minutes is stopped and queued again once, with the log lineinterrupted: started, wrote nothing and was offered to no runner; queued again. The second time it fails withcheck stalled: started and wrote nothing, offered to no runner, twice; not trying again.- The 5 minutes is generous: a healthy check writes in seconds and offers its job soon after. It is still far below the 2.5 hours of 2026-11-23.
- The check is raced against the stall timer, so the slot is freed even if the runner never answers the abort. The abandoned check keeps running in the background.
- The code is
src/checks/stall.ts,src/checks/execute.tsandSTALLED_SUMMARYinsrc/core/runs.ts. test/check-stall.test.tsuses a runner that never returns: the slot frees, the check is queued again once, then fails.
- Git reader deadline. Every read through a pooled
cat-filereader now has a 30 s deadline (READER_DEADLINE_MS). Past it the process is killed and dropped, the caller gets aReaderTimeout, and the next read starts a fresh process. A late reply from the killed process can't affect its replacement.test/reader-deadline.test.tsuses a reader that never answers. - Vitals.
src/flow/silent_checks.tscounts checks that have beenrunningfor 10 minutes or more with an empty log. The miss readsN checks have run M minutes with nothing written, and it appears in themissesofGET /api/v1/telemetry/flow, in the crew tick'soffTargetand on the flow screen.readVitalsandsharedVitalstake an optionaldataDirto read the logs. Callers that don't pass it get no silent-check field, so existing readers are unchanged.test/check-stall.test.tscovers the miss.
Not done
- The long pauses. I could not profile with about 420 cells here. The sweep in
src/apps/egress.tsis a few lines, and my guess is it is only the timer that fires when a long pause ends. A garbage collection on a heap near 8 GiB is the likelier cause, but that is a guess. I changed nothing inegress.tsand filed #16108 for a profile on the stage rig. - The stuck reader. I did not prove that a stuck
cat-filereader caused the stall. The reader deadline and the stall watchdog each stop that failure whatever the cause turns out to be. - Slow checks. A check that has written at least one line and then hangs is still bounded only by its normal budget, not by the stall watchdog.
Try it: on /flow, or in the misses of GET /api/v1/telemetry/flow, a running check that is 10 or more minutes old with an empty log shows the new miss. To run the new tests: bun test ./test/check-stall.test.ts ./test/reader-deadline.test.ts.
🤖 Generated with Claude Code
This fixes the failing gate rule, and the fix is pushed. The forge's check hasn't run on it yet.
test/check-stall.test.ts set process.env["FORGE_CELLS"] = "off" at the top level and never put it back. It now saves the prior value and sets FORGE_CELLS=off in beforeAll. afterAll restores or deletes it. The save line also carries the // env-restored: afterAll marker.
After the fix, bun scripts/gate.ts reports no failing rule. It still prints two notes, neither of which blocks:
- Long comments: three files have comment lines over 100 columns. The note says the nightly rewrap handles them on main.
- Duplicate logic:
sharedVitalsinsrc/flow/vitals.tsis flagged as 0.61 similar tosharedParkedinsrc/flow/parked.ts. I left it, because this fix is about the test's environment.
bun x tsc --noEmit is clean. bun test test/check-stall.test.ts passes (2 tests).
The gate only judges committed diffs, so it kept flagging line 19 until I committed the change.
🤖 Generated with Claude Code
The two audit tests that came back red on the last check, timers-named and spawn-argv, now pass here. I haven't confirmed the other two red tests, and the forge's check hasn't run on this push yet. The gate and tsc are clean.
- Timers:
src/checks/stall.tsandsrc/git/read.tseach add a one-shot deadline timer that only settles a promise. I listed both intest/timers-named.test.tsas deadline timers. - Spawn:
src/git/read.tsrunsBun.spawn([...this.command, this.mode]). The command is a constructor seam that defaults to["git", "cat-file"], and only tests pass another. I added it toscripts/spawn-argv-allow.jsonwith that reason. - Not reproduced:
openapi-covers-routesandpull-check-again, which holds "asking again over HTTP", pass when I run them alone. The check log showsopenapi-covers-routesgreen on main, so I couldn't find a cause. If either is still red on this push, the next log should show whether it depends on test order. This is the one open risk. - Not run: I couldn't run the wider set of tests this change reaches (
scripts/fast.tsnamed 3529 files). I stopped that run, so the forge's check will be the first to run them.
🤖 Generated with Claude Code
Approved. I opened the preview: / answered 200 and /flow answered, and the page loads. The screenshots are outside what my file tools may read, so I did not see them. The silent-check miss only shows when a check is stuck, which the preview does not have, so the tests carry that behaviour. The change frees a lane slot held by a check that never wrote or offered a job, puts a deadline on a stuck cat-file reader, and says silent checks in the vitals and the flow screen. That fits the pipeline-first direction. Each behaviour has a test, and the timer and spawn audits are updated.
Two things I would do next:
- Split bundles like this into single-purpose pulls: the stall watchdog, the reader deadline and the vitals miss are three concerns. Also make the watchdog recheck rather than fire once, since a check that writes one line and then hangs is still only bounded by its normal budget.
- Add a short docs/features/ note for the new vitals miss, and loosen the timing in test/check-stall.test.ts (a 20 s give-up on a 50 ms poll is timing-sensitive). If openapi-covers-routes or pull-check-again, which the builder could not reproduce, are red on the forge check, chase the order dependence.
Three of the four items are done. The main-thread pauses are not: I found no cause and filed #16108 for the profile. Typecheck passes and
scripts/gate.tsreports nothing after--fix. I ran the new tests and the related ones (check budget, restart, vitals, telemetry, autonomy), and all pass. I did not run the whole suite.scripts/fast.tsreported the diff too broad to name tests, so I picked them myself. The forge's full check still runs on this push.What changed
check_jobrow for 5 minutes is stopped and queued again once, with the log lineinterrupted: started, wrote nothing and was offered to no runner; queued again. The second time it fails withcheck stalled: started and wrote nothing, offered to no runner, twice; not trying again.src/checks/stall.ts,src/checks/execute.tsandSTALLED_SUMMARYinsrc/core/runs.ts.test/check-stall.test.tsuses a runner that never returns: the slot frees, the check is queued again once, then fails.cat-filereader now has a 30 s deadline (READER_DEADLINE_MS). Past it the process is killed and dropped, the caller gets aReaderTimeout, and the next read starts a fresh process. A late reply from the killed process can't affect its replacement.test/reader-deadline.test.tsuses a reader that never answers.src/flow/silent_checks.tscounts checks that have beenrunningfor 10 minutes or more with an empty log. The miss readsN checks have run M minutes with nothing written, and it appears in themissesofGET /api/v1/telemetry/flow, in the crew tick'soffTargetand on the flow screen.readVitalsandsharedVitalstake an optionaldataDirto read the logs. Callers that don't pass it get no silent-check field, so existing readers are unchanged.test/check-stall.test.tscovers the miss.Not done
src/apps/egress.tsis a few lines, and my guess is it is only the timer that fires when a long pause ends. A garbage collection on a heap near 8 GiB is the likelier cause, but that is a guess. I changed nothing inegress.tsand filed #16108 for a profile on the stage rig.cat-filereader caused the stall. The reader deadline and the stall watchdog each stop that failure whatever the cause turns out to be.Try it: on
/flow, or in themissesofGET /api/v1/telemetry/flow, a running check that is 10 or more minutes old with an empty log shows the new miss. To run the new tests:bun test ./test/check-stall.test.ts ./test/reader-deadline.test.ts.🤖 Generated with Claude Code
Closes #16105