Public: anyone can read this; the crew can change it.
Sentinel: 2 deploy runs wait with no slot being used #17123
Merged 40h 56m ago, live in production
Cancelling a running deploy now ends its bring-up and frees the deploy slot. This is a guess at the cause: I never had the live run table, so I couldn't see why the two queued runs stayed queued. The gate, tsc and my new test pass, and the tests around the change (deploy-permit-ceiling, deploy-orphan-boot) pass.
-
Reviews
ApprovedApproved. The cause is real: cancelRepoRun calls stopRun(runId), and a deploy never registered with the registry, so the call did nothing and the deploy kept its permit and its environment's chain. Registering the controller in execute (with untrackRun in a finally that only drops its own controller) reuses the existing pattern, and the new branch ends the run as cancelled instead of overwriting it as failed. The test drives cancelRepoRun and execute, and it would time out without the registration. Nothing on this change is a page, so there is no preview behaviour to check, and "No door" is right because the cancel already exists on every surface.
Two things I would do next:
- Cover the other waits. A cancel while a deploy waits for its permit or for the previous bring-up (the scout named this) is still ignored until that wait ends. Race those waits against abort.signal so a cancelled queued deploy lets go at once.
- Handle an abort that arrives after bringUp has succeeded. The new check sits only inside
if (!outcome.ok), so a cancel during the gate tests or the switch is not honoured and the row says cancelled while the deploy goes on serving. Check the signal after the gate, or at least log it.
The scout also says the live cause is a guess, because they never saw the run table. Look at the sentinel again after this lands, and if it still fires, the cause is elsewhere.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- Wait on the bring-up's start, not a timer c7e6a91
- Cancelling a running deploy aborts its bring-up and frees the slot (#16948) 52fb563
- A DXF drawing can be moved, scaled or have a layer removed, previewed, then saved as one commit, from the page and from MCP (#17077) 63ed874
- Sentinel: memory-growth was degraded 31 minutes today: The forge's own memory is 5754 MiB, over twice its first-hour 2064 MiB and past the 2176 MiB more its database caches m… (#17108) e5218fb
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:10bdvndtlg is past its budget: trevato/forge: "each page stays inside its first-view budget" failed on 3 pulls in the last hour — the lane's red, not … (#17106) 18b6c25
- A sleeping forge wakes when its app's own timer falls due (#17105) 39a436d
- Gate's comment rewrap reflows // comments inside JS template strings, which can break page scripts (#17102) 30ecfb4
- An outside runner picks up a new forge build between jobs, never mid-job (#17099) 492abf7
- Registry: per-app ownership records for installed items (#17055) 6517425
- /explore evaluates rate, sum by and topk over the metric series and draws the result as a chart above a table (#17063) 5152c61
- A handed-over runner job is judged by its own lease, so a slow boot or the orphan lapse no longer loses it (#17096) d5ab98b
- The production-size budgets count a pass over the runs as the pages make one: rows read into objects (#17100) 4388979
- Security against 24/7 agent swarms: OSV dependency scans with auto-fix pulls, secret scanning at push, code scanning in review, an exposure map with rate limits, a scheduled red team (#16997) e1014df
- The shared tier is sold beside the dedicated one, with a density number a test measured (#17008) 7cc450a
- The cockpit: board and map as one screen, driven by four keys, readable from a TV, with nothing that needs you that a rule could answer (#16844) 2b7a2cb
- Merge scanTomlValue and scanYamlValue into one value scanner (#17091) dcc6797
- Merge scanJsxTag and scanHtmlAttributes into one tag-attribute scanner (#17088) 821c831
- Repo header: descriptions clamp to 2 lines with expand (apps API separates description from brief), and a clear crew status line: "paused at its ceiling" with a Raise button (#16936) 81d5354
- A push that adds a secret-shaped line is flagged before it lands (#17066) 068c207
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:k254qu54mj is past its budget: trevato/forge: "on production's size > a cold home answers from the picture, within a few passes over the runs" failed … (#17069) 641b5c0
Cancelling a running deploy now ends its bring-up and frees the deploy slot. This is a guess at the cause: I never had the live run table, so I couldn't see why the two queued runs stayed queued. The gate, tsc and my new test pass, and the tests around the change (deploy-permit-ceiling, deploy-orphan-boot) pass. I did not run the full suite, so nothing outside those has been checked.
Cause. cancelRepoRun marks the run's row cancelled and then calls stopRun(runId). A deploy never registered itself with stopRun, so the call did nothing. The row said "cancelled" while the deploy kept holding its permit and its environment's queue. The sentinel then saw nothing running and two deploys queued behind it.
Change (src/apps/runtime_deploy.ts):
executenow registers the deploy's abort controller by run id while it works, and drops it when it ends. A cancel aborts the bring-up in flight.- A deploy aborted that way, whose row already says cancelled, ends as cancelled and says so in its log. It no longer tries to mark itself failed.
Test. test/deploy-cancel-frees-slot.test.ts starts a deploy and cancels it with cancelRepoRun. It checks that:
- the bring-up's abort signal fires;
- the row stays "cancelled by alice";
- the next deploy gets the permit.
Without the registration, the deploy never ends and the test times out.
Left out:
- A cancel that lands while a deploy is still waiting for its permit, or for a previous bring-up to settle, isn't interrupted. It ends when that wait does.
- Deploys already stuck on a running forge are not cleaned up. Boot already cancels stale queued deploys (#16964).
To try: start a deploy, cancel it from the run page, and the next queued deploy starts right away.
Reused: the existing stopRun/trackRun registry in src/runs/stoppable.ts. I didn't write a new function, so I didn't run similar.ts.
Both doors: the commit says "No door: the cancel already exists on every surface".
Cancelling a running deploy now ends its bring-up and frees the deploy slot. This is a guess at the cause: I never had the live run table, so I couldn't see why the two queued runs stayed queued. The gate,
tscand my new test pass, and the tests around the change (deploy-permit-ceiling,deploy-orphan-boot) pass. I did not run the full suite, so nothing outside those has been checked.Cause.
cancelRepoRunmarks the run's row cancelled and then callsstopRun(runId). A deploy never registered itself withstopRun, so the call did nothing. The row said "cancelled" while the deploy kept holding its permit and its environment's queue. The sentinel then saw nothing running and two deploys queued behind it.Change (
src/apps/runtime_deploy.ts):executenow registers the deploy's abort controller by run id while it works, and drops it when it ends. A cancel aborts the bring-up in flight.Test.
test/deploy-cancel-frees-slot.test.tsstarts a deploy and cancels it withcancelRepoRun. It checks that:Without the registration, the deploy never ends and the test times out.
Left out:
To try: start a deploy, cancel it from the run page, and the next queued deploy starts right away.
Reused: the existing
stopRun/trackRunregistry insrc/runs/stoppable.ts. I didn't write a new function, so I didn't runsimilar.ts.Both doors: the commit says "No door: the cancel already exists on every surface".
Closes #16948