commit ca6bc9c50b2ae853c17ab4b88153ef21da10c7dd
parent 840dbdd9eecfeb00a82957a96d785cd83133330f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 28 Sep 2026 13:34:24 -0400
changelog: a queued cancel's stale sidecar re-queued on restart and misreported a clip fetch — /jobs never listed it as queued (W1 review should-fix)
The item-5 bullet claimed /jobs listed an evicted cancelled job as queued
again. It never did: a job cancelled while queued opened no log, so once
evicted it is not listed, and a non-terminal meta reads "archived". The
real consequences were the boot pass re-queueing it and
/api/media/fetch-window/<id> (MCP fetch_clip) reporting a cancelled fetch
as still queued. Same correction in the record and the sites-homepage
spec's comment (bafc953c's message repeats the old claim; left as is).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -4,7 +4,7 @@
- **A Retry on the Diagnostics stage keeps its log when it empties its bucket.** Retrying the **Missing metadata.info.json**, **Archived ID with no directory** or **Skipped: live or upcoming** card, or the **Needs auth** or **Error** availability card, made the card vanish as soon as its bucket emptied, and the retry's log went with it. The card now stays until you leave the page, with its button greyed out at **Retry (0)**. A reload drops it, as before. The Download stage's cards have worked this way since 0.10.0.
- **The "built <when>" line in the Homepage section of `/sites` updates after a build.** When a **Build homepage** or **Build & deploy homepage** lane ends, the page re-renders, so the line says what **Deploy homepage** would ship now. It used to keep saying what `homepage/out` held when the page loaded. This happens whether the build succeeds, fails or is cancelled, because a failed build may already have changed `homepage/out`.
- **`/jobs` names the hub's and the homepage's jobs.** They show as **Build hub**, **Deploy hub**, **Build & deploy hub**, **Build homepage**, **Deploy homepage** and **Build & deploy homepage**, not as `build-hub`, `build-homepage` and so on.
-- **A job cancelled before it started now stays cancelled.** Its record on disk kept saying "queued". Once the editor had forgotten the job (after a restart, or a hundred newer jobs), `/jobs` listed it as queued again, and a restart could put a job you had just cancelled back in its queue. Jobs still waiting when the editor shuts down are handled as before: the next start settles or re-queues them.
+- **A job cancelled before it started now stays cancelled.** Its record on disk kept saying "queued", so a restart could put a job you had just cancelled back in its queue, and a clip fetch cancelled while waiting could be reported as still queued. Jobs still waiting when the editor shuts down are handled as before: the next start settles or re-queues them.
## [0.10.0] - 2026-09-28
- **The homepage can be built and deployed from `/sites`.** Under a new **Homepage** section, after Hub, there is **Build homepage** (tick **Deploy after build** to ship it in the same job, only if the build succeeds) and **Deploy homepage**, which ships the build already in `homepage/out`. A **Preview branch** box beside them sends either deploy to a Cloudflare Pages preview of the `archilyzer` project instead of production, and shows the preview's address as you type; a name Cloudflare would refuse or rewrite, or `main`, greys the deploy buttons out and says why. A line under the buttons says what a deploy would ship: when `homepage/out` was built (or that it holds no build yet), and where it goes, with the live URL. Deploy homepage with nothing built is refused before any job starts. The homepage reads the search index as it stands, so run **Build index** first when its numbers should move. The jobs run the same code as `archilyzer build homepage` / `deploy homepage`, and show on `/jobs` as `build-homepage`, `deploy-homepage` and `build-deploy-homepage`. The Hub section no longer describes the homepage.
diff --git a/editor/e2e/sites-homepage.spec.ts b/editor/e2e/sites-homepage.spec.ts
@@ -214,8 +214,8 @@ test("Build homepage starts a build-homepage job on the build queue (held there,
expect(await pathExists(`test-transcripts/.jobs/${job.id}.log`)).toBe(false);
// …and its sidecar says so too (release 13 slice W1). A job cancelled while
// queued used to keep the "queued" its enqueue wrote: the cancel path never
- // rewrote the meta, so once the registry forgot the job (a restart, or 100
- // newer ones) /jobs read it back as still queued.
+ // rewrote the meta, so a restart's boot pass could re-queue a job the
+ // operator had cancelled, and a cancelled clip fetch could read as queued.
await expect
.poll(async () => (await metasOfKind("build-homepage"))[0]?.status)
.toBe("cancelled");
diff --git a/plans/release-13.md b/plans/release-13.md
@@ -128,8 +128,10 @@ job's `tmp/overnight`.
`streamCommand.ts`, `shutdownCancel.ts`).
- **The bug.** `onCancel` only closed the stream and settled `done`, and `registry.cancel()` marked
the record terminal only after `scheduler.cancel()` had fired it. The sidecar kept its enqueue's
- `queued`. `/jobs` read an evicted one back as queued, and the release-9 boot pass could
- **re-queue a job the operator had cancelled** (the newest of its spec, under 24 h).
+ `queued`. So the release-9 boot pass could **re-queue a job the operator had cancelled** (the
+ newest of its spec, under 24 h), and `/api/media/fetch-window/<id>` (MCP `fetch_clip`) could
+ report a cancelled, evicted fetch as still `queued`. (`/jobs` never showed it as queued: such a
+ job opened no log, so once evicted it is not listed, and a non-terminal meta reads "archived".)
- **The fix.** `registry.cancel()` marks a queued record terminal (`markTerminal`, now shared with
`finalize`) BEFORE `scheduler.cancel()`. `finalize()` cannot go first: its `scheduler.complete`
would drop the entry without firing `onCancel`, and `done` would never settle. Both `onCancel`s