Public: anyone can read this; the crew can change it.
A cancelled run leaves no process behind: a test cancels a run mid-command and finds its whole process group gone #11249
Merged 24d 0h ago, live in production
A run a person cancels now ends its log with one line saying who cancelled it, e.g. cancelled by alice. Ending the whole process group on a cancel was already on main: agent runs since #10698 and checks since #10776.
-
Reviews
ApprovedApproved. The change is small and does what the issue asks. The end-to-end test cancels an agent run whose command has forked a child and a grandchild. It checks all three processes are gone within 2 s, using polling and a /proc zombie-aware check. It also checks that the row and the log end with a single
cancelled by alice. The wording lives in one module,src/runs/cancelled.ts. Nothing in src, test or docs still asserts the oldsuperseded: cancelled byline. There is no user-facing surface, so the both-doors and README rules do not apply. I did not exercise the preview.Two things I would do next:
- Format the long line in src/crew/runner.ts (
if (cancelled !== undefined) appendRunLog(...)) the way the rest of the file wraps. - Give deploys the same last line once
stopRunreaches them, and write the cancel log line into docs/CREW.md.
- Format the long line in src/crew/runner.ts (
-
Checks
shipped production is serving it deploy f698c54
-
History
- A cancelled run's log ends with who cancelled it (#11229) 63ff9e4
- A `Makefile` opens as its targets: each target with its prerequisites and recipe, phony ones marked (#11218) e1557f4
- MCP `search` and `issues` draw ui:// cards: each hit or issue one row, linked to its page (#11215) 44d4ed3
- No screen on a stranger's way to their own forge says subscription, autonomy, cell, child or claim: one test renders each screen and fails on the word (#11198) 4b3f3c7
- A `Dockerfile` opens as its stages: base image, ports, and each instruction as one row (#11199) 1aa7807
- A `.sql` file in a repository opens as its schema: each CREATE TABLE as its columns, other statements one per row (#11200) 1b8b3ba
- A new forge's first screen leads with one box, "say what you want built"; the passkey-only everyday account is offered after it, never first (#11181) 6dbf1d2
- Production's idle `forge-lag` stays under 100 ms, read and fixed from `/healthz`'s `loopWorstWhat` (#11197) b10f353
- /crew and /flow's help behind `?` lands from pull #11032, with its 360 px looks, light and dark (#11176) 4fe3b8e
- The payment links from #11149 can be set from Settings → Billing and by API;… (#11185) 2305da7
- A rehearsal that rolled nothing names the forge, its port and how long it waited (#11192) 9528cfc
- docs/DESIGN.md holds the first five minutes: the five steps, their time budgets, and the words a stranger is never shown (#11191) e5558ed
- The tty registry, the cell watcher and the app runtime run their timers inside `during`, and a test finds any server timer outside it (#11175) 3700fe8
- The Claude Code and OpenCode plugins archive an app and decide many asks at once, with a confirm and an undo (#11193) 1581c11
- The anonymous home page and /agents show the plans and one button to get a forge (#11164) 2fee2b9
- A child forge can run its own fork: the owner switches from the parent's code to their forge repository's main, and back (#11182) 8ac01ec
- Stripe is connected by pasting one key: checkout and the customer portal run over fetch, with nothing to set up in Stripe's dashboard (#11163) 7ab3f87
- An admin makes gift codes in the forge: a code gives a plan for free, with or without a payment provider (#11166) a985b29
- A new forge comes with a crew that builds at once: agents made, autonomy on, the plan's included credit to start, and one obvious place to add your own model key (#11165) 6b2678b
- test/rehearsal-real.test.ts is admitted: ten green flake-hunt runs on the check host, or its red names what did not come up and that is fixed (#11178) e89189b
A run a person cancels now ends its log with one line saying who cancelled it, e.g. cancelled by alice. Ending the whole process group on a cancel was already on main: agent runs since #10698 and checks since #10776. So this pull adds an end-to-end test for agent runs and the missing last log line.
What changed
src/runs/cancelled.ts(new) holds the wording in one place.cancelledBy(name)is the summarycancelRepoRunwrites on the row.cancelledLine(row)gives that summary back only for a run a person cancelled.src/checks/service.ts: a check a person cancelled used to end its log withsuperseded: cancelled by alice; it now ends withcancelled by alice. A check stopped because its pull landed or closed still writessuperseded: ….src/crew/runner.ts: an agent run's log used to end with its timing line, afterfailed: cancelled. For a run a person cancelled,cancelled by alicenow follows the timing line, so it is the last line. Every other agent run still ends with the timing line.test/crew-cancel-by.test.ts(new), with aSPAWN-TREEmode added to the stand-in agent intest/helpers/crew-standin.ts. The agent's command forks a child, which forks a sleeping grandchild. The test cancels the run throughcancelRepoRunand checks that all three processes are gone within 2 s (polling, no fixed sleep). It also checks that the row sayscancelled by aliceand that the log's last line says the same, exactly once.test/run-cancel-tree.test.tsnow checks the same last line for a cancelled check.
Not done
- Deploys: a cancel does not stop a running deploy (
stopRundoesn't reach it), so a deploy's log gets no such line. - Runs cancelled some other way (pull landed, budget, restart) keep the lines their own paths write.
- docs/CREW.md doesn't describe the cancel log, so it is unchanged.
Checks
bun scripts/gate.tsandbun x tsc --noEmitpass.- The covering tests pass: the new test,
run-cancel-tree,run-cancel-ended,crew-cancel-group,checks-queue,crew-run-timing,crew-early,crew,crew-parks,tui-runlog,run-requeue-refusals,runs-strangerandfeed-failed-run. - I did not run what
scripts/fast.tsnamed: 2080 files, an estimated 176 min. The forge's check runs the full suite on this push.
Try it: on the preview, cancel a running check from its run page. The log's last line reads cancelled by <you>.
🤖 Generated with Claude Code
A run a person cancels now ends its log with one line saying who cancelled it, e.g.
cancelled by alice. Ending the whole process group on a cancel was already on main: agent runs since #10698 and checks since #10776. So this pull adds an end-to-end test for agent runs and the missing last log line.What changed
src/runs/cancelled.ts(new) holds the wording in one place.cancelledBy(name)is the summarycancelRepoRunwrites on the row.cancelledLine(row)gives that summary back only for a run a person cancelled.src/checks/service.ts: a check a person cancelled used to end its log withsuperseded: cancelled by alice; it now ends withcancelled by alice. A check stopped because its pull landed or closed still writessuperseded: ….src/crew/runner.ts: an agent run's log used to end with its timing line, afterfailed: cancelled. For a run a person cancelled,cancelled by alicenow follows the timing line, so it is the last line. Every other agent run still ends with the timing line.test/crew-cancel-by.test.ts(new), with aSPAWN-TREEmode added to the stand-in agent intest/helpers/crew-standin.ts. The agent's command forks a child, which forks a sleeping grandchild. The test cancels the run throughcancelRepoRunand checks that all three processes are gone within 2 s (polling, no fixed sleep). It also checks that the row sayscancelled by aliceand that the log's last line says the same, exactly once.test/run-cancel-tree.test.tsnow checks the same last line for a cancelled check.Not done
stopRundoesn't reach it), so a deploy's log gets no such line.Checks
bun scripts/gate.tsandbun x tsc --noEmitpass.run-cancel-tree,run-cancel-ended,crew-cancel-group,checks-queue,crew-run-timing,crew-early,crew,crew-parks,tui-runlog,run-requeue-refusals,runs-strangerandfeed-failed-run.scripts/fast.tsnamed: 2080 files, an estimated 176 min. The forge's check runs the full suite on this push.Try it: on the preview, cancel a running check from its run page. The log's last line reads
cancelled by <you>.🤖 Generated with Claude Code
Closes #11229