commit 6e9335e517a88b52a5a8452fcf39106561fdbe00
parent 683118e56daaff13b843071819176bf7e28ab4ea
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 02:23:41 -0400
umtool: the verdict bench moves to /tools/bench; r28's specs follow the /projects redirect
/bench → /tools/bench (307). Two r28 specs asserted the URL a /browse link
lands on; it lands on /projects now (their hrefs ride the redirect, unedited).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
8 files changed, 319 insertions(+), 309 deletions(-)
diff --git a/umtool/app/bench/page.tsx b/umtool/app/bench/page.tsx
@@ -1,305 +0,0 @@
-import Link from "next/link";
-import BrowseHeader from "@/components/BrowseHeader";
-import BarForm from "@/components/bench/BarForm";
-import { badgeVariants } from "@/components/ui/badge";
-import {
- BASELINE_MODEL,
- VERDICTS,
- filterBenchRows,
- passesBar,
- readBenchRuns,
- readBenchView,
- readVerdictsPolicy,
-} from "@/lib/bench";
-import type { ModelScore } from "yt-dlp-transcript-common/lib/report/draft/bench/index";
-import type { GenerationVerdicts } from "yt-dlp-transcript-common/lib/generationSettings";
-
-export const dynamic = "force-dynamic";
-
-// THE VERDICT BENCH (release 28 M7): could a model propose a fact-check
-// verdict well enough to be worth a review? One run at a time: per model its
-// agreement with the operator's rulings and its CONTRADICTED and NOT_FOUND
-// recall beside the always-CORROBORATED baseline, its cost; the confusion
-// matrix; every item with each model's verdict and reason, disagreements
-// first. The bar (settings.generation.verdicts) is set here, and each model's
-// pass or fail read against it — the handoff for the verdict proposals. The
-// runs are local-only (`archilyzer reports bench-verdicts`); zero client JS
-// but the bar's form.
-
-type Search = { run?: string; model?: string; verdict?: string };
-
-const pct = (v: number | null) => (v === null ? "—" : `${Math.round(v * 1000) / 10}%`);
-
-export default async function BenchPage({ searchParams }: { searchParams: Promise<Search> }) {
- const sp = await searchParams;
- const runs = await readBenchRuns();
- const id = sp.run && runs.some((r) => r.id === sp.run) ? sp.run : runs[0]?.id;
- const view = id ? await readBenchView(id) : null;
- let policy: GenerationVerdicts | null = null;
- let policyError: string | null = null;
- try {
- policy = await readVerdictsPolicy();
- } catch (e) {
- policyError = (e as Error).message;
- }
- const qs = (next: Partial<Search>) => {
- const p = new URLSearchParams();
- for (const [k, v] of Object.entries({ ...sp, run: id, ...next })) if (v) p.set(k, String(v));
- return `/bench?${p.toString()}`;
- };
-
- return (
- <div className="flex h-full flex-col">
- <BrowseHeader
- active="articles"
- crumbs={[{ label: "articles", href: "/articles" }, { label: "verdict bench" }]}
- note={`${runs.length} run${runs.length === 1 ? "" : "s"}`}
- />
- <main className="deck-main flex-1 p-4 text-[12px]">
- {runs.length === 0 ? (
- <p className="text-[var(--color-dim)]">
- no bench runs — <code className="font-mono">archilyzer reports bench-verdicts --models …</code>
- </p>
- ) : (
- <>
- <nav aria-label="runs" className="mb-3 flex flex-wrap items-center gap-1.5">
- <span className="micro">run</span>
- {runs.map((r) => (
- <Link
- key={r.id}
- href={`/bench?run=${r.id}`}
- data-run={r.id}
- aria-current={r.id === id ? "true" : undefined}
- className={badgeVariants({ variant: r.id === id ? "on" : "neutral" })}
- >
- {r.id} · {r.status} · {r.items}
- </Link>
- ))}
- </nav>
- {!view ? (
- <p role="alert" className="text-[var(--color-bad)]">
- run {id} cannot be read
- </p>
- ) : (
- <RunView view={view} policy={policy} policyError={policyError} sp={sp} qs={qs} />
- )}
- </>
- )}
- </main>
- </div>
- );
-}
-
-function RunView({
- view,
- policy,
- policyError,
- sp,
- qs,
-}: {
- view: NonNullable<Awaited<ReturnType<typeof readBenchView>>>;
- policy: GenerationVerdicts | null;
- policyError: string | null;
- sp: Search;
- qs: (n: Partial<Search>) => string;
-}) {
- const { summary: s, score } = view;
- const bar = policy?.bar ?? null;
- const rows = filterBenchRows(view.items, { model: sp.model, verdict: sp.verdict });
- const models = sp.model ? s.models.filter((m) => m === sp.model) : s.models;
- return (
- <div data-bench-run={s.id} data-status={s.status} className="flex flex-col gap-4">
- <p role="status" className="text-[var(--color-dim)]">
- {s.status} · {s.items} items · {s.skipped.length} skipped · a {s.windowS} s window · ${s.spentUsd.toFixed(4)} of ${s.maxUsd} ·{" "}
- {new Date(s.createdAt).toISOString().slice(0, 16).replace("T", " ")} UTC
- {s.stopped?.length ? ` · stopped: ${s.stopped.join("; ")}` : ""}
- </p>
- <section aria-label="models" className="flex flex-wrap gap-2">
- {[...score.models, score.baseline].map((m) => (
- <ModelTile key={m.model} m={m} baseline={m.model === BASELINE_MODEL ? null : score.baseline} pass={bar && m.model !== BASELINE_MODEL ? passesBar(m, bar) : null} />
- ))}
- </section>
- <section aria-label="the bar" className="rounded border border-[var(--color-line)] bg-[var(--color-panel)] p-3">
- {policy ? (
- <BarForm initial={policy} models={score.models} />
- ) : (
- <p role="alert" className="text-[var(--color-bad)]">
- the bar cannot be read: {policyError}
- </p>
- )}
- </section>
- <section aria-label="confusion" className="flex flex-wrap gap-4">
- {score.models.map((m) => (
- <Matrix key={m.model} m={m} />
- ))}
- </section>
- <section aria-label="items">
- <div className="mb-2 flex flex-wrap items-center gap-1.5">
- <span className="micro">model</span>
- <Chip href={qs({ model: "" })} on={!sp.model} label="all" />
- {s.models.map((m) => (
- <Chip key={m} href={qs({ model: m })} on={sp.model === m} label={m} />
- ))}
- <span className="micro ml-3">operator</span>
- <Chip href={qs({ verdict: "" })} on={!sp.verdict} label="all" />
- {VERDICTS.filter((v) => score.ruled[v] > 0).map((v) => (
- <Chip key={v} href={qs({ verdict: v })} on={sp.verdict === v} label={`${v} ${score.ruled[v]}`} />
- ))}
- </div>
- <table className="w-full border-collapse">
- <thead>
- <tr className="micro text-left">
- <th className="py-1 pr-2">claim</th>
- <th className="py-1 pr-2">operator</th>
- {models.map((m) => (
- <th key={m} className="py-1 pr-2 font-mono">
- {m}
- </th>
- ))}
- </tr>
- </thead>
- <tbody>
- {rows.map((r) => (
- <tr key={r.key} data-item={r.key} data-disagree={r.disagree.length ? r.disagree.join(" ") : undefined} className="border-t border-[var(--color-line)] align-top">
- <td className="max-w-[28rem] py-1.5 pr-2">
- <div className="font-mono text-[10px] text-[var(--color-dim)]">{r.key}</div>
- {r.text}
- </td>
- <td className="py-1.5 pr-2 font-mono">{r.verdict}</td>
- {models.map((m) => {
- const a = r.answers[m];
- return (
- <td key={m} data-model={m} data-verdict={a?.verdict ?? "none"} className="max-w-[20rem] py-1.5 pr-2">
- {!a ? (
- <span className="text-[var(--color-dim)]">not asked</span>
- ) : a.verdict ? (
- <>
- <span className={`font-mono ${a.verdict === r.verdict ? "text-[var(--color-good)]" : "text-[var(--color-bad)]"}`}>{a.verdict}</span>
- {a.reason && <div className="text-[var(--color-dim)]">{a.reason}</div>}
- </>
- ) : (
- <span className="text-[var(--color-bad)]">
- {a.failure}: {a.error}
- </span>
- )}
- </td>
- );
- })}
- </tr>
- ))}
- </tbody>
- </table>
- </section>
- {s.skipped.length > 0 && (
- <details>
- <summary className="micro cursor-pointer">skipped {s.skipped.length}</summary>
- <ul aria-label="skipped" className="mt-1 flex flex-col gap-0.5">
- {s.skipped.map((k) => (
- <li key={k.key} className="font-mono text-[var(--color-dim)]">
- {k.key} — {k.reason}
- </li>
- ))}
- </ul>
- </details>
- )}
- </div>
- );
-}
-
-function ModelTile({ m, baseline, pass }: { m: ModelScore; baseline: ModelScore | null; pass: { pass: boolean; misses: string[] } | null }) {
- const vs = (v: number | null, b: number | null | undefined) => (baseline ? `${pct(v)} (baseline ${pct(b ?? null)})` : pct(v));
- return (
- <div
- data-model={m.model}
- data-pass={pass ? String(pass.pass) : undefined}
- className="min-w-[15rem] rounded border border-[var(--color-line)] bg-[var(--color-panel)] p-2"
- >
- <div className="mb-1 flex items-center gap-2">
- <span className="font-mono text-[var(--color-text)]">{m.model}</span>
- {pass && (
- <span className={badgeVariants({ variant: pass.pass ? "on" : "blocking", size: "sm" })} title={pass.misses.join("; ") || undefined}>
- {pass.pass ? "passes" : "fails"} the bar
- </span>
- )}
- </div>
- <dl className="grid grid-cols-[auto_1fr] gap-x-2 gap-y-0.5">
- <dt className="text-[var(--color-dim)]">agreement</dt>
- <dd data-metric="agreement">{vs(m.agreement, baseline?.agreement)}</dd>
- <dt className="text-[var(--color-dim)]">with PARTLY ~ CORROBORATED</dt>
- <dd>{vs(m.agreementAdjacent, baseline?.agreementAdjacent)}</dd>
- <dt className="text-[var(--color-dim)]">CONTRADICTED recall</dt>
- <dd data-metric="contradicted">
- {vs(m.recall.CONTRADICTED.recall, baseline?.recall.CONTRADICTED.recall)} of {m.recall.CONTRADICTED.ruled}
- </dd>
- <dt className="text-[var(--color-dim)]">NOT_FOUND recall</dt>
- <dd data-metric="not-found">
- {vs(m.recall.NOT_FOUND.recall, baseline?.recall.NOT_FOUND.recall)} of {m.recall.NOT_FOUND.ruled}
- </dd>
- <dt className="text-[var(--color-dim)]">PARTLY recall</dt>
- <dd>
- {pct(m.recall.PARTLY.recall)} · adjacent {pct(m.recall.PARTLY_ADJACENT.recall)}
- </dd>
- {baseline && (
- <>
- <dt className="text-[var(--color-dim)]">cost</dt>
- <dd data-metric="cost">${m.usd.toFixed(4)}</dd>
- <dt className="text-[var(--color-dim)]">latency</dt>
- <dd>{m.latency.medianMs === null ? "—" : `${(m.latency.medianMs / 1000).toFixed(1)} s median, ${((m.latency.p90Ms ?? 0) / 1000).toFixed(1)} s p90`}</dd>
- <dt className="text-[var(--color-dim)]">answered</dt>
- <dd>
- {m.answered} of {m.asked}
- {m.parseFailures ? ` · ${m.parseFailures} parse failures` : ""}
- {m.errors ? ` · ${m.errors} errors` : ""}
- </dd>
- </>
- )}
- </dl>
- </div>
- );
-}
-
-function Matrix({ m }: { m: ModelScore }) {
- return (
- <table aria-label={`confusion ${m.model}`} className="border-collapse font-mono text-[11px]">
- <caption className="micro mb-1 text-left">
- {m.model} — rows: operator, columns: model
- </caption>
- <thead>
- <tr>
- <th />
- {VERDICTS.map((v) => (
- <th key={v} className="px-1.5 py-0.5 text-[var(--color-dim)]" title={v}>
- {v.slice(0, 4)}
- </th>
- ))}
- <th className="px-1.5 py-0.5 text-[var(--color-dim)]">none</th>
- </tr>
- </thead>
- <tbody>
- {VERDICTS.map((op, i) => (
- <tr key={op}>
- <th className="pr-1.5 text-left text-[var(--color-dim)]">{op}</th>
- {VERDICTS.map((v, j) => (
- <td
- key={v}
- data-cell={`${op}:${v}`}
- className={`border border-[var(--color-line)] px-1.5 py-0.5 text-right ${i === j && m.matrix[i]![j]! > 0 ? "text-[var(--color-good)]" : m.matrix[i]![j]! > 0 ? "text-[var(--color-text)]" : "text-[var(--color-dim)]"}`}
- >
- {m.matrix[i]![j]}
- </td>
- ))}
- <td className="border border-[var(--color-line)] px-1.5 py-0.5 text-right text-[var(--color-dim)]">{m.unanswered[i]}</td>
- </tr>
- ))}
- </tbody>
- </table>
- );
-}
-
-function Chip({ href, on, label }: { href: string; on: boolean; label: string }) {
- return (
- <Link href={href} aria-current={on ? "true" : undefined} className={badgeVariants({ variant: on ? "on" : "neutral" })}>
- {label}
- </Link>
- );
-}
diff --git a/umtool/app/tools/bench/page.tsx b/umtool/app/tools/bench/page.tsx
@@ -0,0 +1,305 @@
+import Link from "next/link";
+import BrowseHeader from "@/components/BrowseHeader";
+import BarForm from "@/components/bench/BarForm";
+import { badgeVariants } from "@/components/ui/badge";
+import {
+ BASELINE_MODEL,
+ VERDICTS,
+ filterBenchRows,
+ passesBar,
+ readBenchRuns,
+ readBenchView,
+ readVerdictsPolicy,
+} from "@/lib/bench";
+import type { ModelScore } from "yt-dlp-transcript-common/lib/report/draft/bench/index";
+import type { GenerationVerdicts } from "yt-dlp-transcript-common/lib/generationSettings";
+
+export const dynamic = "force-dynamic";
+
+// THE VERDICT BENCH (release 28 M7): could a model propose a fact-check
+// verdict well enough to be worth a review? One run at a time: per model its
+// agreement with the operator's rulings and its CONTRADICTED and NOT_FOUND
+// recall beside the always-CORROBORATED baseline, its cost; the confusion
+// matrix; every item with each model's verdict and reason, disagreements
+// first. The bar (settings.generation.verdicts) is set here, and each model's
+// pass or fail read against it — the handoff for the verdict proposals. The
+// runs are local-only (`archilyzer reports bench-verdicts`); zero client JS
+// but the bar's form.
+
+type Search = { run?: string; model?: string; verdict?: string };
+
+const pct = (v: number | null) => (v === null ? "—" : `${Math.round(v * 1000) / 10}%`);
+
+export default async function BenchPage({ searchParams }: { searchParams: Promise<Search> }) {
+ const sp = await searchParams;
+ const runs = await readBenchRuns();
+ const id = sp.run && runs.some((r) => r.id === sp.run) ? sp.run : runs[0]?.id;
+ const view = id ? await readBenchView(id) : null;
+ let policy: GenerationVerdicts | null = null;
+ let policyError: string | null = null;
+ try {
+ policy = await readVerdictsPolicy();
+ } catch (e) {
+ policyError = (e as Error).message;
+ }
+ const qs = (next: Partial<Search>) => {
+ const p = new URLSearchParams();
+ for (const [k, v] of Object.entries({ ...sp, run: id, ...next })) if (v) p.set(k, String(v));
+ return `/tools/bench?${p.toString()}`;
+ };
+
+ return (
+ <div className="flex h-full flex-col">
+ <BrowseHeader
+ active="bench"
+ crumbs={[{ label: "tools", href: "/tools" }, { label: "verdict bench" }]}
+ note={`${runs.length} run${runs.length === 1 ? "" : "s"}`}
+ />
+ <main className="deck-main flex-1 p-4 text-[12px]">
+ {runs.length === 0 ? (
+ <p className="text-[var(--color-dim)]">
+ no bench runs — <code className="font-mono">archilyzer reports bench-verdicts --models …</code>
+ </p>
+ ) : (
+ <>
+ <nav aria-label="runs" className="mb-3 flex flex-wrap items-center gap-1.5">
+ <span className="micro">run</span>
+ {runs.map((r) => (
+ <Link
+ key={r.id}
+ href={`/tools/bench?run=${r.id}`}
+ data-run={r.id}
+ aria-current={r.id === id ? "true" : undefined}
+ className={badgeVariants({ variant: r.id === id ? "on" : "neutral" })}
+ >
+ {r.id} · {r.status} · {r.items}
+ </Link>
+ ))}
+ </nav>
+ {!view ? (
+ <p role="alert" className="text-[var(--color-bad)]">
+ run {id} cannot be read
+ </p>
+ ) : (
+ <RunView view={view} policy={policy} policyError={policyError} sp={sp} qs={qs} />
+ )}
+ </>
+ )}
+ </main>
+ </div>
+ );
+}
+
+function RunView({
+ view,
+ policy,
+ policyError,
+ sp,
+ qs,
+}: {
+ view: NonNullable<Awaited<ReturnType<typeof readBenchView>>>;
+ policy: GenerationVerdicts | null;
+ policyError: string | null;
+ sp: Search;
+ qs: (n: Partial<Search>) => string;
+}) {
+ const { summary: s, score } = view;
+ const bar = policy?.bar ?? null;
+ const rows = filterBenchRows(view.items, { model: sp.model, verdict: sp.verdict });
+ const models = sp.model ? s.models.filter((m) => m === sp.model) : s.models;
+ return (
+ <div data-bench-run={s.id} data-status={s.status} className="flex flex-col gap-4">
+ <p role="status" className="text-[var(--color-dim)]">
+ {s.status} · {s.items} items · {s.skipped.length} skipped · a {s.windowS} s window · ${s.spentUsd.toFixed(4)} of ${s.maxUsd} ·{" "}
+ {new Date(s.createdAt).toISOString().slice(0, 16).replace("T", " ")} UTC
+ {s.stopped?.length ? ` · stopped: ${s.stopped.join("; ")}` : ""}
+ </p>
+ <section aria-label="models" className="flex flex-wrap gap-2">
+ {[...score.models, score.baseline].map((m) => (
+ <ModelTile key={m.model} m={m} baseline={m.model === BASELINE_MODEL ? null : score.baseline} pass={bar && m.model !== BASELINE_MODEL ? passesBar(m, bar) : null} />
+ ))}
+ </section>
+ <section aria-label="the bar" className="rounded border border-[var(--color-line)] bg-[var(--color-panel)] p-3">
+ {policy ? (
+ <BarForm initial={policy} models={score.models} />
+ ) : (
+ <p role="alert" className="text-[var(--color-bad)]">
+ the bar cannot be read: {policyError}
+ </p>
+ )}
+ </section>
+ <section aria-label="confusion" className="flex flex-wrap gap-4">
+ {score.models.map((m) => (
+ <Matrix key={m.model} m={m} />
+ ))}
+ </section>
+ <section aria-label="items">
+ <div className="mb-2 flex flex-wrap items-center gap-1.5">
+ <span className="micro">model</span>
+ <Chip href={qs({ model: "" })} on={!sp.model} label="all" />
+ {s.models.map((m) => (
+ <Chip key={m} href={qs({ model: m })} on={sp.model === m} label={m} />
+ ))}
+ <span className="micro ml-3">operator</span>
+ <Chip href={qs({ verdict: "" })} on={!sp.verdict} label="all" />
+ {VERDICTS.filter((v) => score.ruled[v] > 0).map((v) => (
+ <Chip key={v} href={qs({ verdict: v })} on={sp.verdict === v} label={`${v} ${score.ruled[v]}`} />
+ ))}
+ </div>
+ <table className="w-full border-collapse">
+ <thead>
+ <tr className="micro text-left">
+ <th className="py-1 pr-2">claim</th>
+ <th className="py-1 pr-2">operator</th>
+ {models.map((m) => (
+ <th key={m} className="py-1 pr-2 font-mono">
+ {m}
+ </th>
+ ))}
+ </tr>
+ </thead>
+ <tbody>
+ {rows.map((r) => (
+ <tr key={r.key} data-item={r.key} data-disagree={r.disagree.length ? r.disagree.join(" ") : undefined} className="border-t border-[var(--color-line)] align-top">
+ <td className="max-w-[28rem] py-1.5 pr-2">
+ <div className="font-mono text-[10px] text-[var(--color-dim)]">{r.key}</div>
+ {r.text}
+ </td>
+ <td className="py-1.5 pr-2 font-mono">{r.verdict}</td>
+ {models.map((m) => {
+ const a = r.answers[m];
+ return (
+ <td key={m} data-model={m} data-verdict={a?.verdict ?? "none"} className="max-w-[20rem] py-1.5 pr-2">
+ {!a ? (
+ <span className="text-[var(--color-dim)]">not asked</span>
+ ) : a.verdict ? (
+ <>
+ <span className={`font-mono ${a.verdict === r.verdict ? "text-[var(--color-good)]" : "text-[var(--color-bad)]"}`}>{a.verdict}</span>
+ {a.reason && <div className="text-[var(--color-dim)]">{a.reason}</div>}
+ </>
+ ) : (
+ <span className="text-[var(--color-bad)]">
+ {a.failure}: {a.error}
+ </span>
+ )}
+ </td>
+ );
+ })}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </section>
+ {s.skipped.length > 0 && (
+ <details>
+ <summary className="micro cursor-pointer">skipped {s.skipped.length}</summary>
+ <ul aria-label="skipped" className="mt-1 flex flex-col gap-0.5">
+ {s.skipped.map((k) => (
+ <li key={k.key} className="font-mono text-[var(--color-dim)]">
+ {k.key} — {k.reason}
+ </li>
+ ))}
+ </ul>
+ </details>
+ )}
+ </div>
+ );
+}
+
+function ModelTile({ m, baseline, pass }: { m: ModelScore; baseline: ModelScore | null; pass: { pass: boolean; misses: string[] } | null }) {
+ const vs = (v: number | null, b: number | null | undefined) => (baseline ? `${pct(v)} (baseline ${pct(b ?? null)})` : pct(v));
+ return (
+ <div
+ data-model={m.model}
+ data-pass={pass ? String(pass.pass) : undefined}
+ className="min-w-[15rem] rounded border border-[var(--color-line)] bg-[var(--color-panel)] p-2"
+ >
+ <div className="mb-1 flex items-center gap-2">
+ <span className="font-mono text-[var(--color-text)]">{m.model}</span>
+ {pass && (
+ <span className={badgeVariants({ variant: pass.pass ? "on" : "blocking", size: "sm" })} title={pass.misses.join("; ") || undefined}>
+ {pass.pass ? "passes" : "fails"} the bar
+ </span>
+ )}
+ </div>
+ <dl className="grid grid-cols-[auto_1fr] gap-x-2 gap-y-0.5">
+ <dt className="text-[var(--color-dim)]">agreement</dt>
+ <dd data-metric="agreement">{vs(m.agreement, baseline?.agreement)}</dd>
+ <dt className="text-[var(--color-dim)]">with PARTLY ~ CORROBORATED</dt>
+ <dd>{vs(m.agreementAdjacent, baseline?.agreementAdjacent)}</dd>
+ <dt className="text-[var(--color-dim)]">CONTRADICTED recall</dt>
+ <dd data-metric="contradicted">
+ {vs(m.recall.CONTRADICTED.recall, baseline?.recall.CONTRADICTED.recall)} of {m.recall.CONTRADICTED.ruled}
+ </dd>
+ <dt className="text-[var(--color-dim)]">NOT_FOUND recall</dt>
+ <dd data-metric="not-found">
+ {vs(m.recall.NOT_FOUND.recall, baseline?.recall.NOT_FOUND.recall)} of {m.recall.NOT_FOUND.ruled}
+ </dd>
+ <dt className="text-[var(--color-dim)]">PARTLY recall</dt>
+ <dd>
+ {pct(m.recall.PARTLY.recall)} · adjacent {pct(m.recall.PARTLY_ADJACENT.recall)}
+ </dd>
+ {baseline && (
+ <>
+ <dt className="text-[var(--color-dim)]">cost</dt>
+ <dd data-metric="cost">${m.usd.toFixed(4)}</dd>
+ <dt className="text-[var(--color-dim)]">latency</dt>
+ <dd>{m.latency.medianMs === null ? "—" : `${(m.latency.medianMs / 1000).toFixed(1)} s median, ${((m.latency.p90Ms ?? 0) / 1000).toFixed(1)} s p90`}</dd>
+ <dt className="text-[var(--color-dim)]">answered</dt>
+ <dd>
+ {m.answered} of {m.asked}
+ {m.parseFailures ? ` · ${m.parseFailures} parse failures` : ""}
+ {m.errors ? ` · ${m.errors} errors` : ""}
+ </dd>
+ </>
+ )}
+ </dl>
+ </div>
+ );
+}
+
+function Matrix({ m }: { m: ModelScore }) {
+ return (
+ <table aria-label={`confusion ${m.model}`} className="border-collapse font-mono text-[11px]">
+ <caption className="micro mb-1 text-left">
+ {m.model} — rows: operator, columns: model
+ </caption>
+ <thead>
+ <tr>
+ <th />
+ {VERDICTS.map((v) => (
+ <th key={v} className="px-1.5 py-0.5 text-[var(--color-dim)]" title={v}>
+ {v.slice(0, 4)}
+ </th>
+ ))}
+ <th className="px-1.5 py-0.5 text-[var(--color-dim)]">none</th>
+ </tr>
+ </thead>
+ <tbody>
+ {VERDICTS.map((op, i) => (
+ <tr key={op}>
+ <th className="pr-1.5 text-left text-[var(--color-dim)]">{op}</th>
+ {VERDICTS.map((v, j) => (
+ <td
+ key={v}
+ data-cell={`${op}:${v}`}
+ className={`border border-[var(--color-line)] px-1.5 py-0.5 text-right ${i === j && m.matrix[i]![j]! > 0 ? "text-[var(--color-good)]" : m.matrix[i]![j]! > 0 ? "text-[var(--color-text)]" : "text-[var(--color-dim)]"}`}
+ >
+ {m.matrix[i]![j]}
+ </td>
+ ))}
+ <td className="border border-[var(--color-line)] px-1.5 py-0.5 text-right text-[var(--color-dim)]">{m.unanswered[i]}</td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ );
+}
+
+function Chip({ href, on, label }: { href: string; on: boolean; label: string }) {
+ return (
+ <Link href={href} aria-current={on ? "true" : undefined} className={badgeVariants({ variant: on ? "on" : "neutral" })}>
+ {label}
+ </Link>
+ );
+}
diff --git a/umtool/components/AppNav.tsx b/umtool/components/AppNav.tsx
@@ -1,6 +1,7 @@
import Link from "next/link";
import { MODES } from "@/lib/types";
import {
+ benchHref,
findHref,
facesHref,
homeHref,
@@ -36,6 +37,7 @@ const TOOL_ITEMS = [
{ href: mixHref(), label: "mix" },
{ href: facesHref(), label: "faces" },
{ href: sourcesHref(), label: "sources" },
+ { href: benchHref(), label: "bench" },
];
const PLACE_OF: Record<string, string> = {
diff --git a/umtool/components/shell/JumpPalette.tsx b/umtool/components/shell/JumpPalette.tsx
@@ -3,6 +3,7 @@
import { useRouter } from "next/navigation";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import {
+ benchHref,
facesHref,
findHref,
generationPolicyHref,
@@ -52,6 +53,7 @@ const FIXED: Item[] = [
...MODES.map((m): Item => ({ id: `pile-${m}`, section: "Tools", label: `Song · ${m}`, hint: "judging pile", href: pileHref(m) })),
{ id: "faces", section: "Tools", label: "Faces", hint: "the face judger", href: facesHref() },
{ id: "sources", section: "Tools", label: "Sources", hint: "where the palette comes from", href: sourcesHref() },
+ { id: "bench", section: "Tools", label: "Verdict bench", hint: "could a model propose a verdict", href: benchHref() },
{ id: "new-article", section: "Create", label: "New article", hint: "from a question", href: newArticleHref() },
{ id: "new-project", section: "Create", label: "New project", hint: "a video, a song, a sweep", href: projectsHref({ new: true }) },
];
diff --git a/umtool/e2e/draft-review.spec.ts b/umtool/e2e/draft-review.spec.ts
@@ -66,7 +66,7 @@ test("badges: drafted by <model>, approve, reject with a note; an edit makes the
test("the review page: every drafted field, the narration's badge, and Use this for the operator's field", async ({ page }) => {
await page.goto(`/browse/${PROJECT}`);
await page.locator("[data-review-link]").click();
- await expect(page).toHaveURL(new RegExp(`/browse/${PROJECT}/review$`));
+ await expect(page).toHaveURL(new RegExp(`/projects/${PROJECT}/review$`));
// The narration and the teaser are drafted; a final build would refuse them.
const k01 = page.locator('[data-draft-row="narrate/k01/narration"]');
await expect(k01).toHaveAttribute("data-state", "unreviewed");
diff --git a/umtool/e2e/narration-review.spec.ts b/umtool/e2e/narration-review.spec.ts
@@ -37,7 +37,7 @@ const ttsAsks = (): { route?: string; text?: string }[] => {
test("review the narration card by card: approve, reject with a note, edit un-approves, play asks the editor", async ({ page }) => {
await page.goto(`/browse/${PROJECT}`);
await page.locator("[data-narration-link]").click();
- await expect(page).toHaveURL(new RegExp(`/browse/${PROJECT}/narration$`));
+ await expect(page).toHaveURL(new RegExp(`/projects/${PROJECT}/narration$`));
const k1 = page.locator('[data-narration-card="k01"]');
const k2 = page.locator('[data-narration-card="k02"]');
await expect(k1).toHaveAttribute("data-state", "unreviewed");
diff --git a/umtool/lib/hrefs.ts b/umtool/lib/hrefs.ts
@@ -274,6 +274,11 @@ export function pileHref(mode: string, q: { limit?: number; only?: string } = {}
return withQuery(`/tools/song/${encodeURIComponent(mode)}`, q);
}
+/** Release 28's verdict bench: could a model propose a fact-check verdict? */
+export function benchHref(q: { run?: string; model?: string; verdict?: string } = {}): string {
+ return withQuery("/tools/bench", q);
+}
+
/** Every tool. */
export function toolsHref(): string {
return "/tools";
diff --git a/umtool/redirects.mjs b/umtool/redirects.mjs
@@ -41,8 +41,7 @@
// Not here yet, by phase: `/?from=` → `/create?from=` and `/articles/new` →
// `/create?make=article` (P5, when /create exists -- until then the Inbox
-// answers `?from=` itself); `/bench` → `/tools/bench` (after release 28 lands
-// its verdict bench at /bench); `/drafts` → `/` (P6 deletes the page).
+// answers `?from=` itself); `/drafts` → `/` (P6 deletes the page).
const p3 = (source, destination) => ({ source, destination, permanent: false, phase: "P3" });
@@ -68,6 +67,8 @@ export const REDIRECTS = [
// The song tools.
p3("/mix", "/tools/mix"),
p3("/:mode(sort|salvage|verify|keeps)", "/tools/song/:mode"),
+ // Release 28's verdict bench.
+ p3("/bench", "/tools/bench"),
];
/** The rows in the shape next.config.ts's `redirects()` returns. */