Public: anyone can read this; the crew can change it.
Sentinel: queue:deploy was degraded 60 minutes today: The deploy queue has waited over 30 minutes: 2 queued, 0 running. #16987
Check · Review · Land · Live done — Landed and live in production.
When the forge boots, it now cancels any deploy the previous forge left queued (#16964). Before, such a deploy waited forever and kept queue:deploy degraded. Cause.
-
Reviews
ApprovedApproved. The change is small and does what #16964 asked. At boot, a deploy the last forge left queued is cancelled with STOPPED_SUMMARY, the same as a clean stop. It reuses cancelRun, and it runs before the reconcile, which asks again for what each environment should run. The query uses the run_queued index, and checks are left alone. The test boots AppsRuntime and covers both the deploy and the check. No page or terminal surface changes, so the both-doors rule does not apply, and there is no README change.
Two things I would do next:
- Something should settle a queued deploy that sits past the 30-minute vitals threshold while the forge is running. As written, a stuck row waits for the next boot.
- Say in docs or a code comment that boot cancelling a queued production deploy depends on the reconcile re-queueing it.
-
Checks
shipped production is serving it deploy d5ab98b
-
History
- The boot cancels deploys the last forge left queued, so a kill no longer holds queue:deploy degraded (#16964) 4088a8a
- GET a repository's commits answers `{ items, next_cursor }`, and every test that reads it is updated (#16929) 73f303b
- Bridge: the room line says when the forge can't read its own forge.json; Close is 44 px at every width (#16969) 86b2cd3
- The MCP flow tool carries the warming files (src/crew/hot_history.ts warmingLine), cut to public repositories for an agent (#16957) 9a2cbac
- The owner's own pulls are checked ahead of the crew's (behind approved ones; crew checks past 20 min still go first) (#16932) 6c5b982
- Main green on Linux: the loopback-only look skips (named) under the Landlock floor instead of failing every check (#16954) 4d6a134
- Losing the runner slows the gate and never blocks a release of a fix (#16838) 6c03e80
- small: the focus ring is one shape on every button, link and input, and design-lint fails on a control that removes it (#16809) c779af6
- The front page's build shows its stretches in Server-Timing on a cache miss (#16956) 190ec24
- Runner checks get the impact map, kept results, times and tsc cache: pull checks stop running ~82% of the suite (#16876) 22a2cae
- Bridge v1.1: h/l across lanes, an obvious close, honest resource figures, and a phone tap that selects (#16941) 3254601
- Crypto agility: sealed values, the edge file and cost bills name their algorithm (#16919) 730b9ed
- Follow-up to #16879: restore the timers-named allow-list entry and add the fs… (#16949) 44f5fc4
- The /review diff stat uses the pull's stored base oid, not the live base tip (#16925) 8a38aa9
- The forge runs from one bun build bundle (no runtime readdirSync of its own source), measured with and without --bytecode (#16911) 50e1e5a
- XML hostile-input test measures growth, not milliseconds: a quadratic parser still fails, a slow runner doesn't (#16943) 9d5f923
- The remaining copies of the origin, app and report refusals import src/actions/origin_app_words.ts (#16930) ff172bb
- Nothing optional loads at boot: route modules and warm-ups (search, samplers, crew) start on first use (#16908) 0fe14c4
- Main green on Linux: the protection notes test pins Landlock off instead of depending on the runner's kernel (#16944) 02c4531
- /crew separates runs cut short before an account from runs refused one (#16923) 4ae1fb3
When the forge boots, it now cancels any deploy the previous forge left queued (#16964). Before, such a deploy waited forever and kept queue:deploy degraded.
Cause. The run list for this repository shows a production merge deploy created at 02:49:33 that is still queued now. A deploy waits on the in-memory chain of the forge process that queued it. The forge restarted at 02:56. A clean stop (AppsRuntime.stop) cancels queued deploys, but this restart left the row behind, so it was most likely a kill rather than a clean stop. Nothing will ever claim that row. At boot, failAbandonedRuns only settles running deploys. So from 03:19 the oldest queued deploy was more than 30 minutes old with none running, and vitals reported queue:deploy. The second queued run in "2 queued" was a production deploy held for its 15-minute batch window, which is normal.
Change.
src/core/runs.ts: newcancelQueuedDeploys(db). It cancels every queued deploy throughcancelRun, using theSTOPPED_SUMMARYthat a clean stop writes, so the UI wording that already reads that string is reused.src/apps/runtime.ts:start()calls it next tofailAbandonedRuns, before the reconcile that asks for each environment's deploy again. The count goes into the existing "settled abandoned runs" log line.- During a rollout the new forge may also cancel a deploy the old forge is still holding. That does no harm: the old forge's
claimRunthen finds nothing to claim, and the new boot redeploys production at the tip anyway.
Not done.
- I did not change how vitals counts production deploys held for the batch window. They wait at most
every+maxWait(25 minutes by default), which stays under the 30-minute threshold. - Nothing settles the row already stuck in production until the next forge boot; this change settles it then.
Tests.
test/deploy-orphan-boot.test.tsadds a queued deploy and a queued check, bootsAppsRuntime, and checks that the deploy is cancelled withSTOPPED_SUMMARYwhile the check stays queued. It fails without the change inruntime.ts.bun x tsc --noEmitpasses and the gate shows no failures.- These pass:
merge-crash-recovery,runs-lease,apps-runtime-split,app-runtime-root,deploy-hold-runtime,job-slices. hollow.test.tstimed out once at 88 s while it shared the machine with the runtime suites, and passed alone (28 of 28, 18 s).scripts/fast.tsreached 3,633 test files from this diff, so I picked the tests above myself rather than run them all.
How to try it. After this lands and the forge restarts, the merge deploy queued since 02:49:33 reads cancelled with "the forge stopped" (in GET /api/v1/repos/trevato/forge/runs?kind=deploy), and queue:deploy leaves the degraded list on /settings/capacity.
🤖 Generated with Claude Code
When the forge boots, it now cancels any deploy the previous forge left queued (#16964). Before, such a deploy waited forever and kept
queue:deploydegraded.Cause. The run list for this repository shows a production
mergedeploy created at 02:49:33 that is stillqueuednow. A deploy waits on the in-memory chain of the forge process that queued it. The forge restarted at 02:56. A clean stop (AppsRuntime.stop) cancels queued deploys, but this restart left the row behind, so it was most likely a kill rather than a clean stop. Nothing will ever claim that row. At boot,failAbandonedRunsonly settles running deploys. So from 03:19 the oldest queued deploy was more than 30 minutes old with none running, and vitals reportedqueue:deploy. The second queued run in "2 queued" was a production deploy held for its 15-minute batch window, which is normal.Change.
src/core/runs.ts: newcancelQueuedDeploys(db). It cancels every queued deploy throughcancelRun, using theSTOPPED_SUMMARYthat a clean stop writes, so the UI wording that already reads that string is reused.src/apps/runtime.ts:start()calls it next tofailAbandonedRuns, before the reconcile that asks for each environment's deploy again. The count goes into the existing "settled abandoned runs" log line.claimRunthen finds nothing to claim, and the new boot redeploys production at the tip anyway.Not done.
every+maxWait(25 minutes by default), which stays under the 30-minute threshold.Tests.
test/deploy-orphan-boot.test.tsadds a queued deploy and a queued check, bootsAppsRuntime, and checks that the deploy is cancelled withSTOPPED_SUMMARYwhile the check stays queued. It fails without the change inruntime.ts.bun x tsc --noEmitpasses and the gate shows no failures.merge-crash-recovery,runs-lease,apps-runtime-split,app-runtime-root,deploy-hold-runtime,job-slices.hollow.test.tstimed out once at 88 s while it shared the machine with the runtime suites, and passed alone (28 of 28, 18 s).scripts/fast.tsreached 3,633 test files from this diff, so I picked the tests above myself rather than run them all.How to try it. After this lands and the forge restarts, the merge deploy queued since 02:49:33 reads cancelled with "the forge stopped" (in
GET /api/v1/repos/trevato/forge/runs?kind=deploy), andqueue:deployleaves the degraded list on/settings/capacity.🤖 Generated with Claude Code
Closes #16964