Archilyzer · Source

archilyzer

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

commit f99a74f35da7d8359597bb7c6adad949ea88dd99
parent e1d7e7fadea699bd7efd5cacefad2c0fdf314b75
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 12 Nov 2026 10:36:13 -0500

umtool e2e: the model log's live sweep runs this lane's pipeline -- three kept quotes, one dropped, the meaning checks (D2 round b merge)

model-log.spec (lane/model-log) ran its live sweep over the recorded run of
an older pipeline: two kept quotes and one not verbatim, then the grouping.
This lane's pipeline needs three kept quotes for a report (MIN_KEPT) and
meaning-checks each, so the same answers ended "Nothing usable found" and
the run was over before the page could see it live. The fixture
(e2e/fixtures/run-sweep.ts) now answers by what each request asks: the
recording's terms plus "oven", so a second recording is read; the pie
stream's three verbatim quotes; one not-verbatim item from the second
recording (the dropped quote and its reason); a meaning check per kept quote
(kept, rewritten to its fix, flagged to check by ear); the grouping. The
spec counts eight calls in four phases (terms, reading, meaning-check,
grouping), three kept and one dropped in reading, and the meaning checks'
decisions.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mumtool/e2e/fixtures/run-sweep.ts | 21+++++++++++++++++++--
Mumtool/e2e/model-log.spec.ts | 24+++++++++++++++---------
2 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/umtool/e2e/fixtures/run-sweep.ts b/umtool/e2e/fixtures/run-sweep.ts @@ -38,10 +38,27 @@ if (!article || !Number.isInteger(n) || !articlesDir || !corpusDir) { process.exit(2); } -const run = JSON.parse(await readFile(path.join(RUNS, "sweep-pipeline.json"), "utf8")) as { turns: unknown[] }; +const run = JSON.parse(await readFile(path.join(RUNS, "sweep-pipeline.json"), "utf8")) as { turns: { message: { content: string } }[] }; +// The recorded run (terms, one extract, a meaning check per kept item, the +// grouping), with one more term ("oven") so a second recording is read, whose +// one item is not in its transcript: code drops it (not verbatim), so the log +// has a dropped quote and its reason, beside the recording's three kept ones +// (a report needs three). Each answer is picked by what the request asks. +const t = (content: unknown) => ({ ...run.turns[0]!, message: { ...run.turns[0]!.message, content: typeof content === "string" ? content : JSON.stringify(content) } }); +const meaning = [run.turns[2]!, run.turns[3]!, run.turns[4]!]; +const answerFor = (body: { messages?: { content?: string }[] }) => { + const user = String(body.messages?.at(-1)?.content ?? ""); + if (user.includes("Transcript excerpt:")) { + return /Video: Pie stream/.test(user) ? run.turns[1]! : t({ relevant: true, items: [{ quote: "I entered the contest and I won it this year", claim: "She says she won.", on_topic: true, strength: 3 }] }); + } + if (user.includes("QUOTE: ")) return meaning.shift()!; + if (user.includes("Findings:")) return run.turns[5]!; + return t({ terms: ["contest", "judges", "oven"] }); +}; const ol = await startFakeOllama(); const wait = (ms: number) => new Promise((r) => setTimeout(r, ms)); -ol.push(...run.turns.map((t) => async () => (await wait(delay), t)) as never[]); +// Seven answers: terms, two extracts, three meaning checks, one grouping (a second grouping ask meets an empty script). +ol.push(...Array.from({ length: 7 }, () => async (body: { messages?: { content?: string }[] }) => (await wait(delay), answerFor(body))) as never[]); const dir = existsSync(path.join(corpusDir, "corpus.json")) ? corpusDir : await writeDraftCorpus(corpusDir); const corpus = await createCorpusTools({ source: `local:${dir}` }); const exportIndexDir = path.join(articlesDir, "..", ".export-index-run-sweep"); diff --git a/umtool/e2e/model-log.spec.ts b/umtool/e2e/model-log.spec.ts @@ -64,20 +64,26 @@ test("a local sweep's calls appear live by phase; a dropped quote says why; a ca await shot(page, "run-page-live"); // It ends: every call, in the sweep's phases, the count header says so. await expect(page.locator("[data-run-mode]")).toHaveAttribute("data-run-mode", "replay", { timeout: 60_000 }); - await expect(log(page).locator("[data-model-log-count]")).toHaveAttribute("data-model-log-count", "4", { timeout: 10_000 }); - await expect(log(page).locator("[data-phase]")).toHaveCount(3); - expect(await log(page).locator("[data-phase]").evaluateAll((els) => els.map((e) => e.getAttribute("data-phase")))).toEqual(["terms", "reading", "grouping"]); + await expect(log(page).locator("[data-model-log-count]")).toHaveAttribute("data-model-log-count", "8", { timeout: 10_000 }); + await expect(log(page).locator("[data-phase]")).toHaveCount(4); + expect(await log(page).locator("[data-phase]").evaluateAll((els) => els.map((e) => e.getAttribute("data-phase")))).toEqual(["terms", "reading", "meaning-check", "grouping"]); await expect(log(page).locator("[data-model-log-models]")).toHaveAttribute("data-model-log-models", "qwen3:8b"); await expect(log(page)).toContainText("qwen3:8b (local)"); // The terms call: kept, and what was searched. const terms = log(page).locator("[data-phase=terms] [data-call]"); - await expect(terms.locator("[data-call-decision]")).toContainText("searched for contest, judges"); - // The reading call: two quotes kept, one dropped, and why. + await expect(terms.locator("[data-call-decision]")).toContainText("searched for contest, judges, oven"); + // The reading calls (two recordings): three quotes kept, one dropped, and why. const reading = log(page).locator("[data-phase=reading] [data-call]"); - await expect(reading.locator("[data-item-outcome=kept]")).toHaveCount(2); + await expect(reading).toHaveCount(2); + await expect(reading.locator("[data-item-outcome=kept]")).toHaveCount(3); const dropped = reading.locator("[data-item-outcome=dropped]"); await expect(dropped).toContainText("I entered the contest and I won"); await expect(dropped.locator("[data-item-why]")).toHaveText("why: not verbatim in its window"); + // The meaning check (D2 item 3), a call per kept quote: kept, rewritten to its fix, flagged to check by ear. + const meaning = log(page).locator("[data-phase=meaning-check] [data-call]"); + await expect(meaning).toHaveCount(3); + await expect(meaning.nth(2).locator("[data-call-decision]")).toContainText("flagged: check by ear"); + await expect(meaning.nth(1).locator("[data-item-outcome=rewritten]")).toContainText("She says the judges were friends of hers"); // The second grouping ask met the fake's empty script: shown failed. await expect(log(page).locator("[data-phase=grouping] [data-call]").nth(1).locator("[data-call-answer]")).toContainText("failed:"); await shot(page, "run-page-done"); @@ -96,7 +102,7 @@ test("a local sweep's calls appear live by phase; a dropped quote says why; a ca await expect(calls(page)).toHaveCount(1); await expect(calls(page).first()).toHaveAttribute("data-call-phase", "reading"); await log(page).getByRole("button", { name: /^All/ }).click(); - await expect(calls(page)).toHaveCount(4); + await expect(calls(page)).toHaveCount(8); // The steps are one press away, and the address keeps the pane. await page.getByRole("button", { name: "Steps" }).click(); @@ -106,9 +112,9 @@ test("a local sweep's calls appear live by phase; a dropped quote says why; a ca // The Iterations tab: the count on the toggle, the same log under it. await page.goto(urls.articleHref({ site: "articles", id: SWEEP }, { tab: "iterations" })); const toggle = page.locator("[data-iteration='1'] [data-model-log-toggle]"); - await expect(toggle).toHaveText("Model log · 4"); + await expect(toggle).toHaveText("Model log · 8"); await toggle.click(); - await expect(page.locator("[data-iteration='1'] [data-model-log-count]")).toHaveAttribute("data-model-log-count", "4"); + await expect(page.locator("[data-iteration='1'] [data-model-log-count]")).toHaveAttribute("data-model-log-count", "8"); await shot(page, "iterations-tab"); });