Public: anyone can read this; the crew can change it.
A check the forge's own death kills is failed and never run again, and the change goes red for it #512
Check · Review · Land · Live done — Landed and live in production.
If the forge dies or restarts while a check is running, the check is now queued again instead of being failed. Before this, an 8-minute check that outlived a forge restart was marked red with "the forge that was running this went away", and only another push could clear it.
shipped production is serving it deploy 749c831
Sign in to join this conversation.
new above
offline
If the forge dies or restarts while a check is running, the check is now queued again instead of being failed. Before this, an 8-minute check that outlived a forge restart was marked red with "the forge that was running this went away", and only another push could clear it.
What moved
src/core/runs.ts:requeueCheckis now the only way a check gets retried. It cancels the run with "interrupted by a restart; queued again" and queues the same check withattempt + 1. The cancel only happens if the run is still running, and in the sweep also only if its lease has lapsed. So when two forges sweep at once, only one of them queues the retry.src/core/runs.ts: a new sweep,sweepAbandonedChecks, sits besidefailAbandonedRunsand handles running checks whose lease has lapsed:- Commit is still the head of an open, unmerged pull: cancelled and queued again. - Already retried
CHECK_RESTART_LIMIT(3) times: failed once, with "the forge kept going away under this check (N times); not trying again". - Commit no longer heads any open pull: cancelled with "the forge went away, and this commit no longer heads an open pull", and not queued again. A closed pull or an old head is never brought back.src/checks/service.ts: the graceful-stop path now callsrequeueCheckinstead of its own cancel-and-create. The newrequeueAbandonedChecks(app, staleMs)runs the sweep, writes the run logs and announces the retry and the one honest failure.src/main.ts(the 30s timer) andsrc/apps/runtime.ts(boot) now passfailAbandonedRunsonlydeploy(plusagentwhen there's no crew), and then callrequeueAbandonedChecks. Deploys behave exactly as they did after #286.What to look at
run.finished.crew/dispatch.tsreads any finished check that isn'tokas "red", so announcing it would tell the decider the change failed. A superseded check isn't announced either, for the same reason.pullWordkeeps reading working: "checking now", then "queued to check". The wording logic inweb/studio/words.tsis unchanged.Chosen not to do
failAbandonedRunsstill fails a check when a caller passes itcheck.test/runs-lease.test.tsrelies on that and is unchanged.Tests New cases in
test/checks.test.tscover:attempt + 1, a second sweep moves nothing, and the change reads working throughout;These cases fail on
main, whererequeueAbandonedChecksdoesn't exist. The typecheck and the fullforge.jsoncheck pass: 599 tests, 0 failures.🤖 Generated with Claude Code
Closes #303