Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 7bcd48c644a69c3713a6341b504726583ac9e8eb
parent 7041fa1a3ae05eb696e9ea100ecd27a4cdfb711c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed,  4 Nov 2026 22:49:29 -0500

umtool: docs for queue-and-poll, and the e2e spec of the queue and the render records

- cli.md: rows for `take status`, `queue …` and `jobs`, UMTOOL_QUEUE_DIR and
  UMTOOL_QUEUE_RUNNER, and "Queue and poll instead of scripting" -- the walk-through a
  cheaper model follows instead of writing a shell chain (queue, poll the exit, read the
  record and its log). knobs.md: the same as a table (terminal / umtool / route).
  report-video.md: every render records itself.
- e2e/run-queue.spec.ts over a new queue-fixture: a take that renders, one that cannot
  (a clip nothing on disk covers) after it, a step after that -- run by the suite's own app;
  the records and exits as the CLI reads them, the Takes panel (the failed first render
  with its error and log, the project's queue), /jobs (reached from the rail), Cancel on
  the blocked step, `umtool jobs`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/docs/cli.md | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Mumtool/docs/knobs.md | 16++++++++++++++++
Mumtool/docs/report-video.md | 13+++++++++++++
Mumtool/e2e/fixtures/make-fixture.mjs | 15+++++++++++++++
Aumtool/e2e/run-queue.spec.ts | 142+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 236 insertions(+), 0 deletions(-)

diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -109,6 +109,10 @@ Inbox cannot disagree about what is wrong with one. | `timeline <project> insert (--after <id\|-> \| --to-section N \| --group G) post-json:<json>\|post-json:@<file> [--id ID]` | **a post item made by hand** — a post no archive holds (one kept only as a picture): `{post: "<channel>/<postId>", author, handle, date, text, media: ["posts-media/…"], parents?, quoted?, subjects?, redact?}`, its media measured, its id `p-<postId>` unless `--id`; refused in the build's words (**exit 1**). Its avatar: `posts avatar <project> <handle> <file>` | | `modules list [--json]` · `modules apply <project> [--config FILE] [--dry-run] [--json]` · `modules apply <project> [--config FILE] --take <id> [--label L] [--at S --dur S \| --full] [--quick] [--force] [--from TAKE] [--keep-frames] [--patch-out FILE]` | the **video modules** (release 39): `list` every module, its kind, slot and where its settings live; `apply` maps the project's `module-config.json` (the modules a video wants, in MODULES-DESIGN's vocabulary) into the manifest's homes (`report-to-video/modules/config-loader.mjs`) — the preset, the deck's subtitle and QR, the counter's series and each clip's marks, the stamps, the rail's markers, the chapters, the pairs, the status ledger, the intro, the finale — and lists every field with no home, by path. Without `--take` the manifest is rewritten through `replaceManifest` (a snapshot first); with `--take` it is that take's patch (`takes/<id>.modules-patch.json`, or `--patch-out`) and the take is made from it as `take` makes one, the manifest untouched. **Exit 1** when the result would not build (the build's sentences) ([knobs.md](knobs.md#look-presets)) | | `preset list [--json]` · `preset show <name> [--json]` · `preset save <name> --from <project> [--description D] [--force]` · `preset apply <name\|none> <project>` | the **look presets** (`umtool/presets/<name>.json`, or `UMTOOL_PRESETS_DIR`): a render block a manifest stands on (`"preset": "<name>"`), laid under it — preset → manifest → style → take patch. `save` keeps a project's look and leaves its content out; `apply` names the preset on the cut through `updatePreset` (nothing copied in), refused when the cut over it would not build ([knobs.md](knobs.md#look-presets)) | +| `take status <project> [--id <take>] [--json] [--log] [--tail N]` | a take's **render record** (`takes/<take>/render.json`, written by every render whoever started it — a terminal, the Takes page, the queue): `state` (`running`, `waiting` at the heavy slot, `done`, `failed`, `cancelled`; `queued` or `blocked` while a queue step waits to render it), `stage` and a rough `percent`, the `error` (the first error line, not a bare "exited 1") and the log's last 40 lines (`tail`), on done the `mp4` and its measured `seconds`; `--log` prints the FULL `takes/<take>/render.log`. A "running" whose process is gone reads **failed** ("the render process is gone"); a done whose mp4 is missing or 0 bytes reads **failed**. **Exit 0 done · 3 queued, waiting or running · 1 failed, cancelled, blocked or none.** Without `--id`: every take with a record, the newest's exit ([queue and poll](#queue-and-poll-instead-of-scripting)) | +| `queue add [--after <qid>\|last] [--label T] [--timeout <minutes>] [--json] -- <umtool subcommand argv…>` | a **step** of the durable queue: the argv of a umtool command, one word per argument (no shell), stored under `<reports root>/.umtool-queue/` and run by the **umtool app** (its systemd unit), one step at a time, in order — so it survives the session that queued it, an app restart and a ship. Prints the qid (`q<N>`) alone on stdout. `--after` waits for that step to be **done**; when it fails or is cancelled this one is **blocked** (and so is whatever waits on it). `--timeout`: the step's limit (default 720 minutes). A step does not start while the app's own job runner is busy (a Takes-page job), and a heavy step still takes the machine's heavy slot and render mode by itself | +| `queue ls [--all] [--json]` · `queue status <qid> [--json]` · `queue wait <qid> [--timeout <s>]` · `queue log <qid> [--tail N]` · `queue cancel <qid>` · `queue retry <qid>` | the queue: `ls` the runner (is the app running it) and the steps not finished or finished in the last 24 h; `status` one step (**exit 0 done · 3 queued or running · 1 failed, blocked or cancelled**); `wait` the same after up to `<s>` seconds (default 90); `log` its FULL log (`logs/<qid>.log`; earlier attempts kept as `<qid>.<n>.log`); `cancel` a queued or blocked step at once, a running one stopped (its process group); `retry` a failed or cancelled step back in the queue with every step blocked behind it. A step that was running when the app died reads **failed** ("the step's process is gone"), its log kept — it is never re-run on its own | +| `jobs [--json]` | every running and recent **take render** across projects (their records), every queue step not finished or finished in the last 24 h, and the umtool app's own jobs (`GET /api/jobs` at `--url` / `UMTOOL_URL`, when it answers). The page is **/jobs** (the rail's *Running* links it) | A project argument is an exact id, a directory, or a **unique** basename. Two projects answering to one name is reported, never resolved by picking one. @@ -141,8 +145,54 @@ from its cwd to `pnpm-workspace.yaml`. | `UMTOOL_BENCH_PREP` | unset = a fetch that lands and a write that moves or adds a clip queue the bench's prep (`prep`); `0` queues nothing (the triggers, `umtool prep` and the Cut tab's button; `prep --wait` still runs) | | `UMTOOL_PRUNE_KEEP`, `UMTOOL_PRUNE_DAYS` | the prune policy's newest-per-group (2) and age (`3d`) when neither `takes/prune.json` nor the command line says (`prune`) | | `UMTOOL_PRUNE_AFTER_BUILD` | unset = a take that is made prunes its project's takes by the policy after; `0` does not | +| `UMTOOL_QUEUE_DIR` | `<REPORTS_DIR>/.umtool-queue`: the durable queue's steps, logs, the runner's lease and the render pointers `jobs` reads ([queue and poll](#queue-and-poll-instead-of-scripting)) | +| `UMTOOL_QUEUE_RUNNER` | unset = the app runs the queue under `next start` (the live unit, the e2e suite's app) and not under `next dev`; `1` runs it anyway, `0` never. One runner per queue dir (its lease, `runner.json`) | | `UMTOOL_DISK_GUARD`, `UMTOOL_DISK_GUARD_GB`, `UMTOOL_DISK_FLOOR_GB` | before a render: under 30 GiB free it prunes every project's takes by policy, under 10 GiB it refuses the render; `UMTOOL_DISK_GUARD=0` turns it off | +## Queue and poll instead of scripting + +**Do not write a shell chain** (`umtool take … | grep | tail; echo DONE`, `until grep -q DONE …`). +mid-13's render died at exit 1 behind exactly that: the grep filtered the error away, the chain +printed DONE anyway, and the next chain read it as success. umtool records every render and runs +a queue; queue the steps, then poll umtool. + +```sh +# 1. Queue the steps (each prints its qid on stdout; the umtool app runs them, in order, one at a time). +q1=$(node umtool/bin/umtool.mjs queue add --label "render mid-14" -- take emberparadox/mr-obvious --id mid-14 --full --priority) +q2=$(node umtool/bin/umtool.mjs queue add --after "$q1" --label "list the takes" -- takes ls emberparadox/mr-obvious) + +# 2. Poll. Exit 0 = done, 3 = still queued or running, 1 = failed / blocked / cancelled. +node umtool/bin/umtool.mjs queue status "$q1" --json # one look: state, exitCode, error, log +node umtool/bin/umtool.mjs queue wait "$q1" --timeout 90 # or wait up to 90 s for it, same exits + +# 3. The render's own record (whoever started it -- the queue, the Takes page or a terminal). +node umtool/bin/umtool.mjs take status emberparadox/mr-obvious --id mid-14 --json +# .state .stage .percent .error .tail (the log's last 40 lines) .mp4 .seconds +node umtool/bin/umtool.mjs take status emberparadox/mr-obvious --id mid-14 --log --tail 80 + +# 4. Everything at once, across projects. +node umtool/bin/umtool.mjs jobs +``` + +- **`--after <qid>` means "when that one is DONE"**. If it fails (or is cancelled), every step + waiting on it is `blocked`, with the reason in `error`. Fix the cause, then + `umtool queue retry <qid>`: the failed step and everything blocked behind it go back in order. +- A step without `--after` does not wait for the step before it: it runs in its turn regardless. + `--after last` waits for the newest step in the queue. +- **Exit codes are the contract**: read the exit (or `.exit` in `--json`), never a word in the + output. A take's render is `done` only when it exited 0 AND wrote a non-empty mp4; a record + that says running while its process is gone reads `failed` ("the render process is gone"). +- A step that was running when the app stopped (a restart, a ship) is `failed` with its log — + never re-run silently. `umtool queue retry <qid>` runs it again. +- The runner is the umtool app. `umtool queue ls` says `runner: NONE` when the app is down: + the steps wait, nothing runs. +- `umtool queue log <qid>` is a step's full log; `take status … --log` is a render's + (`takes/<take>/render.log`). Both are the unfiltered output, nothing grepped. +- Heavy steps (renders) still take the machine's heavy slot and render mode by themselves: + `--priority` on the take, as by hand. Do not wrap a queued step in `pnpm heavy --`. +- The page is **/jobs** (the queue with Cancel and Retry, the take renders, the app's jobs); the + Takes page shows a take's render record and the project's queue. + ## `check` is the one to run before every build ``` diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -1087,6 +1087,22 @@ clip); **not anchored** (written before anchors). Every write and undo is append | clamp a clipped beat; remove or re-point an orphan; anchor a beat that has been looked at | the beat's **Clamp to …**, **Remove the beat**, **Re-point**, **Looked at — anchor to <take>** (an edit or a confirm in the walk re-anchors too) | `trailer-beats <p> --reel R clamp <n>` · `repoint <n> <clip>` · `remove <n>` · `anchor [<n>…] --take <t>` · `--take <t>` on any edit | `{op: "set", index, patch, take}` · `{op: "anchor", only?, take}` | | what changed, when, against which take | -- | `trailer-beats <p> --reel R history [--json]` | `promo/<name>-beats.history.json` | +## Queue a chain of renders, then poll (no shell scripts) + +Every take render writes its own record, whoever started it: `takes/<take>/render.json` (its +state, stage, percent, the error and the log's last lines, the mp4 and its seconds) and the FULL +`takes/<take>/render.log`. A chain of steps — render this, then that, then pick — is the durable +queue the umtool app runs, not a shell loop. [cli.md](cli.md#queue-and-poll-instead-of-scripting) +has the walk-through; in short: + +| | From a terminal | In umtool | Route | +|---|---|---|---| +| queue a step (a umtool command's argv) | `umtool queue add [--after <qid>\|last] [--label T] -- <argv…>` → prints `q<N>` | — (a step is a command line: added from a terminal only) | — | +| one step: state, exit, error, log | `umtool queue status <qid> [--json]` (exit 0 done · 3 going · 1 failed/blocked/cancelled) · `queue wait <qid> --timeout 90` · `queue log <qid>` | **/jobs** → Queue, a step's **log** | `GET /api/queue` · `GET /api/queue/log?qid=` | +| cancel / retry | `umtool queue cancel <qid>` · `umtool queue retry <qid>` (with the steps blocked behind it) | **Cancel** / **Retry** on the step | `POST /api/queue?cancel=<qid>` · `?retry=<qid>` | +| a take's render record | `umtool take status <p> --id <take> [--json] [--log] [--tail N]` (exit 0 done · 3 queued/waiting/running · 1 failed) | the take's card (a render running now, or a later one that failed), **first render failed** above the takes, the project's **Queue** | `GET /api/report/takes/render?project=&take=` (`&log=1` the full log) | +| everything, across projects | `umtool jobs [--json]` | **/jobs** (the rail's *Running*) | `GET /api/queue`, `GET /api/jobs` | + ## Takes: relabel, supersede, cancel, delete, fork as variant, compare | | In umtool | From a terminal | Route | diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md @@ -1988,8 +1988,21 @@ umtool take <project> --id uncensored --label "Uncensored" --set render.blur=off umtool takes make <project> --recipe takes/recipe.json # or --all-styles umtool takes styles umtool takes pick <project> flash [--anyway] +umtool take status <project> --id flash [--json] # its render record: exit 0 done, 3 going, 1 failed +umtool queue add --after q3 -- take <project> --id crisp --set render.crf=34 --full # after q3 is done ``` +**Every render records itself** (`lib/report/renderRecord.mjs`), whoever started it — this page, +a terminal or the queue: `takes/<id>/render.json` (running, waiting at the heavy slot, done, +failed or cancelled; its stage and a rough percent; on failure the first error line and the log's +last 40 lines; on done the mp4 and its measured seconds) and the FULL `takes/<id>/render.log`. +`done` needs exit 0 and a non-empty mp4: a render that exits 0 with no picture, or an empty +one, fails the take before the old preview is replaced. A record that says running while its +process is gone reads failed. The take's card shows a render running now, or a later one that +failed (the take kept is the one before); a first render that failed is listed above the takes +with its error, its log and Delete. A chain of renders is the durable queue +([cli.md](cli.md#queue-and-poll-instead-of-scripting)), not a shell loop. + A take (`lib/report/takeMaker.mjs`): 1. reads the project's `video.manifest.json`, applies the style's patch diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs @@ -2287,6 +2287,21 @@ copyFileSync( path.join(TAKES_MAKE, "out", "clips-raw", "vid1_0.00-9.00.mp4"), ); +// queue-fixture: the durable queue and every render's own record (run-queue.spec.ts, 4 Nov +// 2026). One clip, its window cached (a take of it renders); no takes/ yet. The spec queues a +// take that renders, one that cannot (a clip nothing on disk covers) after it, and a step +// after that -- run by THIS suite's app over the fixture's own queue dir (.umtool-queue). +{ + const dir = writeProject( + "queue-fixture", + manifest("queue-fixture", "The Queue Fixture", { siteOrigin: "https://archive.example" }, [ + { type: "clip", id: "m01", video: "vid1", start: 3, end: 6, cite: 3, section: 0, lock: true, quote: "and because" }, + ]), + ); + mkdirSync(path.join(dir, "out", "clips-raw"), { recursive: true }); + copyFileSync(path.join(REPORT, "out", "clips-raw", "vid1_0.00-9.00.mp4"), path.join(dir, "out", "clips-raw", "vid1_0.00-9.00.mp4")); +} + // -- THE VIDEO-NOTES AND TIMELINE FIXTURES ------------------------------------ // // video-notes-fixture is a GENERATED manifest (`generatedBy`) with a built cut diff --git a/umtool/e2e/run-queue.spec.ts b/umtool/e2e/run-queue.spec.ts @@ -0,0 +1,142 @@ +import { test, expect } from "@playwright/test"; +import { spawnSync } from "node:child_process"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import * as urls from "./urls"; + +// --------------------------------------------------------------------------- +// The apps do the work (operator, 4 Nov 2026): every take render records +// itself, and a durable queue the umtool app runs puts steps in order. +// +// umtool queue add -- take <p> --id good … q1, renders (the fixture's stubs) +// umtool queue add --after q1 -- take <p> --id broken --full --patch-json … +// q2, a clip nothing on disk covers: fails +// umtool queue add --after q2 -- takes ls <p> q3, blocked by q2's failure +// +// run by THIS suite's app (lib/queue/runner.ts, on under `next start`) over the +// fixture's own queue dir. Then the record (`umtool take status`), the Takes +// panel (the failed first render with its error and its log; the project's +// queue) and /jobs (the queue, the renders), and Cancel on the blocked step. +// +// Fixture: queue-fixture (make-fixture.mjs), which this spec WRITES (takes/). +// --------------------------------------------------------------------------- + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const FIXTURE = path.join(HERE, "..", ".e2e-song"); +const PROJECT = "reports/queue-fixture"; + +const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + +function cli(args: string[], base: string) { + const r = spawnSync("node", ["bin/umtool.mjs", ...args], { + cwd: path.join(HERE, ".."), + encoding: "utf8", + env: { ...process.env, REPORTS_DIR: FIXTURE, CHANNELS_DIR: path.join(FIXTURE, "channels"), UMTOOL_CACHE_DIR: path.join(FIXTURE, "cache"), UMTOOL_MEDIA_DIR: "", UMTOOL_URL: base }, + }); + return { code: r.status, out: r.stdout, err: r.stderr }; +} + +/** Poll `umtool queue status <qid>` until it is not 3 (still going). */ +async function settle(qid: string, base: string, ms = 180_000) { + const until = Date.now() + ms; + for (;;) { + const r = cli(["queue", "status", qid, "--json"], base); + if (r.code !== 3) return { code: r.code, step: JSON.parse(r.out) as { state: string; error: string | null; exitCode: number | null } }; + if (Date.now() > until) throw new Error(`${qid} still going after ${ms} ms: ${r.out}`); + await sleep(1000); + } +} + +test("a queued chain runs in order in the app; the failed render records itself; the Takes panel and /jobs show it", async ({ page, baseURL }) => { + test.setTimeout(300_000); + const base = String(baseURL); + + // The app runs the queue. + const ls = cli(["queue", "ls", "--json"], base); + expect(ls.code).toBe(0); + expect((JSON.parse(ls.out) as { runner: { live: boolean } | null }).runner?.live).toBe(true); + + const add = (args: string[]) => { + const r = cli(["queue", "add", ...args], base); + expect(r.code, r.err).toBe(0); + return r.out.trim(); + }; + const q1 = add(["--label", "the good take", "--", "take", PROJECT, "--id", "good", "--label", "Good"]); + const patch = JSON.stringify({ timeline: [{ type: "clip", id: "m09", video: "vid9", start: 1, end: 2, cite: 1, section: 0, lock: true, quote: "nothing here" }] }); + const q2 = add(["--after", q1, "--label", "the broken take", "--", "take", PROJECT, "--id", "broken", "--label", "Broken", "--full", "--patch-json", patch]); + const q3 = add(["--after", "last", "--", "takes", "ls", PROJECT]); + expect([q1, q2, q3]).toEqual([expect.stringMatching(/^q\d+$/), expect.stringMatching(/^q\d+$/), expect.stringMatching(/^q\d+$/)]); + + // While q2 waits, its take reads queued. + const early = cli(["take", "status", PROJECT, "--id", "broken", "--json"], base); + expect([3, 1]).toContain(early.code); // queued (3) -- or, on a fast machine, already failed (1) + + const s1 = await settle(q1, base); + expect(s1.code).toBe(0); + expect(s1.step.state).toBe("done"); + const s2 = await settle(q2, base); + expect(s2.code).toBe(1); + expect(s2.step.state).toBe("failed"); + expect(s2.step.error).toMatch(/take broken: /); + const s3 = await settle(q3, base, 20_000); + expect(s3.code).toBe(1); + expect(s3.step.state).toBe("blocked"); + expect(s3.step.error).toContain(`${q2}, which failed`); + + // The records, as a cheaper model polls them. + const good = cli(["take", "status", PROJECT, "--id", "good", "--json"], base); + expect(good.code).toBe(0); + const goodRec = JSON.parse(good.out) as { state: string; mp4: string; mp4Bytes: number }; + expect(goodRec.state).toBe("done"); + expect(goodRec.mp4).toBe("preview.mp4"); + expect(goodRec.mp4Bytes).toBeGreaterThan(0); + const broken = cli(["take", "status", PROJECT, "--id", "broken", "--json"], base); + expect(broken.code).toBe(1); + const rec = JSON.parse(broken.out) as { state: string; error: string; tail: string[]; exitCode: number }; + expect(rec.state).toBe("failed"); + expect(rec.exitCode).toBe(1); + expect(rec.error).toMatch(/m09/); + expect(rec.tail.length).toBeGreaterThan(0); + + // The Takes panel: the failed first render, in the open, with its error and its log; the project's queue. + await page.goto(urls.takesHref(PROJECT)); + const failed = page.locator("[data-take-failed='broken']"); + await expect(failed).toBeVisible(); + await expect(failed.locator("[data-render-state='failed'] [data-render-error]")).toContainText("m09"); + const logHref = await failed.locator("[data-render-log]").getAttribute("href"); + const log = await page.request.get(String(logHref)); + expect(log.status()).toBe(200); + expect(await log.text()).toMatch(/# failed — .*m09/); + await expect(page.locator("[data-take='good']")).toBeVisible(); + const queue = page.locator("[data-takes-queue]"); + await expect(queue.locator(`[data-queue-step='${q1}']`)).toHaveAttribute("data-queue-state", "done"); + await expect(queue.locator(`[data-queue-step='${q2}']`)).toHaveAttribute("data-queue-state", "failed"); + await expect(queue.locator(`[data-queue-step='${q2}'] [data-queue-error]`)).toContainText("take broken"); + await expect(queue.locator(`[data-queue-step='${q3}']`)).toHaveAttribute("data-queue-state", "blocked"); + const stepLog = await page.request.get(String(await queue.locator(`[data-queue-step='${q2}'] [data-queue-log]`).getAttribute("href"))); + expect(stepLog.status()).toBe(200); + expect(await stepLog.text()).toContain(`# queue ${q2} attempt 1: the broken take`); + + // /jobs: the queue and the renders, across projects; the rail's Running links it. + await page.locator("[data-rail-jobs]").click(); + await expect(page).toHaveURL(/\/jobs$/); + await expect(page.locator("[data-queue-runner='live']")).toBeVisible(); + await expect(page.locator(`[data-panel='queue'] [data-queue-step='${q2}']`)).toHaveAttribute("data-queue-state", "failed"); + await expect(page.locator(`[data-panel='renders'] [data-render-record='broken']`)).toHaveAttribute("data-render-state", "failed"); + await expect(page.locator(`[data-panel='renders'] [data-render-record='broken'] [data-render-error]`)).toContainText("m09"); + await expect(page.locator(`[data-panel='renders'] [data-render-record='good']`)).toHaveAttribute("data-render-state", "done"); + + // Cancel the blocked step from the page: cancelled, and the CLI agrees. + await page.locator(`[data-panel='queue'] [data-queue-step='${q3}'] [data-action='queue-cancel']`).click(); + await expect(page.locator(`[data-panel='queue'] [data-queue-step='${q3}']`)).toHaveAttribute("data-queue-state", "cancelled"); + const after = cli(["queue", "status", q3, "--json"], base); + expect(after.code).toBe(1); + expect((JSON.parse(after.out) as { state: string }).state).toBe("cancelled"); + + // `umtool jobs` lists them all. + const jobs = cli(["jobs", "--json"], base); + expect(jobs.code).toBe(0); + const j = JSON.parse(jobs.out) as { queue: { steps: { qid: string }[] }; renders: { take: string; state: string }[] }; + expect(j.queue.steps.map((s) => s.qid)).toEqual(expect.arrayContaining([q1, q2, q3])); + expect(j.renders.find((r) => r.take === "broken")?.state).toBe("failed"); +});