commit 20687ea7818b003430ca8c53d1ee65538fe8de0e
parent c32863ba72b189d898c32d0835853ae4167b311d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 21:12:33 -0400
Merge main (R6.2 live, 9f82dee6) into ux/board-race-2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
13 files changed, 365 insertions(+), 22 deletions(-)
diff --git a/common/lib/report/draft/refresh/delta.ts b/common/lib/report/draft/refresh/delta.ts
@@ -52,8 +52,22 @@ export type EnumerateFn = (args: Record<string, unknown>) => Promise<EnumeratedA
// stops at its cap and calls what it read "the scope" is a silent zero.
// `complete` false: some channel was not listed in full (`unreached`, with
// why in `problems`), so what is missing is NOT "nothing new".
-export type ListedRecording = { id: string; channel: string | null; channelSlug: string | null; date: string | null; title: string | null };
+// R6.2: `hasTranscript` — does the build carry transcript text for it (the
+// stats index's `hasTranscript`, or the record's own cues when its page was
+// read)? false: listed but not judge-able yet; null/absent: the build does
+// not say (read as judge-able, as before R6.2).
+export type ListedRecording = { id: string; channel: string | null; channelSlug: string | null; date: string | null; title: string | null; hasTranscript?: boolean | null };
export type RecordingListing = { rows: ListedRecording[]; complete: boolean; unreached: string[]; problems: string[] };
+
+/** R6.2: does a transcript record (a shard page's) carry transcript text — at least one cue? */
+export function recordHasText(rec: { cues?: unknown } | null | undefined): boolean {
+ return !!rec && Array.isArray(rec.cues) && rec.cues.length > 0;
+}
+
+/** R6.2: a stats index entry's word on transcript text; null when there is no entry or it does not say. */
+export function statHasText(stat: { hasTranscript?: unknown } | null | undefined): boolean | null {
+ return stat && typeof stat.hasTranscript === "boolean" ? stat.hasTranscript : null;
+}
export type ListArgs = { channels?: string[]; date_from?: string; date_to?: string };
export type ListFn = (args: ListArgs) => Promise<RecordingListing>;
diff --git a/common/lib/report/draft/refresh/fetch.ts b/common/lib/report/draft/refresh/fetch.ts
@@ -197,7 +197,7 @@ export async function fetchAndBuild(
const held = hooks.transcriptionHeld ? await hooks.transcriptionHeld().catch(() => null) : null;
if (held) {
steps.push({
- ...skip(slug, "transcribe-bucket", `transcription is paused (${held}) — ${landed.length} recording${landed.length === 1 ? "" : "s"} wait; a later run reads them once transcribed`),
+ ...skip(slug, "transcribe-bucket", `transcription is paused (${held}) — ${landed.length} recording${landed.length === 1 ? " waits; a later run reads it" : "s wait; a later run reads them"} once transcribed`),
ids: landed,
});
return steps;
diff --git a/common/lib/report/draft/refresh/refresh.test.ts b/common/lib/report/draft/refresh/refresh.test.ts
@@ -500,12 +500,13 @@ test("refresh, a capped search again with nothing new: partial (naming what it d
test("R4.1 fetch: transcription held — transcribe-bucket is skipped and said (a warning to the caller), never waited on; nothing to transcribe is a routine skip; a cancelled job is a warning", async () => {
const calls: Call[] = [];
- const buckets: Record<string, string[]> = { held: ["old"], quiet: ["old"], gone: [] };
+ const buckets: Record<string, string[]> = { held: ["old"], one: ["old"], quiet: ["old"], gone: [] };
const hooks = {
editor: {
async run(action: string, args: Record<string, unknown>) {
calls.push({ action, args });
if (action === "sync" && args.slug === "held") buckets.held = ["old", "n1", "n2"];
+ if (action === "sync" && args.slug === "one") buckets.one = ["old", "m1"];
if (action === "sync" && args.slug === "gone") return { ok: true, jobId: "cancel-me" };
return { ok: true, jobId: `job-${calls.length}` };
},
@@ -518,7 +519,7 @@ test("R4.1 fetch: transcription held — transcribe-bucket is skipped and said (
pollMs: 1,
sleep: async () => {},
};
- const r = await fetchAndBuild({ channels: ["held", "quiet", "gone"] }, hooks);
+ const r = await fetchAndBuild({ channels: ["held", "one", "quiet", "gone"] }, hooks);
assert.ok(!calls.some((c) => c.action === "transcribe-bucket"), "nothing queued for a held transcription");
const tb = r.fetch.find((s) => s.channel === "held" && s.action === "transcribe-bucket")!;
assert.deepEqual(tb, {
@@ -528,6 +529,8 @@ test("R4.1 fetch: transcription held — transcribe-bucket is skipped and said (
reason: "transcription is paused (no transcription worker is enabled) — 2 recordings wait; a later run reads them once transcribed",
ids: ["n1", "n2"],
});
+ // R6.2: one recording "waits" (not "wait"), and a later run reads "it".
+ assert.equal(r.fetch.find((s) => s.channel === "one" && s.action === "transcribe-bucket")!.reason, "transcription is paused (no transcription worker is enabled) — 1 recording waits; a later run reads it once transcribed");
const routine = r.fetch.find((s) => s.channel === "quiet" && s.action === "transcribe-bucket")!;
assert.deepEqual(routine, { channel: "quiet", action: "transcribe-bucket", status: "skipped", reason: "nothing new to transcribe", routine: true });
assert.ok(r.warnings.some((w) => /^gone: sync cancelled — the job ended cancelled$/.test(w)), JSON.stringify(r.warnings));
diff --git a/common/lib/report/draft/triage/tier0.ts b/common/lib/report/draft/triage/tier0.ts
@@ -22,10 +22,22 @@
// less the candidates past the cap, which stay new. Posts are not candidates
// (a triage reads transcript windows).
//
+// R6.2 — SEEN MEANS JUDGE-ABLE. A build's manifests list a recording before
+// its transcript lands (metadata only). Such a recording (the listing's
+// `hasTranscript: false`) is neither new nor seen this run: it stays out of
+// seen.json, so the run after its transcript lands counts it new by id — the
+// late transcript R6's by-id rule exists to catch. An id an earlier run
+// stored as seen while it had no text (before R6.2) is dropped from the set
+// this run stores, so it heals the same way. Unknown (`null`, the enumerate
+// fallback): judge-able, as before.
+//
// Pure over the list and enumerate functions and the topic reader it is handed.
import { type EnumerateFn, type ListFn, type RecordingListing } from "../refresh/delta";
-import type { TriageCandidate, TriageTier0 } from "./types";
+import { listedWords, type TriageCandidate, type TriageTier0 } from "./types";
+
+// The untranscribed ids triage.json names (the count is whole).
+const UNTRANSCRIBED_IDS_KEPT = 50;
export type Tier0Input = {
scope: { channels: string[]; from?: string; to?: string };
@@ -82,6 +94,32 @@ export function tagMatches(tag: string, topic: string): boolean {
return t === p || t.includes(p) || p.includes(t);
}
+/**
+ * R6.2: a listing split into what a triage can judge now and what waits for
+ * its transcript (`hasTranscript: false`). Unknown (null/absent) is judge-able.
+ */
+export function splitByTranscript<R extends { hasTranscript?: boolean | null }>(rows: readonly R[]): { judgeable: R[]; waiting: R[] } {
+ const judgeable: R[] = [];
+ const waiting: R[] = [];
+ for (const r of rows) (r.hasTranscript === false ? waiting : judgeable).push(r);
+ return { judgeable, waiting };
+}
+
+/**
+ * The set a run stores as seen.json (R6.1, R6.2): everything known, plus
+ * everything listed that can be judged — less the candidates past the cap
+ * (they stay new) and less what is listed without a transcript (new once
+ * transcribed; a known id among them, stored before R6.2, is dropped, so it
+ * heals). A PARTIAL run stores nothing (null): what it did not reach must not
+ * become known, so the next run falls back to the last complete run's set (or
+ * to its `since`).
+ */
+export function nextSeen(o: { partial: boolean; known: Iterable<string> | null; judgeable: Iterable<string>; cut: Iterable<string>; waiting: Iterable<string> }): string[] | null {
+ if (o.partial) return null;
+ const drop = new Set([...o.cut, ...o.waiting]);
+ return [...new Set([...(o.known ?? []), ...o.judgeable])].filter((id) => !drop.has(id));
+}
+
export async function triageCandidates(i: Tier0Input, d: Tier0Deps): Promise<Tier0Result> {
const log = (l: string) => d.log?.(l);
if (i.ids?.length) {
@@ -101,9 +139,13 @@ export async function triageCandidates(i: Tier0Input, d: Tier0Deps): Promise<Tie
d.signal?.throwIfAborted();
const rows = listing.rows;
const perQuery: TriageTier0["perQuery"] = [{ query: listing.by === "manifests" ? "(every recording, listed)" : "(any recording)", n: rows.length, partial: !listing.complete }];
+ // R6.2: listed with no transcript text yet — not judge-able, so not new and
+ // not seen (new on the run after its transcript lands).
+ const { judgeable, waiting } = splitByTranscript(rows);
const isNew = (id: string, date: string | null) => (i.known ? !i.known.has(id) : since ? !!date && date >= since : true);
- const fresh = rows.filter((r) => isNew(r.id, ymdOf(r.date)));
+ const fresh = judgeable.filter((r) => isNew(r.id, ymdOf(r.date)));
const byId = new Map(fresh.map((r) => [r.id, r]));
+ log(`tier 0: ${listedWords({ scanned: rows.length, untranscribed: waiting.length })}`);
log(
`tier 0: ${rows.length} recording(s) in scope (${listing.by === "manifests" ? "listed from the build's manifests" : "enumerated per channel"}), ${fresh.length} new ${i.known ? `since the last run (by id; ${i.known.size} known)` : since ? `uploaded on or after ${since}` : "(no last run, no since: all)"}${listing.complete ? "" : ` — PARTIAL: ${listing.problems.join("; ")}`}`,
);
@@ -183,19 +225,16 @@ export async function triageCandidates(i: Tier0Input, d: Tier0Deps): Promise<Tie
);
const candidates = ranked.slice(0, i.max);
const cut = ranked.slice(i.max).map((c) => c.id);
- const cutSet = new Set(cut);
const scannedIds = rows.map((r) => r.id);
- // Seen: everything known, everything listed, less what was cut (it stays
- // new). A PARTIAL run stores nothing: what it did not reach must not become
- // known, so the next run falls back to the last complete run's set (or to
- // its `since`).
- const seen = partial ? null : [...new Set([...(i.known ?? []), ...scannedIds])].filter((id) => !cutSet.has(id));
+ // Seen: nextSeen's rule (known + judge-able, less cut and waiting; partial: none).
+ const seen = nextSeen({ partial, known: i.known, judgeable: judgeable.map((r) => r.id), cut, waiting: waiting.map((r) => r.id) });
if (partial) log(`tier 0: PARTIAL${unreached.size ? ` — not reached: ${[...unreached].join(", ")}` : ""}: this run's seen set is not kept`);
return {
tier0: {
candidates,
scanned: rows.length,
newCount: fresh.length,
+ ...(waiting.length ? { untranscribed: waiting.length, untranscribedIds: waiting.slice(0, UNTRANSCRIBED_IDS_KEPT).map((r) => r.id) } : {}),
cut,
partial,
unreached: [...unreached].sort(),
@@ -209,7 +248,7 @@ export async function triageCandidates(i: Tier0Input, d: Tier0Deps): Promise<Tie
};
}
-type ScopeRow = { id: string; channel: string | null; channelSlug?: string | null; date: string | null; title: string | null };
+type ScopeRow = { id: string; channel: string | null; channelSlug?: string | null; date: string | null; title: string | null; hasTranscript?: boolean | null };
/**
* Every recording in scope: the corpus's uncapped listing when it has one,
diff --git a/common/lib/report/draft/triage/triage.test.ts b/common/lib/report/draft/triage/triage.test.ts
@@ -432,3 +432,110 @@ test("R6.1 tier 0: the corpus tools' listRecordings is the default listing", asy
assert.deepEqual(listed, [{ channels: [CHAN] }]);
assert.equal((await readTriageSeen("watch-l", paths))?.ids.length, BIG.length);
});
+
+// ─── R6.2: seen means judge-able — an untranscribed recording stays new ───
+
+import { listedWords } from "./types";
+import { nextSeen, splitByTranscript } from "./tier0";
+import { recordHasText, statHasText } from "../refresh/delta";
+
+test("R6.2 the pieces: recordHasText, statHasText, splitByTranscript, nextSeen", () => {
+ assert.equal(recordHasText({ cues: [{ start: 0, end: 1, text: "x" }] }), true);
+ assert.equal(recordHasText({ cues: [] }), false);
+ assert.equal(recordHasText({ cues: undefined }), false);
+ assert.equal(recordHasText(null), false);
+ assert.equal(statHasText({ hasTranscript: true }), true);
+ assert.equal(statHasText({ hasTranscript: false }), false);
+ assert.equal(statHasText({}), null, "an entry that does not say");
+ assert.equal(statHasText(undefined), null, "no entry");
+ const { judgeable, waiting } = splitByTranscript([{ id: "a", hasTranscript: true }, { id: "b", hasTranscript: false }, { id: "c", hasTranscript: null }, { id: "d" }]);
+ assert.deepEqual(judgeable.map((r) => r.id), ["a", "c", "d"], "unknown is judge-able");
+ assert.deepEqual(waiting.map((r) => r.id), ["b"]);
+ // known + judge-able, less cut and waiting (a known id now waiting is dropped: it heals).
+ assert.deepEqual(nextSeen({ partial: false, known: new Set(["k", "b"]), judgeable: ["a", "c", "x"], cut: ["x"], waiting: ["b"] }), ["k", "a", "c"]);
+ assert.deepEqual(nextSeen({ partial: false, known: null, judgeable: ["a"], cut: [], waiting: [] }), ["a"]);
+ assert.equal(nextSeen({ partial: true, known: new Set(["k"]), judgeable: ["a"], cut: [], waiting: [] }), null, "a partial run stores nothing");
+});
+
+test("R6.2 tier 0: a recording listed with no transcript yet is neither new nor seen; on the run after its transcript lands it is new (by id) and a candidate; the counts are said", async () => {
+ // late-03 is listed by the build's manifests before its transcript lands.
+ const untranscribed = new Set(["late-03"]);
+ const listWith = (waiting: Set<string>): ListFn => async () => ({
+ rows: BIG.map((r) => ({ id: r.id, channel: NAME, channelSlug: CHAN, date: ymd(r.date), title: r.title, hasTranscript: !waiting.has(r.id) })),
+ complete: true,
+ unreached: [],
+ problems: [],
+ });
+ const lines: string[] = [];
+ // First run (by date): late-03 is old AND untranscribed — not a candidate, not seen.
+ const first = await triageCandidates({ scope: { channels: [CHAN] }, terms: "contest", topics: [], known: null, since: "2026-10-01", max: 40 }, { enumerate: cappedEnumerate(BIG), list: listWith(untranscribed), log: (l) => lines.push(l) });
+ assert.equal(first.tier0.partial, false);
+ assert.equal(first.tier0.scanned, BIG.length);
+ assert.equal(first.tier0.untranscribed, 1);
+ assert.deepEqual(first.tier0.untranscribedIds, ["late-03"]);
+ assert.ok(first.seen && !first.seen.includes("late-03"), "an untranscribed recording is not stored as seen");
+ assert.equal(first.seen!.length, BIG.length - 1);
+ assert.ok(lines.includes(`tier 0: ${BIG.length} listed · 1 without a transcript yet (not seen; new once transcribed)`), JSON.stringify(lines));
+
+ // By id, an untranscribed recording that is not known is not new either (nothing to judge yet).
+ const waitingNew = new Set(["late-03", "new-04"]);
+ const stillWaiting = await triageCandidates({ scope: { channels: [CHAN] }, terms: "contest", topics: [], known: new Set(first.seen), since: null, max: 40 }, { enumerate: cappedEnumerate(BIG), list: listWith(waitingNew) });
+ assert.equal(stillWaiting.tier0.newCount, 0, "new-04 has no text yet: not new");
+ assert.deepEqual(stillWaiting.tier0.candidates, []);
+ assert.equal(stillWaiting.tier0.untranscribed, 2);
+ assert.ok(!stillWaiting.seen!.includes("late-03") && !stillWaiting.seen!.includes("new-04"));
+
+ // The next run: late-03's transcript has landed — new by id, and it matches the terms.
+ const enumerate = cappedEnumerate(BIG);
+ const next = await triageCandidates({ scope: { channels: [CHAN] }, terms: "contest", topics: [], known: new Set(first.seen), since: null, max: 40 }, { enumerate, list: listWith(new Set()) });
+ assert.equal(next.tier0.newCount, 1);
+ assert.deepEqual(next.tier0.candidates.map((c) => c.id), ["late-03"]);
+ assert.deepEqual(enumerate.calls.find((c) => c.query === "contest")!.ids, ["late-03"]);
+ assert.equal(next.tier0.untranscribed, undefined);
+ assert.equal(next.seen!.length, BIG.length);
+
+ // A known id stored as seen while it had no text (before R6.2) is dropped from the set this run stores — it heals.
+ const healed = await triageCandidates({ scope: { channels: [CHAN] }, terms: "contest", topics: [], known: new Set(BIG.map((r) => r.id)), since: null, max: 40 }, { enumerate: cappedEnumerate(BIG), list: listWith(untranscribed) });
+ assert.deepEqual(healed.tier0.candidates, []);
+ assert.ok(!healed.seen!.includes("late-03"));
+
+ // Unknown transcript state (no `hasTranscript`): judge-able, as before.
+ const unknown = await triageCandidates({ scope: { channels: [CHAN] }, terms: "contest", topics: [], known: null, since: "2026-10-01", max: 40 }, { enumerate: cappedEnumerate(BIG), list: listOver(BIG) });
+ assert.equal(unknown.tier0.untranscribed, undefined);
+ assert.equal(unknown.seen!.length, BIG.length);
+});
+
+test("R6.2 a run: seen.json leaves the untranscribed id out; the next run, its transcript landed, judges it", async () => {
+ const paths = store();
+ let waiting = new Set(["late-03"]);
+ const corpus = {
+ ...corpusOver(BIG),
+ listRecordings: async () => ({ rows: BIG.map((r) => ({ id: r.id, channel: NAME, channelSlug: CHAN, date: ymd(r.date), title: r.title, hasTranscript: !waiting.has(r.id) })), complete: true, unreached: [], problems: [] }),
+ };
+ const judged: string[] = [];
+ const ask = async <T,>(_s: string, user: string): Promise<T> => {
+ judged.push(user);
+ return (/judged the contest that year/.test(user) ? { relevant: true, items: [{ quote: "I judged the contest that year myself", claim: "She judged it.", on_topic: true, strength: 3 }] } : { relevant: false, items: [] }) as T;
+ };
+ await createTriageRun(queued("watch-t"), paths, "watch-t");
+ const one = await runTriage({ owner: "watch-t", k: 1 }, { llm: {} as never, corpus, enumerate: cappedEnumerate(BIG), paths, cuesOf: cuesOver(BIG), ask });
+ assert.equal(one.file.status, "done", one.file.error);
+ assert.equal(one.file.tier0!.untranscribed, 1);
+ const seen = await readTriageSeen("watch-t", paths);
+ assert.equal(seen?.ids.length, BIG.length - 1);
+ assert.ok(!seen!.ids.includes("late-03"));
+ // The transcript lands.
+ waiting = new Set();
+ await createTriageRun(queued("watch-t"), paths, "watch-t");
+ const two = await runTriage({ owner: "watch-t", k: 2 }, { llm: {} as never, corpus, enumerate: cappedEnumerate(BIG), paths, cuesOf: cuesOver(BIG), ask });
+ assert.equal(two.file.status, "done", two.file.error);
+ assert.equal(two.file.tier0!.newBy, "id");
+ assert.deepEqual(two.file.tier0!.candidates.map((c) => c.id), ["late-03"]);
+ assert.deepEqual(two.file.tier1!.flags.map((f) => f.id), ["late-03"]);
+ assert.equal((await readTriageSeen("watch-t", paths))?.ids.length, BIG.length);
+});
+
+test("R6.2 listedWords", () => {
+ assert.equal(listedWords({ scanned: 23290, untranscribed: 8 }), "23,290 listed · 8 without a transcript yet (not seen; new once transcribed)");
+ assert.equal(listedWords({ scanned: 12 }), "12 listed");
+});
diff --git a/common/lib/report/draft/triage/types.ts b/common/lib/report/draft/triage/types.ts
@@ -130,6 +130,11 @@ export type TriageTier0 = {
listedBy?: "manifests" | "enumerate";
// Why the listing or a query is partial, in words.
problems?: string[];
+ // R6.2: listed, but with no transcript text in the build yet — not new and
+ // not seen (new on the run after the transcript lands). The count is whole;
+ // the ids are the first few. Absent: none.
+ untranscribed?: number;
+ untranscribedIds?: string[];
};
export type TriageTier1 = {
@@ -210,7 +215,12 @@ export function escalationOf(flags: readonly Pick<TriageFlag, "strength">[], thr
return { escalate, why: `${counted} (threshold: ${thresholdWords(threshold)})`, strong, weak, threshold };
}
-/** "8 candidates · 2 flagged · 6 dismissed". */
+/** R6.2: "23,290 listed · 8 without a transcript yet (not seen; new once transcribed)". */
+export function listedWords(t: Pick<TriageTier0, "scanned" | "untranscribed">): string {
+ const n = t.untranscribed ?? 0;
+ return `${t.scanned.toLocaleString("en-US")} listed${n ? ` · ${n.toLocaleString("en-US")} without a transcript yet (not seen; new once transcribed)` : ""}`;
+}
+
/** R6.1: why a tier 0 is partial, in words ("not reached: A, B (stopped at page 3 of 29)"); null: complete. */
export function partialWords(t: Pick<TriageTier0, "partial" | "unreached" | "problems"> | null | undefined): string | null {
if (!t?.partial) return null;
@@ -218,6 +228,7 @@ export function partialWords(t: Pick<TriageTier0, "partial" | "unreached" | "pro
return (t.problems ?? []).join("; ") || "a cap was hit";
}
+/** "8 candidates · 2 flagged · 6 dismissed". */
export function triageLine(f: Pick<TriageFile, "tier0" | "tier1">): string {
const c = f.tier0?.candidates.length ?? 0;
const flagged = f.tier1?.flags.length ?? 0;
diff --git a/common/testing/schedule/opsStub.ts b/common/testing/schedule/opsStub.ts
@@ -23,7 +23,8 @@
// "quiet" in the terms or question → candidates, no flag
// (below the threshold); "partial" → the same, tier 0
// partial (a channel not reached: the tick is partial,
-// R6.1); else a strong flag and a weak one
+// R6.1); a quiet run also lists two recordings without
+// a transcript yet (R6.2); else a strong flag and a weak one
// on sitechan/sv1 and sv2, an invented line dismissed as
// not verbatim, a window not relevant; $0 (local)
@@ -190,6 +191,8 @@ const steps: TickSteps = {
perQuery: [{ query: "(every recording, listed)", n: 16, partial }],
newBy: "id",
listedBy: "manifests",
+ // R6.2: a quiet run lists two recordings whose transcripts have not landed (not seen).
+ ...(quiet && !partial ? { untranscribed: 2, untranscribedIds: ["sv5", "sv6"] } : {}),
},
tier1: {
model: generation.models.local,
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -5,6 +5,7 @@
- **`enumerate_matches` takes `ids`.** Only the pages that hold those recordings are read, so the scan is bounded by them rather than by the scope; the footer says how many the scope holds. A sweep restricted to given recordings (a refresh's update, a triage's escalation) now scans only theirs.
- **A tick no longer waits hours on a paused transcription.** When the transcription workers are paused or none is enabled, a refresh's or tick's fetch skips `transcribe-bucket` and says "transcription is paused (…) — N recordings wait; a later run reads them once transcribed" as a warning. A fetch step that was cancelled is a warning; "nothing new to transcribe" is no longer one.
- **`pnpm ops report-schedule --json '{"action": "reset-triage", "id": "<schedule>"}'`** discards a schedule's triage state — its triage runs (from run `"k"` on; default all), its `seen.json` (so the next run counts new from its start date) and the quiet editions those runs covered (so the next tick covers those windows again) — answering the plan first; `"confirm": true` does it. Refused while a tick runs. The schedule, its cadence, its tick log and every edition article stay.
+- **A recording listed before its transcript lands is judged once the transcript does.** A triage's seen set kept every recording the build listed, including ones it lists with no transcript yet (a recording synced but not transcribed, a deleted upload). Such a recording was never new again, so its transcript, when it landed, was never read. Tier 0 now leaves a recording with no transcript out of both "new" and the seen set; the run after its transcript lands counts it new, and judges it if it matches. A seen set kept before this change drops those recordings on the next run. The run's log says "23,290 listed · 96 without a transcript yet (not seen; new once transcribed)", and umtool's triage page counts them under Tier 0. Whether a recording has a transcript comes from the build's stats index. The fetch's transcription-paused line now says "1 recording waits" for one. Needs a restart of the editor and umtool.
- **umtool's old addresses are permanent redirects now (308).** Every row of `umtool/redirects.mjs` — `/browse…`, `/articles`, `/sites`, `/articles/new`, `/drafts`, `/mix`, `/sort`…`/keeps`, `/bench` and the editor's `/?from=` hand-off to Create — answers 308 instead of 307. A browser caches a 308 forever, so these rows are never repointed or removed. A project that an article claims still lands on its article with a 307: that one follows the article.
- **In umtool no action is a Signal outline or a verdict colour.** Signal is the focus, the lit line, a selection and the one filled action on a page. Create's article form (**Start sweep** / **Start research**) and the projects index's new-project form submit with it. Deletes, removals, cancels and Settings · system's **Prune…** are ink outlines, guarded by their plan and confirm. A toggle that is on (a pressed verdict, a reason, a star, a chip) wears the panel ground. The song tools' hand-made teal and green buttons (find, trims, faces, mix, the deck, the phrase console), a note's **Resolve** and the projects index's red **blocking** facet are gone. A clip not fetched yet, one that ends mid-sentence and one the widener would move are tagged as open findings, not in amber.
- **umtool's buttons say what they do, in sentence case, and every page has a title.** Some examples: the Build tab's **Show the command** / **Build** / **Cancel build**, **Tag N videos**, **Take snapshot**, **Fetch N unfetched clips via the editor**, the Deliver tab's **Cut N confirmed clips from cache**, the clip bench's controls, a note's **Resolve** / **Reply** / **Delete**, **Copy citation** (was "cite"), **Mark this moment**, **Promote … to …**. "Draft with" now reads whole: **Draft**, then the model. Pages under a place have proper titles (Archive, Runs, Find, Faces, Song piles, Sort, Verdict bench, Compare, Evidence). The faces, sources, mix and find pages no longer open with an explanatory paragraph.
diff --git a/mcp/src/enumerate.ts b/mcp/src/enumerate.ts
@@ -20,7 +20,7 @@ import {
} from "yt-dlp-transcript-common/lib/availability";
import type { LayerScope } from "yt-dlp-transcript-common/lib/searchQuery";
import type { TranscriptDetail } from "yt-dlp-transcript-common/lib/transcripts";
-import type { ListArgs, ListedRecording, RecordingListing } from "yt-dlp-transcript-common/lib/report/draft/refresh/delta";
+import { recordHasText, statHasText, type ListArgs, type ListedRecording, type RecordingListing } from "yt-dlp-transcript-common/lib/report/draft/refresh/delta";
import type { ChannelRef, ShardSource } from "./source";
import {
parseContentTypes,
@@ -266,6 +266,12 @@ const ymd = (d: unknown): string | null => {
* a channel whose manifest does not read, a scope token no channel matches,
* or a record no page dates is said in `problems` and makes the listing
* incomplete — never "nothing there".
+ *
+ * R6.2: each row says whether the build carries transcript text for it
+ * (`hasTranscript`): the stats index's flag, or — for a record whose page was
+ * read anyway — its own cues. A manifest lists a record with no transcript
+ * yet (metadata only); a triage must not count it as seen. null: the build
+ * does not say (no stats shipped, or none for this record).
*/
export async function listRecordings(source: ShardSource, args: ListArgs): Promise<RecordingListing> {
const from = args.date_from ? ymd(args.date_from) : null;
@@ -285,6 +291,17 @@ export async function listRecordings(source: ShardSource, args: ListArgs): Promi
index = null;
}
}
+ // R6.2: transcript presence, from the stats index (one read, cached per
+ // source). Absent or unreadable: unknown, never "untranscribed".
+ let stats: Awaited<ReturnType<NonNullable<ShardSource["statsIndex"]>>> | null = null;
+ if (typeof source.statsIndex === "function") {
+ try {
+ stats = await source.statsIndex();
+ if (stats.size === 0) stats = null;
+ } catch {
+ stats = null;
+ }
+ }
const rows: ListedRecording[] = [];
const inRange = (d: string | null) => (!from || (d !== null && d >= from)) && (!to || (d !== null && d <= to));
for (const ch of sel.channels) {
@@ -310,7 +327,7 @@ export async function listRecordings(source: ShardSource, args: ListArgs): Promi
continue;
}
const date = ymd(rec.uploadDate);
- if (inRange(date)) rows.push({ id, channel: ch.name, channelSlug: ch.slug, date, title: rec.title ?? null });
+ if (inRange(date)) rows.push({ id, channel: ch.name, channelSlug: ch.slug, date, title: rec.title ?? null, hasTranscript: statHasText(stats?.get(`${ch.slug}/${id}`)) });
}
let lost = 0;
for (const [page, ids] of undated) {
@@ -328,7 +345,8 @@ export async function listRecordings(source: ShardSource, args: ListArgs): Promi
continue;
}
const date = ymd(r.uploadDate);
- if (inRange(date)) rows.push({ id, channel: ch.name, channelSlug: ch.slug, date, title: r.title ?? null });
+ // The record is in hand: its own cues say, whatever the stats say.
+ if (inRange(date)) rows.push({ id, channel: ch.name, channelSlug: ch.slug, date, title: r.title ?? null, hasTranscript: recordHasText(r) });
}
}
if (lost) {
diff --git a/mcp/src/listRecordings.test.ts b/mcp/src/listRecordings.test.ts
@@ -79,7 +79,9 @@ test("listRecordings lists every recording, uncapped, dated (the index, else the
const all = await listRecordings(src, { channels: ["big"] });
assert.equal(all.complete, true, all.problems.join("; "));
assert.deepEqual(all.rows.map((r) => r.id).sort(), PAGES.flat().map((r) => r.id).sort());
- assert.deepEqual(all.rows.find((r) => r.id === "new-2"), { id: "new-2", channel: "Big Channel (Mirror)", channelSlug: "big", date: "2026-10-13", title: "Title new-2" });
+ // new-2 is dated from its own page, whose cues say it has text; with no stats shipped the rest do not say (null).
+ assert.deepEqual(all.rows.find((r) => r.id === "new-2"), { id: "new-2", channel: "Big Channel (Mirror)", channelSlug: "big", date: "2026-10-13", title: "Title new-2", hasTranscript: true });
+ assert.equal(all.rows.find((r) => r.id === "old-1")?.hasTranscript, null);
const recent = await listRecordings(src, { channels: ["big"], date_from: "2026-10-07" });
assert.deepEqual(recent.rows.map((r) => r.id).sort(), ["new-1", "new-2"]);
const unknown = await listRecordings(src, { channels: ["big", "nowhere"] });
@@ -103,3 +105,34 @@ test("enumerate with `ids` reads only the pages holding them — bounded, so a s
assert.match(text, /restricted to 1 recording id\(s\): 1 held by a channel in scope/);
assert.deepEqual(enumerateOf(text).ids, ["new-2"]);
});
+
+test("R6.2 listRecordings says which recordings have transcript text: the stats index's flag, or a page-read record's own cues", async () => {
+ const d = await mkdtemp(path.join(os.tmpdir(), "mcp-list-text-"));
+ try {
+ await writeFile(path.join(d, "corpus.json"), JSON.stringify({ channels: [{ slug: "big", name: "Big", videoCount: 4 }] }));
+ const ch = path.join(d, "transcripts", "big");
+ await mkdir(ch, { recursive: true });
+ const recs = [
+ rec("has-1", "20261001", ["words"]),
+ { ...rec("bare-1", "20261002", []), cues: undefined }, // listed before its transcript lands
+ rec("has-2", "20261003", ["more words"]), // not in the index: read from its page
+ { ...rec("bare-2", "20261004", []), cues: undefined }, // not in the index, no cues on its page
+ ];
+ await writeFile(path.join(ch, "manifest.json"), JSON.stringify({ version: 1, channelSlug: "big", pageCount: 1, maxPageBytes: 1e6, generatedAt: "2026-10-14", slugToPage: Object.fromEntries(recs.map((r) => [r.id, 0])) }));
+ await writeFile(path.join(ch, "page-0000.json"), JSON.stringify(recs));
+ const sum = path.join(d, "summaries");
+ await mkdir(sum, { recursive: true });
+ const indexed = recs.filter((r) => r.id === "has-1" || r.id === "bare-1");
+ await writeFile(path.join(sum, "manifest.json"), JSON.stringify({ version: 3, totalCount: 2, pageSize: 1000, pageCount: 1, generatedAt: "2026-10-14", channels: [{ slug: "big", name: "Big", count: 2 }] }));
+ await writeFile(path.join(sum, "page-0000.json"), JSON.stringify(indexed.map((r) => ({ slug: r.slug, id: r.id, channelSlug: "big", title: r.title, uploadDate: r.uploadDate }))));
+ const stats = path.join(d, "stats");
+ await mkdir(stats, { recursive: true });
+ await writeFile(path.join(stats, "manifest.json"), JSON.stringify({ version: 6, generatedAt: "2026-10-14", totalCount: 2, pageCount: 1, maxPageBytes: 1e6, channels: [{ slug: "big", name: "Big", count: 2 }] }));
+ await writeFile(path.join(stats, "page-0000.json"), JSON.stringify(indexed.map((r) => ({ slug: r.slug, id: r.id, channelSlug: "big", hasTranscript: r.id === "has-1", cueCount: r.id === "has-1" ? 1 : null }))));
+ const l = await listRecordings(new LocalSource(d), { channels: ["big"] });
+ assert.equal(l.complete, true, l.problems.join("; "));
+ assert.deepEqual(Object.fromEntries(l.rows.map((r) => [r.id, r.hasTranscript])), { "has-1": true, "bare-1": false, "has-2": true, "bare-2": false });
+ } finally {
+ await rm(d, { recursive: true, force: true });
+ }
+});
diff --git a/plans/umtool-redesign.md b/plans/umtool-redesign.md
@@ -467,9 +467,9 @@ mis-transcriptions and adapt by adding its own terms.
| P6a cleanup, docs, audit | `ux/p6a` → `main` `7fb90e6e` | LIVE 2026-10-14 (umtool VUNZhrt6…) |
| P6b 308s, screenshot audit | `ux/p6b` → `main` `850e0989` | LIVE 2026-10-14 (umtool Te2jR-P8…) |
| R6.1 honest tier 0 + R4.1 | `ux/r61` | shipped on the branch |
-| R6.2 seen = transcribed | `ux/r62` | in progress |
-| R6.3 learned spellings | — | after R6.2 (operator, 2026-10-14) |
-| Co-host pilot | — | tick 2 honest and quiet ($0); operator approved: reset after R6.2, terms + `Melanie`/`guests?` (done), then RESUME |
+| R6.2 seen = transcribed | `ux/r62` → `main` `3d8af5b8` | LIVE 2026-10-14 (editor p2L5XyqT…) |
+| R6.3 learned spellings | `ux/r63` | in progress (operator, 2026-10-14) |
+| Co-host pilot | — | RESUMED 2026-10-14 (weekly Mon 06:00 ET; first automatic tick 2026-10-19); seeded with learned spellings when R6.3 lands |
### P2a, as shipped
@@ -3566,3 +3566,109 @@ no ZodError, no queued metas lost), then umtool. Read-only proof on the `jeralyz
term match. The pilot's bad run reset with `report-schedule {"action":"reset-triage"}` (plan, then confirm): run 1, its
2,000-id seen set and the quiet edition it covered removed; the schedule stays paused; tick 2 started.
+### R6.2, as shipped
+
+**What.** The co-host pilot's tick 2 (2026-10-14, after R6.1's reset) listed 23,290 recordings in scope from the
+build's manifests and stored every one in `seen.json` — including recordings the build lists with no transcript yet
+(synced but not transcribed, or a deleted upload with metadata only). A recording seen before its transcript lands is
+never new again, so its late transcript is never judged: the gap R6's by-id rule exists to close. On the `jeralyzer`
+build, 96 of the 23,290 have no transcript; 13 of them are this week's uploads (12 Rumble, 1 Quartering Live) waiting
+on transcription.
+
+- **The listing says which recordings have text** (`mcp/src/enumerate.ts` `listRecordings`). Each row carries
+ `hasTranscript` (`ListedRecording`, `refresh/delta.ts`): the build's stats index's flag (`statsIndex()`, one read
+ per source, cached; `statHasText`), or, for a record the summaries index lacks and whose page is read anyway, its
+ own cues (`recordHasText`). `null`: the build does not say (no stats shipped, no entry) — read as judge-able, as
+ before. The enumerate fallback (a corpus that cannot list) does not say either.
+- **Seen means judge-able** (`triage/tier0.ts`). `splitByTranscript` splits the listing into what can be judged and
+ what waits (`hasTranscript: false`). A waiting recording is neither new nor seen this run, so the run after its
+ transcript lands counts it new by id, and it is a candidate if it matches. `nextSeen` is the stored set: known +
+ judge-able, less the candidates past the cap and less the waiting ones — so an id an earlier run stored while it
+ had no text (tick 2's seen.json) is dropped on the next complete run, and heals. A partial run still stores
+ nothing.
+- **Said.** The tier 0 log has a first line `tier 0: 23,290 listed · 96 without a transcript yet (not seen; new once
+ transcribed)` (`listedWords`, `triage/types.ts`). triage.json's tier 0 carries `untranscribed` (the count) and
+ `untranscribedIds` (the first 50). umtool's triage page counts them under Tier 0
+ (`data-tier0-untranscribed`: "· 96 without a transcript yet", the title saying they are not seen).
+- **R4.1's grammar.** The fetch's transcription-paused skip says "1 recording waits; a later run reads it once
+ transcribed" for one ("N recordings wait; … reads them" otherwise).
+- **For R6.3** (the coordinator's ask): the per-recording flag and the seen rule are small exported functions, each
+ unit-tested — `recordHasText`, `statHasText` (`refresh/delta.ts`), `splitByTranscript`, `nextSeen` (`tier0.ts`).
+- Files touched: `common/lib/report/draft/{refresh/delta.ts,refresh/fetch.ts,triage/tier0.ts,triage/types.ts}`,
+ `common/testing/schedule/opsStub.ts` (a quiet stub triage lists two recordings without a transcript),
+ `mcp/src/enumerate.ts`, `umtool/components/series/TriageView.tsx`, `umtool/e2e/triage-first.spec.ts`; tests in
+ `triage/triage.test.ts`, `refresh/refresh.test.ts`, `mcp/src/listRecordings.test.ts`. Not touched: `BoardView.tsx`,
+ `board.spec.ts`, `umtool/docs/` (the sibling lane's).
+
+**Read-only proof on the real corpus** (offline `tsx` over `export/.export-builds/jeralyzer/out` through
+`createCorpusTools` — the editor's path — no editor, no writes; the pilot's scope, terms and since from its live
+triage.json and seen.json, read only):
+
+| | |
+|---|---|
+| listed | **23,290, complete**: the-quartering 11,585, the-quartering-rumble 8,095, jeremy-hambly 2,421, quartering-live 980, melonie-mac 209 |
+| without a transcript | **96** (the-quartering 4, the-quartering-rumble 79, jeremy-hambly 7, quartering-live 2, melonie-mac 4); none unknown. The brief's four examples (`vmTjKK_Yi5Y`, `jNz-bYBTdPE`, `nKm18mxypnk`, `2P2xsqPgovY`) are among them |
+| of those, uploaded on or after 2026-10-07 | **13**: the-quartering-rumble `v7elaoy` … `v7ep2ba` (12, 2026-10-12 → 14), quartering-live `2P2xsqPgovY` (2026-10-14) |
+| tier 0 as tick 2 ran (first run, by date) | new **92** (tick 2 counted 105: the 13 above now wait), 1 candidate (melonie-mac `-oMa-NtaEOQ`, as tick 2), not partial |
+| would-be-seen | **23,194** (23,290 − 96); tick 2 stored 23,290 |
+| the next tick over the live seen.json (by id) | 0 new; the stored set drops the 96 (heals) → 23,194 |
+| cross-check: the stats flag against each record's own cues | 188 records (the 96 + the 92 new with text): **188 agree** |
+| the listing alone, cold | 1.1–1.4 s, ~300 MB RSS (R6.1's listing without stats: 1.8 s) |
+
+**Commits** (`ux/r62`, from `main` `54dbfb79`; `main` `21880180` — R6.3's plan section — merged before the gates):
+
+| sha | what |
+|---|---|
+| `fa6212c1` | common, mcp: `listRecordings`' `hasTranscript`; tier 0 keeps an untranscribed recording out of new and seen; the listed line; "1 recording waits"; tests (common +3, mcp +1) |
+| `0869f6ca` | umtool: the triage page's Tier 0 count; `triage-first.spec` checks it on the quiet run |
+| `16620c18` | common, mcp: `recordHasText`, `statHasText`, `splitByTranscript`, `nextSeen` as exported functions, unit-tested (+1) |
+| `dcc90df6` | merge `main` `21880180` (plans only) |
+| `66757900` | `[Unreleased]` bullet |
+| (this commit) | this record; the status row |
+
+**Gates.**
+
+| Gate | Result |
+|---|---|
+| repo-wide `tsc --noEmit` | clean at `fa6212c1` and at `66757900` (merged); common + mcp clean at `16620c18` |
+| common (`SETTINGS_FILE` at the primary's, read only) | **4171/4171** at `dcc90df6` (+4: the pieces; a recording listed with no transcript neither new nor seen, new and a candidate once transcribed, the counts logged, a pre-R6.2 seen id healed, unknown judge-able; a run end to end with seen.json; `listedWords`. `refresh.test`'s R4.1 test also asserts the singular) |
+| mcp | **369/369** (+1: the stats flag, a page-read record's cues, both ways) |
+| editor unit | **304/304** |
+| umtool unit (`node --test umtool/lib/*.test.mjs umtool/lib/*/*.test.mjs umtool/report-to-video/*.test.mjs`) | 861 tests, 859 pass, 2 skipped, 0 fail |
+| `pnpm --filter umtool test` | **32/32** |
+| `pnpm run test:scripts` | 1013 tests, 1010 pass, 3 skipped, 0 fail |
+| `archilyzer docs cli --check` / `settings example --check` | clean / clean |
+| capped editor `next build` (heavy slot, `MemoryMax=5G`) | exit 0; compiled 26.9 s, 0:57 wall |
+| capped umtool `next build` (corpus linked inside the heavy slot, `MemoryMax=5G`) | exit 0; compiled 14.7 s, 1:04 wall; the link removed |
+| **full editor e2e** at `66757900` (`export/public` linked from the primary, 0 dangling; queued, detached) | **714 tests: 701 passed, 1 failed, 12 skipped**, 23.5 min. The red: `pacing.spec:195` (a live 429's pick order, `wp429vid1` then `a2`, read one extra pick under load); R6.2 touches no pacing or download code — alone below. Green among the 701: `report-draft.spec:413` (a watch over the fake models; tier 0 on the corpus tools' listing, now with the e2e corpus's stats) and `ops-api.spec`'s report-schedule rows |
+| `pacing.spec` alone (editor) | **2/2, 2/2, 2/2** |
+| **full umtool e2e** at `66757900` (queued, detached) | **543 tests: 533 passed, 4 failed, 6 skipped**, 12.6 min. `triage-first.spec` 7/7 green, including the quiet run's Tier 0 count ("· 2 without a transcript yet"). The four reds are `board.spec`'s serial chain from `:127` (the known race, being fixed in `ux/board-race-2` beside this lane; no board file touched here) |
+| `board.spec` alone (umtool) | **8/8, 8/8, 8/8** |
+
+**Found and left.**
+- **The pilot's live seen.json still holds the 96.** R6.2 heals it on the next complete run, but only for a recording
+ still untranscribed then: one whose transcript lands before that run is in `known` with text, so it is not new and
+ is missed. The 13 this-week recordings are exactly that risk. After rollout, the planned reset
+ (`report-schedule {"action":"reset-triage","id":"co-host-updates"}`, then `"confirm": true`) avoids it: the next
+ tick counts new from its since, and with R6.2 it stores no untranscribed id.
+- **A recording that never gets a transcript** (a deleted upload with metadata only, e.g. `vmTjKK_Yi5Y`) is counted
+ as "without a transcript yet" on every run. Harmless (never judged, never seen); the count says it.
+- **The enumerate fallback** cannot tell; it treats every row as judge-able, as before. No corpus the editor uses
+ lacks `listRecordings`.
+- **`umtool/docs/triage.md`** is the sibling lane's: it should say a recording with no transcript is not seen and is
+ new once transcribed, and name the Tier 0 count.
+
+### R6.2 rollout and the pilot resumed (orchestrator, 2026-10-14)
+
+Gates on `3d8af5b8` (main `21880180` merged): common 4171/4171 in the primary after the fast-forward; full editor e2e 701
+passed, 1 failed (`pacing.spec:195`, one extra pick under load, 2/2 alone three times); full umtool e2e 533 passed, 4
+failed (`board.spec`'s chain from `:127`, being fixed). Editor built and restarted (`scripts/r62-editor-{build,restart}.sh`;
+no ZodError, no queued metas lost), then umtool. **Pilot, operator's rulings ("do your recommendations"):** the watch's
+terms gained `\bMelanie\b` and `\bguests?\b` (transcripts spell her "Melanie"; tier 1 screens the noise at $0);
+tick 2's state reset with `reset-triage` (plan, then confirm: run #1, its 23,290-id seen set that held the 96
+untranscribed recordings, the quiet 2026-10-07 … 10-13 edition line); the schedule **resumed** — weekly, Mon 06:00
+America/New_York, first automatic tick 2026-10-19. Tick 2's review, for the record: tier 0 listed all 23,290, 105 new
+since 10-07 (81 transcribed), one candidate (Melonie Mac's Go Boom Live! Ep 61 plugging her "Bible Time with Melanie
+Mack" channel) rightly dismissed; a broader hand scan of the 81 found nothing co-host related — a quiet week, as the
+record says (no co-hosts for the rest of the year, 2026-09-28; Melonie Mac on hiatus).
+
diff --git a/umtool/components/series/TriageView.tsx b/umtool/components/series/TriageView.tsx
@@ -268,6 +268,12 @@ export default function TriageView({ initial }: { initial: TriageRunView }) {
<span className="font-mono text-meter">{t0.newCount}</span> new{" "}
{t0.newBy === "id" ? "by id since the last run" : t0.newBy === "date" ? `since ${f.since ?? "the start"}` : "named"}
{t0.scanned ? ` · ${t0.scanned} in scope` : ""}
+ {t0.untranscribed ? (
+ <span data-tier0-untranscribed={t0.untranscribed} title="Not seen: new on the run after the transcript lands">
+ {" "}
+ · {t0.untranscribed} without a transcript yet
+ </span>
+ ) : null}
{t0.cut.length ? <span className="text-doubt-text"> · {t0.cut.length} past the cap</span> : null}
{t0.partial ? (
<span className="text-doubt-text" data-tier0-partial="">
diff --git a/umtool/e2e/triage-first.spec.ts b/umtool/e2e/triage-first.spec.ts
@@ -126,6 +126,8 @@ test("a quiet watch: the triage is below the threshold — no article, $0, the t
await page.waitForURL(/\/series\/r6-quiet\/triage\/1$/);
await expect(page.locator("[data-escalation]")).toHaveAttribute("data-escalation", "below");
await expect(page.locator("[data-tier='2']")).toContainText("not escalated: $0 API");
+ // R6.2: listed without a transcript yet — said, not seen.
+ await expect(page.locator("[data-tier0-untranscribed]")).toContainText("· 2 without a transcript yet");
await expect(page.locator("[data-dismissal]")).toHaveCount(3);
await expect(page.locator("[data-flag]")).toHaveCount(0);
});