commit f524be7095de0677a6275403ae2dd74b7dabe508
parent a2cbb4362b1c4085316d10a0aac6019973915615
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 16 Oct 2026 17:50:19 -0400
plans: release 32 lane R1 as shipped (plans/release-32/review-player.md), FACTS (the cited clip, the deck, the edit action, checkReports), CHANGELOG
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 115 insertions(+), 0 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
## [Unreleased]
+- **umtool's drafts review is an audition deck: hear the cited moment, then keep it or cut it.** `/projects/<project>/review` shows one card per drafted field still waiting for a verdict: the drafted value large, the cited span of its clip playing (video when a window or saved video holds it, else audio marked "audio only"), and the quote under it lighting word by word as it is spoken. Swipe right, → or `k` keeps it (approves); left, ← or `x` cuts it (rejects — tap a reason chip or write a few words, never required); up, ↑ or `e` edits it on the card (on-screen text, narration, teaser lines and the YouTube title; Enter keeps it as edited); down, ↓ or `s` skips it to the back; space replays the span; `z` undoes the last keep, cut or skip. Tap a word to mark it misheard: the note says so. Every action is also a button (a bar under the thumb on a phone). The next card's media is already loading, and the deck ends with what was cut and skipped. Verdicts are the same `drafts.review.json` as before; **List** (`?view=list`) is the old list, whose reader now plays the span too. No model is needed for any of it.
+- **Fetch clip wherever a citation is shown in umtool.** When nothing on disk holds a cited span — on the deck, in the list's reader, on an article's evidence panel and its evidence walk — **Fetch clip** asks the editor for those seconds exactly as the MCP's `fetch_clip` does, shows its progress, and plays the window when it lands. A rate limit says the platform is rate-limiting; a window the audio check refused says the source served corrupt audio. The evidence panel plays video first and has **Play span** (from the span's start to its end).
+- **Verify quotes and Check report on an article's page.** The Article tab has **Verify quotes** (what `archilyzer reports verify-quotes --article <id>` prints: each quote's status — ok, fragment, inexact, drift, en-orig-drift — its score and track, with **Play** to hear it) and **Check report** (what `archilyzer reports check --article <id>` says: compose would pass, or each problem in its own sentence, with **Play** where it names a citation; **allow missing media** as `--allow-missing-media`). The article's respellings apply. Needs a restart of umtool.
- **Odysee downloads always get the audio check, clip windows included.** A video from Odysee — which intermittently serves corrupt audio — is downloaded with the audio check on unless its channel turns it off (`audioCheck: {"enabled": false}`); before, a channel had to opt in. A clip window from such a source now gets the check's final probe too: a malformed window is deleted and fetched once more, and if it is malformed again the fetch fails and nothing is kept, so a clip is never cut from corrupt audio. The verdict is recorded in the window's provenance.
- **An article can correct what the transcripts mishear in its quotes.** `archilyzer reports respell <article> --heard "cake cup,cakeup" --reads K-Cup` previews every change — the article's quotes and citations, its report's own words, and its video's burned-in quotes and flip cards — as before → after, and writes nothing; `--apply` writes it, each file backed up first. `--bracket` shows the correction as an altered quote, `[K-Cup]`. The article records the respelling, and every quote check applies it to the transcript before comparing, so a corrected quote still verifies exactly; the transcript itself is untouched. A video shows the new words once it is rebuilt.
- **`pnpm ops audio-audit` checks the audio already on disk, file by file.** `pnpm ops audio-audit --json '{"platform":"odysee"}'` (or `{"slug":"<channel>"}`; `"scope":"all"` for transcribed videos too, `"max"` to cap the files) decodes each audio file a channel holds with error tolerance — one file at a time, at the lowest CPU and disk priority — and writes what it found beside the file in `audio-integrity.json`: clean, damaged (part of it will not decode) or undecodable, with how much decodes and where the gaps are. Audio downloaded before the audio check existed, or on a channel without it, was never checked. The same command again skips the files already checked. A drive that stops answering ends that channel's run with a sentence that says so instead of hanging.
diff --git a/plans/FACTS.md b/plans/FACTS.md
@@ -9914,3 +9914,34 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri
- The editor's Configure form writes `audioCheck` only when its box is ticked: an Odysee channel with no `audioCheck`
shows an unticked box though the check is on (owed: show the default).
+
+## Release 32 lane R1: the cited clip, the audition deck, the article's checks (verified 2026-10-16, branch `r32/review-player`)
+
+- **What plays a cited span** is `umtool/lib/clips/cited.ts` `findCitedPlay(target)`: a project clip's own cached
+ window first (`/api/report/raw?project&clip&file`, when the target names `project`+`clip`), then the corpus's
+ (`corpusPlay`: clip window → saved video → audio, through `resolveEvidenceSource`). `lib/articles/evidence.ts`'s
+ corpus step is `corpusPlay` (one implementation); the site's PREPARED clip still comes first there.
+ A target's `channel`/`video` are the corpus's DIRECTORIES — a Rumble entry's local dir is the manifest's `video`,
+ never `siteVideo`. The review's span is `cutStart`/`cutEnd` when the entry has both, else `start`/`end`.
+- **`GET /api/cited/play?channel&video&from&to[&project&clip][&audio=1]`** → `{ play, fetchLine }`;
+ **`POST /api/cited/fetch`** `{channel, video, from, to, reason, report?, project?, clip?}` or `{job, …span}` →
+ `{state: "ready", cached, play}` | `{state: "queued", job, status}` | `{state: "failed", message, detail?}`. It calls
+ the MCP's `fetchClip` directly (`requestedBy: "umtool"`, default pad 3, `wait_seconds: 0`) with no research-source
+ lookup: the corpus's directories are the editor's. `message` is `lib/clips/words.ts` `fetchFailureSentence` (a 429 /
+ cooldown → "<platform> is rate-limiting fetches", the audio check's "malformed" → "corrupt audio"), `detail` the
+ editor's own words.
+- **The drafts route's `edit` action** (`/api/report/drafts`, `{address, text, note?, token?}`): the text becomes the
+ field's value through `lib/report/draftEdit.mjs` `valueFromEdit` (onscreen: line 1 title, the rest subtitle;
+ narration: the text, other keys kept; lines: one per line, an object line keeps its keys; publish.youtube: line 1
+ the title) and is written by `writeDraftedField` (the operator's after, as `use`); a field that still has a review
+ row after the write (a narration) is approved on its new words. Other fields refuse ("edited in its own section").
+- **`/projects/<id>/review` is the audition deck; `?view=list` is the list** (`reviewHref(p, {view: "list"})`). The
+ deck's CUT writes the chosen reason, else the note "cut on the deck" (the writer still requires a rejection note);
+ marked words append "misheard: <words>" to the note. Undo covers keep, cut and skip (20 deep), not an edit (History).
+ A mishearing's "fix this mishearing" link is the article page with `?tab=article&heard=<words>` — the parameter
+ R2's respell form may read.
+- **`checkReports(opts)`** (common/bin/reports-check.ts) is `reports check` as data — `usage | empty | pass | fail |
+ error`, each fail's problems `{kind, where, message, report?, citation?, line}`; `checkMain` only prints it.
+ umtool's `lib/articles/checks.ts` runs it and `verifyReportQuotes` in-process over `sitesPaths()` (the store's
+ article: `--article`; a site's report: `siteId` + `reports: [id]`); `POST /api/articles/checks {site, report, what:
+ "quotes" | "check", allowMissingMedia?}`.
diff --git a/plans/release-32/review-player.md b/plans/release-32/review-player.md
@@ -0,0 +1,81 @@
+# Release 32 lane R1 — verify by playing the citation: the cited clip, the audition deck, the article's checks (as shipped)
+
+Operator asks (2026-10-16): "can we not play the citation audio in the umtool review screen? We should be able to play
+the video, even, to verify it — that's the only point it should need to hit a human"; then, for the drafts review,
+"similarly to a mobile app like Tinder … move fast when auditing clips … the perfect mix of AI heavy lifting with a
+human auditing ear". The release rule: every step a model can do, a person can do in the UI; verification needs no
+model. Rulings followed: the drafts review becomes a one-card deck (keep → / cut ← / edit ↑ / skip ↓, undo z, space
+replays), the list one toggle away; decisions through the existing `drafts.review.json` writer; the CLI's
+`verify-quotes --article` and `check --article` as buttons running the same functions in-process.
+
+## What
+
+- **The cited clip** (`components/clips/CitedClip.tsx`, `lib/clips/cited.ts`): a span plays VIDEO first (a project's
+ cached window, a corpus clip window, a saved video), else audio labelled "audio only"; **Play span** plays from the
+ span's start and stops at its end; with nothing on disk, **Fetch clip** asks the editor's fetch-window exactly as
+ the MCP's `fetch_clip` does (`requestedBy: "umtool"`), polls, and plays what lands; a failure is said plainly (a
+ rate limit; corrupt audio from the audio check). Two faces: `panel` (native controls) and `card` (no chrome, tap
+ replays, a span-only scrubber). Its buttons never take focus and the media gives focus back, so a page's keys keep
+ working. Mounted in the evidence panel (so the article reader and the evidence walk get video-first and Fetch clip;
+ the walk's space plays the span) and in the drafts list's reader.
+- **The audition deck** (`components/projects/review/AuditionDeck.tsx`), the default of `/projects/<id>/review`: one
+ card per field awaiting review — the drafted value (Archivo, large), the span autoplaying after the first "Start
+ review" gesture, the LIT LINE (the quote in the reader serif, each word underlined in Signal as playback reaches
+ it; `lib/clips/words.ts` `spokenWords` spreads each cue's words over its span and finds the quote's words in
+ order), the source and "drafted by". Swipe (30 % of the width or a 0.6 px/ms flick), key or button: KEEP approves,
+ CUT rejects (a reason chip or a few words, else "cut on the deck"), EDIT rewrites on-screen text / narration /
+ teaser lines / the YouTube title on the card (Enter keeps it as edited; other fields link the Media tab), SKIP goes
+ to the back, z undoes keep/cut/skip (20 deep). Tapping a word marks it misheard ("misheard: …" in the note; on Edit
+ a "fix this mishearing" link to the article page with `heard=`). The next card is rendered underneath with its
+ media preloading; the card after the next has its play lookup warmed. The decided card flies out as a picture
+ (160 ms; 80 ms fade with reduced motion) so no key is lost to the animation. Counter `n / N · k kept · c cut · s
+ skipped`; the end is a summary listing cut and skipped, "Review the skipped ones", "Review the cut ones again",
+ "Back to the Media tab". `?view=list` is the list (j/k, a, r), its reader now with the player.
+- **The drafts route's `edit` action** (`lib/report/draftEdit.mjs`): text → value, written through
+ `writeDraftedField` as the operator's; a field still under review after the write (a narration) is approved.
+- **Verify quotes / Check report** on the article page (`components/articles/ArticleChecks.tsx`, mounted with one line
+ in `ArticlePage.tsx`'s article line; `lib/articles/checks.ts`; `POST /api/articles/checks`): per quote its status,
+ score, track, en-orig score, message and a **Play**; check's pass/fail summary, allowed and warning lines, each
+ problem with its sentence and a **Play** where it names a citation; "allow missing media". In-process, no model.
+- **common:** `checkReports` (reports-check.ts) returns `reports check`'s findings as data; `checkMain` prints it,
+ byte-for-byte as before.
+
+## Files
+
+common: `bin/reports-check.ts`, `bin/reports-check.test.ts`. umtool: `lib/clips/{types.ts, cited.ts, words.ts,
+cited.test.ts, words.test.ts}`, `app/api/cited/{play,fetch}/route.ts`, `components/clips/CitedClip.tsx`,
+`components/articles/{EvidencePanel.tsx, ArticleChecks.tsx, ArticlePage.tsx}`, `lib/articles/{evidence.ts,
+checks.ts}`, `app/api/articles/checks/route.ts`, `components/projects/{ReviewPage.tsx, MediaDrafts.tsx,
+ProjectView.tsx, review/AuditionDeck.tsx}`, `app/api/report/drafts/route.ts`, `lib/report/{draftEdit.mjs,
+draftEdit.test.mjs}`, `lib/hrefs.ts` (`reviewHref(p, {view})`), `package.json` (test glob `lib/clips/*.test.ts`);
+e2e `review-player.spec.ts`, `fixtures/review-player-fixture.mjs` (+ registered in make-fixture.mjs), and
+`draft-review`, `bench-shell`, `running`, `visual-audit` specs opening `?view=list`. FACTS.md, CHANGELOG.
+
+## Interfaces
+
+- `GET /api/cited/play?channel&video&from&to[&project&clip][&audio=1]` → `{play: CitedPlay | null, fetchLine}`.
+- `POST /api/cited/fetch` `{channel, video, from, to, reason?, report?, project?, clip?}` | `{job, …span}` →
+ `{state: "ready", cached, play} | {state: "queued", job, status} | {state: "failed", message, detail?, job?}`.
+- `POST /api/report/drafts` `{project, action: "edit", address, text, note?, token?}`.
+- `POST /api/articles/checks` `{site, report, what: "quotes" | "check", allowMissingMedia?}`.
+- `checkReports(opts): Promise<ReportsCheckResult>` (common/bin/reports-check.ts).
+- `/projects/<id>/review?view=list`; the deck links the article page with `?tab=article&heard=<words>` for R2's
+ respell form.
+
+## Gates
+
+See the lane report for the run-by-run numbers: tsc clean (all packages) before each commit; umtool unit 42 (was
+33: +6 words, +3 cited), common 4449 tests (4448 pass, 1 skip; +1 `checkReports`), test:scripts (draftEdit +4);
+umtool `next build` with the corpus linked: clean. e2e (umtool, single specs, fixture run): review-player 2/2;
+draft-review + bench-shell 9/9; running + article-evidence 7/7; visual-audit + review-player 67/67. Screenshots of the
+deck at 390 and 1366 px and of the checks: `$T/shots/r32r1-*.png`.
+
+## Decisions
+
+- Word timing spreads each cue's words evenly over the cue (no transcript shape in the corpus carries word offsets;
+ a parakeet `transcript.json` has chunk times only); fewer than half the quote's words found → even spread.
+- The writer still requires a rejection note; the deck writes the chosen reason or "cut on the deck".
+- An edit is not undone with z (it is a manifest write with a snapshot; the History tab restores it).
+- A field without a clip has no "cited moments" chips: nothing links such a field (YouTube text, a social post) to
+ moments today.
+- Mishearing marks are kept in the session and written into the verdict's note, not a new file.