Archilyzer · Source

archilyzer

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

commit 25a23cd14bd29f183d739899991c4c0a16391276
parent 625ef0d1b45df0af54009714d61ae394ff58f626
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 11 Oct 2026 03:15:42 -0400

umtool e2e: the narration specs count the stub's tts asks from their own start, and the review fixture has words of its own

The editor stub's request log is the suite's, so report-narration.spec read
narration-review.spec's asks as its own when both ran. Each test now counts
from its start; the review fixture's first card speaks different words.

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

Diffstat:
Mumtool/e2e/fixtures/make-fixture.mjs | 2+-
Mumtool/e2e/narration-review.spec.ts | 4++--
Mumtool/e2e/report-narration.spec.ts | 7+++++--
3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs @@ -1395,7 +1395,7 @@ writeProject( writeProject( "narration-review-fixture", manifest("narration-review-fixture", "The Narration Review Fixture", { siteOrigin: "https://archive.example" }, [ - { type: "card", id: "k01", style: "chapter", seconds: "auto", kicker: "2024", heading: "The county", narration: { text: "Six months later, the county said yes." } }, + { type: "card", id: "k01", style: "chapter", seconds: "auto", kicker: "2024", heading: "The county", narration: { text: "Half a year on, the county said yes." } }, { type: "clip", id: "c01", video: "vid1", start: 9.0, end: 12.0, cite: 9, section: 0, lock: true, quote: "another whole sentence" }, { type: "card", id: "k02", style: "chapter", seconds: "auto", heading: "Then", narration: { text: "And then everybody was furious." } }, ]), diff --git a/umtool/e2e/narration-review.spec.ts b/umtool/e2e/narration-review.spec.ts @@ -41,7 +41,7 @@ test("review the narration card by card: approve, reject with a note, edit un-ap await expect(page.locator('[data-review-file="absent"]')).toBeVisible(); // The words beside what the card shows, and the voice. await expect(k1.locator("[data-narration-screen]")).toContainText("The county"); - await expect(k1.locator("[data-narration-text]")).toHaveValue("Six months later, the county said yes."); + await expect(k1.locator("[data-narration-text]")).toHaveValue("Half a year on, the county said yes."); await expect(k1.locator("[data-narration-voice]")).toContainText("kokoro ยท af_heart"); // Approve the first. @@ -70,7 +70,7 @@ test("review the narration card by card: approve, reject with a note, edit un-ap await k1.locator('[data-action="play"]').click(); await expect(k1.locator("[data-narration-audio]")).toBeVisible({ timeout: 60_000 }); const asks = ttsAsks().slice(before); - expect(asks.map((a) => a.text)).toEqual(["Six months later, the county said yes."]); + expect(asks.map((a) => a.text)).toEqual(["Half a year on, the county said yes."]); const audio = await page.request.get(`/api/report/narration/audio?project=${encodeURIComponent(PROJECT)}&card=k01`); expect(audio.status()).toBe(200); expect(audio.headers()["content-type"]).toBe("audio/wav"); diff --git a/umtool/e2e/report-narration.spec.ts b/umtool/e2e/report-narration.spec.ts @@ -53,6 +53,8 @@ const ttsAsks = (): { route?: string; text?: string; engine?: string; voice?: st }; test("the chain asks the editor for the narration before the build", async ({ request }) => { + // The stub's log is the suite's: count from here (another spec may have asked before). + const before = ttsAsks().length; const r = await request.post("/api/report/build?dry=1", { data: { project: PROJECT, preset: "fast" } }); const j = (await r.json()) as { steps: { label: string; argv: string[] }[] }; const scripts = j.steps.map((s) => path.basename(s.argv[1] ?? "")); @@ -60,10 +62,11 @@ test("the chain asks the editor for the narration before the build", async ({ re expect(at).toBeGreaterThan(0); expect(scripts[at + 1]).toBe("build-video.mjs"); // Nothing was asked by a dry run. - expect(ttsAsks()).toHaveLength(0); + expect(ttsAsks()).toHaveLength(before); }); test("a narrated card speaks, its length is the narration's, the plain card is silent, and the exports disclose the voice", async ({ request }) => { + const before = ttsAsks().length; const start = await request.post("/api/report/build", { data: { project: PROJECT, preset: "fast" } }); expect(start.ok()).toBeTruthy(); const { job } = (await start.json()) as { job: Job }; @@ -71,7 +74,7 @@ test("a narrated card speaks, its length is the narration's, the plain card is s expect(done.state, done.error ?? "").toBe("done"); // One ask, the words verbatim, the engine and voice named, the token sent. - const asks = ttsAsks(); + const asks = ttsAsks().slice(before); expect(asks).toHaveLength(1); expect(asks[0]).toMatchObject({ text: "Six months later, the county said yes.", engine: "kokoro", voice: "af_heart", speed: 1,