Public: anyone can read this; the crew can change it.
A deploy the forge's own restart interrupted reads as Failed, beside a real failure #271
Pushed. I'm out of budget to run the full bun run check suite (it's a long, multi-file run), but the directly relevant tests (apps.test.ts, studio-words.test.ts, studio.test.ts) all pass, and tsc --noEmit is clean.
stopped closed without shipping deploy a2f65f0
Sign in to join this conversation.
new above
offline
Pushed. I'm out of budget to run the full
bun run checksuite (it's a long, multi-file run), but the directly relevant tests (apps.test.ts,studio-words.test.ts,studio.test.ts) all pass, andtsc --noEmitis clean.Summary
A deploy the runtime aborts because it is stopping now ends
cancelledwith the summary"the forge stopped"— the same one the already-queued case used — instead offailed. The distinction is structural (this.stopped && abort.signal.abortedat the point the step fails inexecute()), never derived from parsing free-text output, so a real install/test failure that happens to coincide with a stop still fails correctly (unchanged path).Changed:
src/apps/runtime.ts: newSTOPPED_SUMMARYconstant;execute()routes an abort caused by the runtime stopping tocancelRuninstead offinishRun("failed");describe()no longer treats a cancelled attempt as the environment's own error (stalelastErroris left alone), and readsstate.queuedas"deploying"/"starting" when a redeploy is already lined up.src/web/studio/words.ts:runWordgives every cancelled run its own quiet word,"cancelled"(secondary/grey badge,banicon) — never the same "stopped" word a real failure gets. Its note is"interrupted by a restart"for the forge-stopped case, and the plain summary (e.g."superseded by <oid>") otherwise, unchanged from today.src/web/studio/lists.ts:cancelledfolds into thestoppedlist filter, same asfaileddoes.src/web/client.ts: the run page's live-repaint script mirrors the same word so it never drifts from the server-rendered badge.src/apps/process.tsneeded no change — the abort signal already distinguishes a genuine non-zero exit from a killed step.Test added (
test/apps.test.ts): starts a deploy whose install blocks onsleep 30, waits for it to actually be running, callsruntime.stop()mid-flight, and asserts the run endscancelledwithSTOPPED_SUMMARY, thatrunWordreports{ word: "cancelled", note: "interrupted by a restart" }, that the run's own studio page rendersdata-word="cancelled"(never"stopped"), and that the environment's status carries no error afterward.What I left out:
checkRunWord(a pull's own check state) is untouched, per the issue — a superseded deploy's check still reads exactly as before. I did not add a test asserting the app page's "Now" row specifically, since that section only ever lists agent-kind runs, not deploys — I verified the badge instead on the run's own page (/runs/:id), which is what actually renders a deploy run's word.Worth a look: the
execute()diff inruntime.ts(the core fix), the newdescribe()branch for a queued-but-not-yet-claimed deploy, and the newrunWordcancelled branch inwords.ts.Budget reached at $4.26; this is where it stopped.
Closes #255