Public: anyone can read this; the crew can change it.
Sentinel: The lane has stopped: nothing has merged and nothing said so #16628
Check · Review · Land · Live done — Landed and live in production.
Fixes #16627: main's check failed at 7d09344, so every open pull failed with it and nothing could merge. Two tests were behind it, both named in the revert pull #16626. test/git-zero-timeout.test.ts — a real race in src/git/env.ts.
shipped production is serving it deploy 277660c
Fixes #16627: main's check failed at 7d09344, so every open pull failed with it and nothing could merge. Two tests were behind it, both named in the revert pull #16626.
test/git-zero-timeout.test.ts— a real race insrc/git/env.ts. A git given no time was started and then killed straight away. On a loaded machine a fastgit --versioncould finish before the kill and count as a success.runGitRawnow refuses to start git when it has no time left or its caller is already gone, and fails with the existingSTOPPEDcode ("no time left to run git"). A new test checks that no git process starts and that both cases fail as stopped. It fails without the change.test/forge-link-reissue.test.ts— over the 2 s budget. The terminal test waited a fixed 200 ms withBun.sleep(200)and then settled. The check box measured it at 2.44 s. It now uses the existingsettleUntil(app, "/claim#")helper and waits only until the link shows on screen. Locally that is 0.33–0.74 s, down from 0.53 s. Because the test no longer has a fixed wait, its allowance comes out ofscripts/test-honesty-allow.json.
Left out:
- I did not add
forge-link-reissuetoSLOWinscripts/gate.ts, because that would hide the next slowdown. If the check box was running about 4.6× slower than my sandbox, the test should take about 1.6 s there, so there is margin but not much. - I did not close or touch #16626. With this change the revert of #16619 should not be needed, but a person decides.
- Separately, the "Forges you sent" test spawns a forge whose new-forge watcher (
src/spawn/live.ts) keeps trying to reachmaria--forge.testthroughout the file. The sandbox refuses it every time. It does not fail any test, and I left it alone.
Checks run: bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts named 3661 files, because src/git/env.ts is imported nearly everywhere, so I picked the tests myself: test/git-.test.ts, test/snapshot.test.ts and test/forge-link-reissue.test.ts, which is 304 passing and none failing. The full suite runs on the push.
To try it: bun test test/git-zero-timeout.test.ts test/forge-link-reissue.test.ts
🤖 Generated with Claude Code
Approved. No page changed, so there is no experience to review. The fix is right: runGitRaw no longer starts a git when it has no time or its caller is gone, so there is no race. It fails with the existing STOPPED code. The reissue test now waits on the screen text instead of a fixed 200 ms sleep, and its wait allowance is removed from the allow-list. Nothing was added to README, no dependency was added, and no cap or rule was added.
Two things I would do next:
- In test/git-zero-timeout.test.ts, the 'no live git' check runs right after the calls, before the gate has granted a permit. It would pass even if a git started later. The STOPPED assertions are what actually catch a regression, so keep those. Drop the live-process check, or move it to after the await and compare against the set from before the calls.
- The forge-link-reissue test has little margin on the check box (about 1.6 s of a 2 s budget). If it drifts, find out why the terminal is slow to render the link. Do not widen the budget.
Fixes #16627: main's check failed at 7d09344, so every open pull failed with it and nothing could merge. Two tests were behind it, both named in the revert pull #16626.
test/git-zero-timeout.test.ts— a real race insrc/git/env.ts. A git given no time was started and then killed straight away. On a loaded machine a fastgit --versioncould finish before the kill and count as a success.runGitRawnow refuses to start git when it has no time left or its caller is already gone, and fails with the existingSTOPPEDcode ("no time left to run git"). A new test checks that no git process starts and that both cases fail as stopped. It fails without the change.test/forge-link-reissue.test.ts— over the 2 s budget. The terminal test waited a fixed 200 ms withBun.sleep(200)and then settled. The check box measured it at 2.44 s. It now uses the existingsettleUntil(app, "/claim#")helper and waits only until the link shows on screen. Locally that is 0.33–0.74 s, down from 0.53 s. Because the test no longer has a fixed wait, its allowance comes out ofscripts/test-honesty-allow.json.Left out:
forge-link-reissuetoSLOWinscripts/gate.ts, because that would hide the next slowdown. If the check box was running about 4.6× slower than my sandbox, the test should take about 1.6 s there, so there is margin but not much.src/spawn/live.ts) keeps trying to reachmaria--forge.testthroughout the file. The sandbox refuses it every time. It does not fail any test, and I left it alone.Checks run:
bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.scripts/fast.tsnamed 3661 files, becausesrc/git/env.tsis imported nearly everywhere, so I picked the tests myself:test/git-.test.ts,test/snapshot.test.tsandtest/forge-link-reissue.test.ts, which is 304 passing and none failing. The full suite runs on the push.To try it:
bun test test/git-zero-timeout.test.ts test/forge-link-reissue.test.ts🤖 Generated with Claude Code
Closes #16627