commit 180f7a7732a2a52a89dd737258f655c4e46ee2ab
parent 05a1677f634ba422a7a2b65b517a56363823dc8d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 20:43:49 -0500
umtool quote-check --take: a take's clips judged into takes/<t>/quote-check.json; the take's render, check --take and window --take --align read them
Cause: quoteCheckCommand read the project's manifest and wrote <project>/quote-check.json only, and
every reader -- makeTake's gate, umtool check (reportDecisions), window --align -- read that one file.
A take whose patch carries its own clips (rev9-a9) was never judged: its clips' rows were either the
draft's (when the cut matched) or stale.
Fix: `--take <t>` (quoteCheck.mjs) judges the take's manifest as it renders (resolveTakeManifest, its
clip rulings applied) and stores the rows in takes/<t>/quote-check.json (runQuoteCheck `store`); the
project's file is untouched. readTakeQuoteCheck lays the take's rows over the project's by clip id, so
a clip the take never judged keeps the project's row (current only while the cut and quote are the
same -- today's gate, unchanged for a take with no file of its own). makeTake's gate reads it;
`umtool check <p> --take <t>` replaces the project's clip-quote rows with the take's
(takeQuoteDecisions, fixes naming --take); `window --take --align` aligns to the take's row;
`--status --take` says which rows came from the project. verbs/groups rows, cli.md regenerated,
knobs.md.
Test: lib/report/quoteCheckTake.test.mjs.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
9 files changed, 241 insertions(+), 33 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -110,6 +110,7 @@
- **Bad clip windows of one video can be evicted, and nothing else.** `evict-clips` only evicted by age, a channel at most, so the four windows cut from a corrupt saved video could not be removed without emptying the channel's cache. `pnpm ops evict-clips --json '{"slug": "<slug>", "id": "<video>"}'` now evicts every cached window of that one video; `"windows": ["<from>-<to>", …]` (the cache's own names) narrows it to those, and `"covering": [{"from": s, "to": s}, …]` to every window that overlaps a span, a wider window holding it included. A set-aside `.desynced` window of a targeted span goes with it, `"dryRun": true` only lists, and `"olderThanDays"` is optional here (still required for the by-age form). A video that does not exist is said in the run's summary, as is a named window that is not cached; an unknown shape is refused by name. umtool asks for it: `umtool fetch <project> --refetch <clipId>[,<clipId>…]` evicts the windows overlapping those clips' fetch spans, waits for that, then fetches as usual (`--refetch-video <slug>/<id>` for every window the project asks of a video; `--dry-run` evicts nothing), and records what went in `fetch-runs.json`. Needs a restart of the editor.
- **A saved alternate can be dropped once it has been checked.** A download over a copy already in the saved-video store keeps both and flags the other copy (`source-media.alt-<h>p-<stamp>.<ext>`, listed by `pnpm ops get saved-alternates`), but nothing could remove one alternate after the check: the only deleter took the whole video. `pnpm ops drop-saved-alternate --json '{"slug": "<slug>", "id": "<video>", "file": "<alternate>"}'` now deletes that one copy from the store and its entry from `saved-video.json`, leaving the rest of the pointer as it was (`alternates` goes when it empties); `"dryRun": true` says what it would free and changes nothing. The active copy, a name the pointer does not list and any path are refused, and so is a store being moved; an alternate already gone from disk is cleaned from the pointer. The video page's Source video card now lists a saved video's alternates, each with **Drop this alternate** (and a confirm). No undo. Needs a restart of the editor.
- **umtool: a take's windowed preview shows the seconds you asked for, with its chrome, in its own file.** `umtool take <p> --id <t> --preview --at 440 --dur 170` timed the window over the project's draft rather than the take, so on a take with its own timeline it rendered a different stretch (92 s of early clips), its timeline and counters started from zero, and it was written over the take's full preview. `--at`/`--dur` with `--preview` are now seconds of the take's own cut, timed by its last preview's or render's schedule (or, with neither, its entries' own lengths, said as estimates); an `--at` past the end is refused. The whole take is built, reusing its segments, and only the window is laid and encoded, with the deck at its state at that second (build-video's new `--cut-window <at> <dur>`). The file is `takes/<t>/out/<slug>.preview.<at>-<to>.mp4`, built in `out/window/`; the full preview is never touched. `--preview` without `--at`, and a take's own window, render as before.
+- **umtool: the quote check can judge a take.** `umtool quote-check` only judged the project's draft, so a take with clips of its own was never checked (on 12 Nov, 25 rows blocked the draft and the take went unjudged), and a take's render was gated by the draft's rows alone. `umtool quote-check <p> --take <t>` now judges the take's clips as it renders them and keeps the rows in `takes/<t>/quote-check.json`; the project's `quote-check.json` is not touched. A take's render, the new `umtool check <p> --take <t>` and `umtool window <p> <clip> --take <t> --align` read the take's rows first; a clip the take has not been checked for keeps the project's row, as before. `--status --take <t>` lists the take's rows and says which came from the project.
## [0.12.0] - 2026-10-28
- **An X post's screenshot is of the post, not of a page in the middle of laying itself out.** On 2026-10-27 a forced capture of TheQuartering's post 2114859155022389342 came out shifted about 100 px: its left edge cut off, X's menu laid over its words and the gap beside the column showing; another post once came out as a strip of the post above it. The shot was a full-page capture, which resizes the page for the moment of the capture — in the X session profile the page saw its window go to 1×1 — and X laid itself out again for that size while it was being captured, so the shot was cut from a different layout than the one measured. A post is now shot from the window as it stands: scrolled into it, the window made taller first when the post is taller than it, so nothing is resized under the shot; and the post is measured again after the shot and shot again if it moved. An X Article's shot is taken the same way. Posts taller than the tallest window (16,384 px) are still shot from a full-page capture. Needs a restart of the editor.
diff --git a/umtool/bin/umtool.mjs b/umtool/bin/umtool.mjs
@@ -13,11 +13,11 @@
// umtool ls [--kind K] [--template T] [--state S] [--open] [--blocking]
// [--q TEXT] [--sort name|recent] [--json]
// umtool show <project> [--json]
-// umtool check [<project> | --all] [--json] exit 1 on anything blocking
+// umtool check [<project> | --all] [--take <t>] [--json] exit 1 on anything blocking (--take: the take's quote rows)
// umtool links <project> [--json] [--fix] do the clip QRs open on their sites (out/links.json)
// umtool cast [ls|add|set|rm|undo|project|audition|use|reread] … the characters' voices across projects (castCli.mjs)
// umtool speaker-check <project> [--clip <id> …] [--set 'Name=…'] [--list] which named voice each clip is (speaker-check.json)
-// umtool quote-check <project> [--clips a,b] [--status] is each clip's quote in the seconds it plays (quote-check.json)
+// umtool quote-check <project> [--take <t>] [--clips a,b] [--status] is each clip's quote in the seconds it plays (quote-check.json; a take's: takes/<t>/)
// umtool check-joins <project> --take <id> [--json] [--all] do the post joins of a rendered take carry on, or jump
// umtool link-policy <project> [--via <site>] [--direct a,b] [--clear] [--fix] cite via site X; these channels direct
// umtool decisions [--json]
@@ -416,7 +416,25 @@ async function cmdCheck() {
const one = positional[0];
const refs = one ? [await pick(one)] : await projectRefs();
const rows = [];
- for (const p of refs) rows.push(...(await decisionsFor(p)));
+ // --take <t>: the project's rows, its quote check's for the TAKE's clips and the take's verdicts
+ // (quoteCheck.mjs takeQuoteDecisions: takes/<t>/quote-check.json over the project's).
+ const take = val("--take");
+ if (take !== undefined && !one) die("--take names a take of one project: umtool check <project> --take <t>");
+ for (const p of refs) {
+ const ds = await decisionsFor(p);
+ if (take === undefined) {
+ rows.push(...ds);
+ continue;
+ }
+ const { takeQuoteDecisions } = await import("../lib/report/quoteCheck.mjs");
+ let own;
+ try {
+ own = await takeQuoteDecisions(p, take);
+ } catch (e) {
+ die(`--take ${take}: ${e?.message ?? String(e)}`);
+ }
+ rows.push(...ds.filter((d) => d.kind !== "clip-quote-moved" && d.kind !== "clip-quote-missing"), ...own);
+ }
const sorted = sortDecisions(rows);
const blocking = sorted.filter((d) => d.severity === "blocking");
@@ -1147,8 +1165,9 @@ async function cmdWindow() {
// manifest (or the take's) holds it now.
if (has("--align")) {
if (patch.cutStart !== undefined || patch.cutEnd !== undefined) die("--align sets the cut; give it or --cut-start/--cut-end, not both");
- const { alignPatch, readQuoteCheck } = await import("../lib/report/quoteCheck.mjs");
- const doc = await readQuoteCheck(p.dir);
+ const { alignPatch, readQuoteCheck, readTakeQuoteCheck } = await import("../lib/report/quoteCheck.mjs");
+ // A take's clip: the take's verdicts (quote-check --take) over the project's.
+ const doc = val("--take") !== undefined ? await readTakeQuoteCheck(p.dir, val("--take")) : await readQuoteCheck(p.dir);
let entry = null;
if (val("--take") !== undefined) {
const { resolveTakeManifest } = await import("../lib/report/takeManifest.mjs");
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -19,7 +19,7 @@ Inbox cannot disagree about what is wrong with one.
|---|---|
| `ls [--kind --template --state --open --blocking --q --sort --json]` | the index, as text or JSON |
| `show <project> [--json]` | one project: summary, the cut, per-clip status, decisions |
-| `check [<project>] [--json]` | **exit 1 on anything blocking** — including an `out/`, `clips/` or `share-*/` link whose drive is not there (`storage-unreachable`) |
+| `check [<project>] [--take T] [--json]` | **exit 1 on anything blocking** — including an `out/`, `clips/` or `share-*/` link whose drive is not there (`storage-unreachable`). `--take T`: the quote check's rows are the TAKE's — its clips, judged by `takes/T/quote-check.json` over the project's |
| `links <project> --embed-ids [--clips a,b] [--dry-run] [--json]` | the **published embed id**: every clip citing a Rumble URL-slug folder the archive does not serve gets `siteVideo` (the folder's `metadata.info.json` id, shareLine.mjs `siteVideoFor`), a citeUrl naming the folder moved with it; no network, one write, one undo point. The Cut tab's Project › Rumble cites ([knobs.md](knobs.md#the-inspector-panels-this-weeks-hand-edits-in-the-ui)) |
| `links <project> [--json] [--fix]` | do the clip QRs open on their sites? `corpus.json` → the channel's manifest → `slugToPage` → the shard's record, one request at a time, shards from the cue cache; recorded in `out/links.json`, which `check` reads (`link-dead` blocking, `links-unverified`, `links-unchecked`); `--fix` rewrites a Twitch id the site serves as `v<id>`, and a Rumble folder id (the URL slug) as the embed id the site serves (the clip gets `siteVideo`); **exit 1** when a link is dead ([knobs.md](knobs.md#do-the-qr-links-open)). The same record dates each site's deploy: a cited video newer than it is `site-deploy-behind` ([knobs.md](knobs.md#the-sites-the-links-depend-on)) |
| `cast [ls] \| add <id> --name … --voice <engine:voice> [--handles a,b] [--speakers …] [--speed s] [--convert-engine e] [--convert-voice v] [--convert-pitch target\|source\|contour] [--convert-semitones n] [--enhance on\|off] [--trim on\|off] [--trim-pad ms] [--direction "…"] [--narrator] \| set <id> … \| rm <id> \| undo [--json]` | **THE CAST** (`<reports>/.umtool/cast.json`, [knobs.md](knobs.md#the-cast-each-characters-voice-in-every-project-and-the-voices-page)): the characters across projects, one writer, an undo point a write. **A character is a PRESET**, two of them ([knobs.md](knobs.md#a-character-is-a-preset)): `synthetic` -- the STOCK voice it reads in (`--voice`) and its speed (`--speed` 0.5–2; Orpheus has none) -- and `recorded` -- what a recording of them is made into: the stock voice (`--convert-voice`; a file or a recording is refused), the engine, the **pitch** the converted read lands on (`--convert-pitch`: `target` the stock voice's own, `source` the pitch it was read at, `contour` the read's rises and falls at the stock voice's register; `--convert-semitones` -12…12 moves a followed one), whether it is cleaned first (`--enhance`), its edges trimmed to speech (`--trim`, `--trim-pad` the ms kept either side) and a `--direction` (one line for the person reading, never sent to a model). `set` lays the flags given over the presets; `default` for one takes that key off; `--no-convert`, `--no-speed`. A version 1 file (`voice`, `convert` at a character's top) reads as these presets and the first write makes it version 2 (`undo` puts the old file back). A followed pitch on an engine that has none, semitones with nothing followed, a speed or a pad out of range: **exit 1** |
@@ -28,7 +28,7 @@ Inbox cannot disagree about what is wrong with one.
| `cast assign <project> [--model] [--dry-run] [--json]` · `--accept <id>` · `--accept-all` · `--reject <id>` · `--reject-all` · `--change <id> [--voice <engine:voice>] [--speed s] [--name "…"] [--direction "…"] [--anonymous [--shown "…"] \| --no-anonymous]` | **AUTO-ASSIGNMENT BY RULE** ([knobs.md](knobs.md#proposed-characters-cast-assign)): every post item's author gets a character -- the item's own, this video's, its voice map's or the cast's; an author with none a **PROPOSED** character of this video: an id from the handle, their name, a STOCK Kokoro voice -- the next, in one fixed rotation (a male and a female voice in turn), that this project does not use yet; a gender hint only from the profile's own stated pronouns when the capture carries them. Proposals are kept apart in `<project>/narration/characters.json` (`proposed`; the same writer, an undo point: `cast project <p> undo`) and are **applied to nothing** -- no item, no picked read -- until a person accepts. `--accept <id>` / `--accept-all`: this video's character, named (`narration.character`) on that author's items that name none -- no take made or changed (a picked read in another voice shows as drift); `--change <id>`: its voice (a stock one only), speed, name, direction or anonymity -- the row is then a person's, never re-sent to a model or overwritten; `--reject <id>` / `--reject-all`: dropped. An author an anonymous character covers is never proposed for and never sent to a model. A proposal whose author has a character now is dropped by the next run. `--dry-run` writes nothing. **`--model`** (on request only): the generation task `cast-assign`, routed by `settings.generation` like the other tasks, is asked per author (display name, bio, post text -- untrusted) for `{character, voice, speed, direction}`; each field is checked (a stock voice, a speed 0.5–2, one plain line, control characters stripped) and laid over the rule's row, which stays when the answer fails. Refused: **exit 1**, nothing written |
| `cast audition <character\|@handle> --voices a,b,… [--project <p>] [--text "…" \| --item <id> \| --line <n> \| --stock] [--no-score \| --score-only] [--json] [--progress ndjson]` | **AN AUDITION**: one line read by 2-6 stock voices through the editor's tts op, levelled to -20 LUFS in `<p>/narration/auditions/` (cached), scored for closeness to the character's real voice (`speakers.json`; TitaNet, local) |
| `speaker-check <project> [--clip <id> …] [--json] [--progress ndjson]` · `--set 'Name=<clip>,<channel>/<id>,channel:<slug>'` · `--remove <name>` · `--list` | which of the project's **named voices** (`speakers.json`) each clip is: TitaNet-small, local, against each voice's robust centroid → `<project>/speaker-check.json` (merged); the walk's **Speaker:** badge and **Check speaker** ([report-video.md](report-video.md#the-speaker-check-on-the-walk-which-of-several-voices)) |
-| `quote-check <project> [--clips a,b] [--pad S] [--json]` · `quote-check <project> --status` | **is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; the editor's work files go to `<project>/.quote-check/`, never under `out/` (a link onto a media drive the editor will not write in); `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays)) |
+| `quote-check <project> [--take T] [--clips a,b] [--pad S] [--json]` · `quote-check <project> [--take T] --status` | **is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; the editor's work files go to `<project>/.quote-check/`, never under `out/` (a link onto a media drive the editor will not write in); `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them; `--take T` judges the take's own clips into `takes/T/quote-check.json`, which the take's render, `check --take T` and `window --take T --align` read over the project's rows ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays)) |
| `check-joins <project> --take <id> [--json] [--all] [--limit <n>]` | do a rendered take's **post joins carry on**: every boundary of its master where the next post item draws a post the one before showed, its planned join, the SSIM across it and the largest frame-to-frame step (read-only, ffmpeg) -- worst first ([report-video.md](report-video.md#thread-scenes-whole-threads-the-join-manual-threads-wide-attachments-context-media-link-visits-the-branch-map)) |
| `link-policy <project> [--via <site id \| https://…>] [--direct <slug,…>] [--clear] [--fix] [--json]` | the project's **link policy** (`provenance.linkPolicy`): cite via site X, these channels direct. With no flag, prints it and every clip whose QR breaks it; `--fix` rewrites each one that has a fix through the window writer; new clips are written by it. **Exit 1** when a clip still breaks it ([knobs.md](knobs.md#the-link-policy)) |
| `patch-markers <project> [<file>.patch.json] [--fix] [--json]` | take patches whose deck markers name a clip not in the cut (a take made with one is refused); `--fix` gives each the `after` of the cut's marker of the same label; **exit 1** when one is left ([knobs.md](knobs.md#take-patches-follow-a-removal)) |
@@ -167,7 +167,7 @@ draft (the project's manifest); *project*: a project's other files, or reads; *c
|---|---|---|
| `ls [--kind KIND] [--template TEMPLATE] [--state STATE] [--open] [--blocking] [--q Q] [--sort recent\|name]` | every project, as text | form · *corpus* |
| `show <project>` | one project: summary, the cut, per-clip status, decisions | form · *project* |
-| `check [<project>] [--all-severities]` | what blocks a build (exit 1 on anything blocking) | form · *project* |
+| `check [<project>] [--take TAKE] [--all-severities]` | what blocks a build (exit 1 on anything blocking) | form · *project* |
| `links <project> [--fix] [--embed-ids] [--clips CLIPS] [--dry-run]` | do the clip QRs open on their sites (out/links.json) | form · *project* |
| `provenance <project> ls` | the project's provenance: site origin, channel slug, channel, link policy | form · *project* |
| `provenance <project> set [--site-origin SITE-ORIGIN] [--channel-slug CHANNEL-SLUG] [--channel CHANNEL]` | the project's site origin, channel slug and channel name ("" removes one) | form · *draft* |
@@ -191,7 +191,7 @@ draft (the project's manifest); *project*: a project's other files, or reads; *c
| `cast reread <project> <character> [--dry-run]` | the items that say a character in another voice, read again | form · queued · *project* |
| `cast assign <project> [--model] [--dry-run] [--accept ACCEPT] [--accept-all] [--reject REJECT] [--reject-all] [--change CHANGE] [--voice VOICE] [--speed N] [--name NAME] [--direction DIRECTION] [--anonymous] [--shown SHOWN] [--no-anonymous]` | a proposed character for each author with none (by rule; --model on request); accept, change, reject | form · *project* |
| `speaker-check <project> [--clip CLIP…] [--list] [--set SET] [--remove REMOVE]` | which named voice each clip is (speaker-check.json) | form · queued · *project* |
-| `quote-check <project> [--clips CLIPS] [--pad N] [--status]` | is each clip's quote in the seconds it plays | form · queued · *project* |
+| `quote-check <project> [--take TAKE] [--clips CLIPS] [--pad N] [--status]` | is each clip's quote in the seconds it plays | form · queued · *project* |
| `check-joins <project> --take TAKE [--all] [--limit N]` | do a rendered take's post joins carry on | form · queued · *project* |
| `link-policy <project> [--via VIA] [--direct DIRECT] [--clear] [--fix]` | cite via site X, these channels direct | form · *draft* |
| `patch-markers <project> [<file>] [--fix]` | take patches whose deck markers name a clip not in the cut | form · *draft* |
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -127,6 +127,13 @@ until checked again (`prep --status` counts the stale ones). `umtool check` call
clip like an incorrect one — unless a person heard it and ruled: `umtool window <p> <clip>
--quote-ruled` (`quoteRuled` on the clip; `--no-quote-ruled` clears it).
+**A take's clips** are judged with `--take <t>`: the take as it renders (its patch over the draft, its
+clip rulings applied), the rows in `takes/<t>/quote-check.json`, never the project's file
+(`umtool quote-check <p> --take <t> [--clips a,b]`, `--status --take <t>`). The take's render,
+`umtool check <p> --take <t>` (its quote rows replace the project's) and `umtool window <p> <clip>
+--take <t> --align` read the take's rows over the project's: a clip the take never judged keeps the
+project's row, which counts only while the take's cut and quote are the same.
+
The recording's own clock is the editor's (AGENTS.md, "Two FILES of one recording disagree too"): a
Rumble window is cut from the saved whole recording through `data/<id>/clock.json`, so a clip fetched
since reads `ok`; the check is what catches a span on a step of that map, a map that could not be
diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs
@@ -41,11 +41,11 @@ export const GROUPS = [
{
cmd: "check",
usage: [
- " umtool check [<project>] [--json] exit 1 on anything blocking",
+ " umtool check [<project>] [--take T] [--json] exit 1 on anything blocking (--take: the take's quote rows)",
],
docs: [
- ["`check [<project>] [--json]`",
- "**exit 1 on anything blocking** — including an `out/`, `clips/` or `share-*/` link whose drive is not there (`storage-unreachable`)"],
+ ["`check [<project>] [--take T] [--json]`",
+ "**exit 1 on anything blocking** — including an `out/`, `clips/` or `share-*/` link whose drive is not there (`storage-unreachable`). `--take T`: the quote check's rows are the TAKE's — its clips, judged by `takes/T/quote-check.json` over the project's"],
],
},
{
@@ -102,14 +102,15 @@ export const GROUPS = [
{
cmd: "quote-check",
usage: [
- " umtool quote-check <project> [--clips a,b] [--pad S] [--json] | --status is each clip's quote in the seconds it plays?",
+ " umtool quote-check <project> [--take T] [--clips a,b] [--pad S] [--json] | --status is each clip's quote in the seconds it plays?",
" the cut ±15 s of the source the render would use, transcribed by the editor (words on), the quote",
" found in it and in the cues: ok | moved (heard N s away: window --align) | not-found -> quote-check.json;",
- " check calls moved and not-found blocking, and a take refuses them unless the clip is --quote-ruled",
+ " check calls moved and not-found blocking, and a take refuses them unless the clip is --quote-ruled;",
+ " --take T judges the take's clips into takes/T/quote-check.json (check --take and the take read it)",
],
docs: [
- ["`quote-check <project> [--clips a,b] [--pad S] [--json]` · `quote-check <project> --status`",
- "**is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; the editor's work files go to `<project>/.quote-check/`, never under `out/` (a link onto a media drive the editor will not write in); `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays))"],
+ ["`quote-check <project> [--take T] [--clips a,b] [--pad S] [--json]` · `quote-check <project> [--take T] --status`",
+ "**is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; the editor's work files go to `<project>/.quote-check/`, never under `out/` (a link onto a media drive the editor will not write in); `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them; `--take T` judges the take's own clips into `takes/T/quote-check.json`, which the take's render, `check --take T` and `window --take T --align` read over the project's rows ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays))"],
],
},
{
diff --git a/umtool/lib/cli/verbs.mjs b/umtool/lib/cli/verbs.mjs
@@ -115,7 +115,7 @@ export const VERBS = Object.freeze([
opt("--q", { help: "words the project's text holds" }), pick("--sort", ["recent", "name"]),
]),
form("show", "project", "one project: summary, the cut, per-clip status, decisions", [project()]),
- form("check", "project", "what blocks a build (exit 1 on anything blocking)", [project({ required: false, help: "one project; none: every project" }), bool("--all-severities", "the info rows too")]),
+ form("check", "project", "what blocks a build (exit 1 on anything blocking)", [project({ required: false, help: "one project; none: every project" }), takeOpt({ help: "a take of the project: its clips' quote rows, by its own verdicts" }), bool("--all-severities", "the info rows too")]),
form("links", "project", "do the clip QRs open on their sites (out/links.json)", [
project(), bool("--fix", "rewrite the dead links it knows the fix for"),
bool("--embed-ids", "no check: every clip citing a Rumble URL-slug folder gets the embed id the archive serves (siteVideo), one write to the draft"),
@@ -182,7 +182,7 @@ export const VERBS = Object.freeze([
project(), many("--clip", { repeat: true, help: "clip ids, one per line (none: every clip)" }), bool("--list", "list the named voices"),
opt("--set", { help: "Name=<clip>,<channel>/<id>,channel:<slug>" }), opt("--remove", { help: "a voice's name" }),
], { ...Q, confirm: { what: "remove that named voice from speakers.json", when: ["--remove"] }, ...B(["clip"], { "--clip": "{id}" }) }),
- form("quote-check", "project", "is each clip's quote in the seconds it plays", [project(), opt("--clips", { help: "a,b (none: every clip)" }), num("--pad"), bool("--status", "the rows as they stand")], { ...Q, ...B(["clip"], { "--clips": "{id}" }) }),
+ form("quote-check", "project", "is each clip's quote in the seconds it plays", [project(), takeOpt({ help: "a take's clips: its rows in takes/<t>/quote-check.json" }), opt("--clips", { help: "a,b (none: every clip)" }), num("--pad"), bool("--status", "the rows as they stand")], { ...Q, ...B(["clip"], { "--clips": "{id}" }) }),
form("check-joins", "project", "do a rendered take's post joins carry on", [project(), takeOpt({ required: true, help: "the rendered take" }), bool("--all", "every post-to-post boundary"), num("--limit")], Q),
form("link-policy", "draft", "cite via site X, these channels direct", [
project(), opt("--via", { help: "a site id or its https address" }), opt("--direct", { help: "channel slugs, a,b" }), bool("--clear"), bool("--fix", "rewrite the clips that break it"),
diff --git a/umtool/lib/report/quoteCheck.mjs b/umtool/lib/report/quoteCheck.mjs
@@ -22,6 +22,13 @@
// found or moved unless the clip says `quoteRuled` (`umtool window <p> <clip>
// --quote-ruled`: heard and ruled by a person).
//
+// A TAKE'S OWN VERDICTS (`--take <t>`): the take's clips -- its patch over the
+// draft, as it renders -- judged into takes/<t>/quote-check.json. A take's
+// refusal, `umtool check <p> --take <t>` and `window --take --align` read the
+// take's rows over the project's (readTakeQuoteCheck): a clip the take never
+// judged keeps the project's row, which says something only while its cut and
+// quote are the take's too (rowIsCurrent).
+//
// Plain ESM: the CLI runs under bare node; the app reads the file.
import { mkdir, readFile, realpath, rename, rmdir, writeFile } from "node:fs/promises";
import os from "node:os";
@@ -35,6 +42,8 @@ import { channelsLayersFor, hasShadowChannels, readManifest } from "../projects/
import { tmpPathFor } from "yt-dlp-transcript-common/lib/atomicFile.mjs";
export const QUOTE_CHECK_FILE = "quote-check.json";
+/** Where a take's own rows live: beside its take.json. */
+export const takeQuoteCheckDir = (projectDir, take) => path.join(projectDir, "takes", take);
/** Seconds either side of the cut that are transcribed: the 6 Nov offsets reached 13.6 s. */
export const SEARCH_PAD_S = 15;
/** Cues read either side of the searched span, to find the quote in. */
@@ -78,6 +87,17 @@ export async function readQuoteCheck(dir) {
}
}
+/**
+ * The rows a take is judged by: its own (takes/<t>/quote-check.json) over the project's, by clip id. `own` and
+ * `project` say which file each came from.
+ * @param {string} projectDir
+ * @param {string} take
+ */
+export async function readTakeQuoteCheck(projectDir, take) {
+ const [project, own] = await Promise.all([readQuoteCheck(projectDir), readQuoteCheck(takeQuoteCheckDir(projectDir, take))]);
+ return { version: 1, clips: { ...project.clips, ...own.clips }, own: new Set(Object.keys(own.clips)) };
+}
+
async function writeQuoteCheck(dir, doc) {
const file = path.join(dir, QUOTE_CHECK_FILE);
const tmp = tmpPathFor(file);
@@ -218,6 +238,35 @@ export function alignPatch(entry, row) {
return patch;
}
+/**
+ * `umtool check <p> --take <t>`'s quote rows: the take's clips (as it renders: its rulings applied) gated by the
+ * take's verdicts over the project's. The rows `umtool check` makes of the project's quote check, for the take.
+ * @param {{ id: string, dir: string }} p
+ * @param {string} take
+ */
+export async function takeQuoteDecisions(p, take) {
+ const [{ resolveTakeManifest }, { applyMontageRulings, readMontageRulings }] = await Promise.all([
+ import("./takeManifest.mjs"),
+ import("umtool-report-to-video/montage-rulings"),
+ ]);
+ const { manifest } = await resolveTakeManifest(p.dir, take);
+ const timeline = applyMontageRulings(manifest, await readMontageRulings(p.dir)).manifest.timeline ?? [];
+ const doc = await readTakeQuoteCheck(p.dir, take);
+ return quoteGate(timeline, doc).map((g) => ({
+ kind: g.status === "moved" ? "clip-quote-moved" : "clip-quote-missing",
+ project: p.id,
+ take,
+ target: g.id,
+ why: `take ${take}: ${g.why.replace("<p>", `${p.id} --take ${take}`)}${doc.own.has(g.id) ? "" : " (the project's row: the take has not been checked)"}`,
+ severity: "blocking",
+ href: `/projects/${p.id}/takes/${take}`,
+ fix:
+ g.status === "moved"
+ ? `umtool window ${p.id} ${g.id} --take ${take} --align # or --quote-ruled, having heard it`
+ : `umtool fetch ${p.id} --refetch ${g.id} && umtool quote-check ${p.id} --take ${take} --clips ${g.id} # or --quote-ruled, having heard it`,
+ }));
+}
+
// ---------------------------------------------------------------------------
// The run.
// ---------------------------------------------------------------------------
@@ -314,8 +363,9 @@ async function unmake(dir, first) {
* @param {Awaited<ReturnType<typeof planQuoteCheck>>} plan
* @param {{ transcribe?: typeof editorWords, cuesOf?: (slug: string, video: string) => Promise<any[] | null>, log?: (l: string) => void, now?: () => Date }} [opts]
*/
-export async function runQuoteCheck(dir, manifest, plan, { transcribe = editorWords, cuesOf = null, log = () => {}, now = () => new Date(), workDirs = null, reportsRoot = null } = {}) {
- const doc = await readQuoteCheck(dir);
+export async function runQuoteCheck(dir, manifest, plan, { transcribe = editorWords, cuesOf = null, log = () => {}, now = () => new Date(), workDirs = null, reportsRoot = null, store = dir } = {}) {
+ // `store`: where the rows go -- the project's dir, or a take's (takeQuoteCheckDir).
+ const doc = await readQuoteCheck(store);
// Never under out/ (quoteCheckWorkDirs): the first the editor does not refuse as inside the corpus.
const works = workDirs ?? (await quoteCheckWorkDirs(dir, { reportsRoot }));
let wi = 0;
@@ -375,7 +425,7 @@ export async function runQuoteCheck(dir, manifest, plan, { transcribe = editorWo
log(rowLine(p.id, results[p.id]));
}
const merged = { version: 1, checkedAt: now().toISOString(), clips: { ...doc.clips, ...results } };
- const file = await writeQuoteCheck(dir, merged);
+ const file = await writeQuoteCheck(store, merged);
return { file, doc: merged, results, work: works[wi] };
}
@@ -384,8 +434,8 @@ export async function runQuoteCheck(dir, manifest, plan, { transcribe = editorWo
// ---------------------------------------------------------------------------
export const QUOTE_CHECK_USAGE = [
- "usage: umtool quote-check <project> [--clips a,b] [--pad S] [--json] transcribe what each clip plays; find its quote",
- " umtool quote-check <project> --status [--json] the rows as they stand (stale ones said)",
+ "usage: umtool quote-check <project> [--take T] [--clips a,b] [--pad S] [--json] transcribe what each clip plays; find its quote",
+ " umtool quote-check <project> [--take T] --status [--json] the rows as they stand (stale ones said)",
"",
`Each clip's cut ±${SEARCH_PAD_S} s (--pad) of the source the render would cut it from is transcribed by the`,
"editor (its transcription lane, words on), and the quote is found in those words and in the recording's",
@@ -395,6 +445,9 @@ export const QUOTE_CHECK_USAGE = [
"<reports>/.umtool/quote-check/<project>/, then ~/.cache/umtool/quote-check/<project>/.",
`Rows go to <project>/${QUOTE_CHECK_FILE}; umtool check reads them, and a take refuses a moved or`,
"missing quote unless the clip is ruled (umtool window <p> <clip> --quote-ruled).",
+ "--take T judges the TAKE's clips (its patch over the draft, as it renders) into takes/T/quote-check.json; the",
+ "take's render, `umtool check <p> --take T` and `umtool window <p> <clip> --take T --align` read the take's rows",
+ "over the project's (a clip the take never judged keeps the project's row while its cut and quote are the same).",
].join("\n");
class CliError extends Error {}
@@ -419,20 +472,33 @@ export async function quoteCheckCommand(args, { reportsRoot = REPORTS_ROOT, log
if (!r.project) throw new CliError(`no project matches "${words[0]}"`);
const project = r.project;
if (!kindMakesTakes(project.kind)) throw new CliError(`${project.id} is a ${project.kind}, not a report video`);
- const manifest = await readManifest(project.dir);
+ const take = flags["--take"]?.at(-1) ?? null;
+ if (take !== null && !take) throw new CliError("--take names a take of the project");
+ let manifest = await readManifest(project.dir);
if (!manifest) throw new CliError(`${project.id} has no manifest`);
+ if (take) {
+ // The take as it renders: its patch over the draft (resolveTakeManifest), its clip rulings applied.
+ const [{ resolveTakeManifest }, { applyMontageRulings, readMontageRulings }] = await Promise.all([
+ import("./takeManifest.mjs"),
+ import("umtool-report-to-video/montage-rulings"),
+ ]);
+ const r = await resolveTakeManifest(project.dir, take).catch((e) => {
+ throw new CliError(`--take ${take}: ${e instanceof Error ? e.message : String(e)}`);
+ });
+ manifest = applyMontageRulings(r.manifest, await readMontageRulings(project.dir)).manifest;
+ }
const json = !!flags["--json"];
if (flags["--status"]) {
- const doc = await readQuoteCheck(project.dir);
+ const doc = take ? await readTakeQuoteCheck(project.dir, take) : await readQuoteCheck(project.dir);
const rows = [];
for (const e of manifest.timeline ?? []) {
if (e?.type !== "clip") continue;
const row = doc.clips[e.id];
- rows.push({ id: e.id, ...(row ?? { status: "unchecked" }), current: rowIsCurrent(row, e) });
+ rows.push({ id: e.id, ...(row ?? { status: "unchecked" }), current: rowIsCurrent(row, e), ...(take && row ? { from: /** @type {any} */ (doc).own.has(e.id) ? "take" : "project" } : {}) });
}
- if (json) log(JSON.stringify({ project: project.id, clips: rows }, null, 1));
- else for (const row of rows) log(`${rowLine(row.id, row)}${row.current || row.status === "unchecked" ? "" : " (stale: the cut or the quote changed)"}`);
+ if (json) log(JSON.stringify({ project: project.id, ...(take ? { take } : {}), clips: rows }, null, 1));
+ else for (const row of rows) log(`${rowLine(row.id, row)}${row.current || row.status === "unchecked" ? "" : " (stale: the cut or the quote changed)"}${row.from === "project" ? " (the project's row)" : ""}`);
return 0;
}
@@ -442,14 +508,15 @@ export async function quoteCheckCommand(args, { reportsRoot = REPORTS_ROOT, log
const channelsDirs = channelsLayersFor(project.dir, manifest, { shadowExists: await hasShadowChannels(project.dir) });
if (!channelsDirs.length) throw new CliError("no channels directory (CHANNELS_DIR) to read the windows from");
const plan = await planQuoteCheck(project.dir, manifest, { channelsDirs, clipIds, pad });
- if (clipIds.length && !plan.length) throw new CliError(`none of ${clipIds.join(", ")} is a clip of ${project.id}`);
+ if (clipIds.length && !plan.length) throw new CliError(`none of ${clipIds.join(", ")} is a clip of ${take ? `take ${take}` : project.id}`);
const { file, results, work } = await runQuoteCheck(project.dir, manifest, plan, {
...(transcribe ? { transcribe } : {}),
...(cuesOf ? { cuesOf } : {}),
reportsRoot,
log: json ? () => {} : log,
+ ...(take ? { store: takeQuoteCheckDir(project.dir, take) } : {}),
});
- if (json) log(JSON.stringify({ project: project.id, file, work, clips: results }, null, 1));
+ if (json) log(JSON.stringify({ project: project.id, ...(take ? { take } : {}), file, work, clips: results }, null, 1));
else {
const count = (s) => Object.values(results).filter((x) => x.status === s).length;
log(`→ ${file}: ${count("ok")} ok, ${count("moved")} moved, ${count("not-found")} not found, ${count("no-window")} with no window`);
diff --git a/umtool/lib/report/quoteCheckTake.test.mjs b/umtool/lib/report/quoteCheckTake.test.mjs
@@ -0,0 +1,112 @@
+// `umtool quote-check <p> --take <t>` (12 Nov 2026: the check judged the draft -- 25 blocking there -- and left the
+// take unjudged). With --take the take's own clips are judged (its timeline: its patch over the draft), the rows
+// go to takes/<t>/quote-check.json, and a take's refusal and `umtool check --take` read the take's rows first.
+// The words and cues are the 6 Nov c43 window's (report-to-video/fixtures/rev9-a3-rumble-words.json).
+//
+// Run with: pnpm test:scripts
+import assert from "node:assert/strict";
+import test from "node:test";
+import { mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
+import os from "node:os";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import { quoteCheckCommand, readTakeQuoteCheck, takeQuoteDecisions } from "./quoteCheck.mjs";
+import { makeTake } from "./takeMaker.mjs";
+
+const HERE = path.dirname(fileURLToPath(import.meta.url));
+const FIX = JSON.parse(await readFile(path.join(HERE, "..", "..", "report-to-video", "fixtures", "rev9-a3-rumble-words.json"), "utf8"));
+const C43 = FIX.clips.find((c) => c.id === "c43");
+
+/** c43 in the draft: re-cut to seconds no window holds (no-window); in the take, where the 6 Nov fetch had it (moved). */
+const DRAFT = { start: 3000, end: 3010 };
+const EARLY = { start: 2119.34, end: 2127.44 };
+
+async function project() {
+ const root = await mkdtemp(path.join(os.tmpdir(), "quote-check-take-"));
+ const dir = path.join(root, "diet");
+ const raw = path.join(dir, "out", "clips-raw");
+ await mkdir(raw, { recursive: true });
+ const channels = path.join(root, "channels");
+ await mkdir(channels, { recursive: true });
+ await writeFile(path.join(raw, `${C43.video}_${C43.window[0].toFixed(2)}-${C43.window[1].toFixed(2)}.mp4`), "mp4");
+ const c43 = { type: "clip", id: "c43", channel: C43.channel, video: C43.video, quote: C43.quote };
+ const manifest = {
+ slug: "diet",
+ render: { width: 640, height: 360, fps: 15, transition: 0 },
+ provenance: { channelSlug: "the-quartering-rumble", channelsDir: channels, channelsFallback: false },
+ timeline: [{ ...c43, ...DRAFT }],
+ };
+ await writeFile(path.join(dir, "video.manifest.json"), JSON.stringify(manifest));
+ const takeDir = path.join(dir, "takes", "t1");
+ await mkdir(takeDir, { recursive: true });
+ await writeFile(path.join(takeDir, "take.json"), JSON.stringify({ id: "t1", group: "takes", order: 0, label: "T1", kind: "different", preview: "preview.mp4", draft: true, window: "full", patch: { timeline: [{ ...c43, ...EARLY }] } }));
+ return { root, dir, takeDir };
+}
+
+const fakeTranscribe = async (req) => C43.words.filter((w) => w.start >= req.start - 0.01 && w.end <= req.end + 0.01);
+const fakeCues = async () => C43.cues;
+const run = async (p, args) => {
+ const out = [];
+ const code = await quoteCheckCommand(args, { reportsRoot: p.root, log: (l) => out.push(l), err: (l) => out.push(`ERR ${l}`), transcribe: fakeTranscribe, cuesOf: fakeCues });
+ return { code, text: out.join("\n") };
+};
+const exists = (f) => stat(f).then(() => true, () => false);
+
+test("quote-check --take judges the take's clips into takes/<t>/quote-check.json; the draft's rows are its own", async () => {
+ const p = await project();
+ try {
+ // The draft: its c43 has no window to judge.
+ let r = await run(p, ["diet"]);
+ assert.equal(r.code, 0, r.text);
+ assert.match(r.text, /0 ok, 0 moved, 0 not found, 1 with no window/);
+ // The take: its c43 13 s early -- judged on ITS cut, into its own file.
+ r = await run(p, ["diet", "--take", "t1"]);
+ assert.equal(r.code, 0, r.text);
+ assert.match(r.text, /0 ok, 1 moved/);
+ assert.match(r.text, /takes\/t1\/quote-check\.json/);
+ const own = JSON.parse(await readFile(path.join(p.takeDir, "quote-check.json"), "utf8"));
+ assert.equal(own.clips.c43.status, "moved");
+ assert.equal(own.clips.c43.cut.from, EARLY.start);
+ // The draft's file is untouched by the take's run.
+ const draft = JSON.parse(await readFile(path.join(p.dir, "quote-check.json"), "utf8"));
+ assert.equal(draft.clips.c43.status, "no-window");
+ // --status --take: the take's rows, against the take's clips.
+ r = await run(p, ["diet", "--take", "t1", "--status"]);
+ assert.equal(r.code, 0, r.text);
+ assert.match(r.text, /c43 +moved/);
+ // A take that is not there is refused.
+ r = await run(p, ["diet", "--take", "nope"]);
+ assert.equal(r.code, 2);
+ assert.match(r.text, /nope/);
+ } finally {
+ await rm(p.root, { recursive: true, force: true });
+ }
+});
+
+test("a take's refusal and `check --take` read the take's verdicts, the project's under them", async () => {
+ const p = await project();
+ try {
+ assert.equal((await run(p, ["diet"])).code, 0);
+ assert.equal((await run(p, ["diet", "--take", "t1"])).code, 0);
+ const doc = await readTakeQuoteCheck(p.dir, "t1");
+ assert.equal(doc.clips.c43.status, "moved");
+ // check --take: the take's c43 blocks, naming the take.
+ const ds = await takeQuoteDecisions({ id: "diet", dir: p.dir }, "t1");
+ assert.deepEqual(ds.map((d) => [d.kind, d.target, d.severity]), [["clip-quote-moved", "c43", "blocking"]]);
+ assert.match(ds[0].fix, /--take t1/);
+ // The take's render refuses its moved c43 (before: only the draft's rows were read, and they say no-window).
+ let rendered = false;
+ const render = async () => {
+ rendered = true;
+ throw new Error("no render in this test");
+ };
+ await assert.rejects(makeTake(p.dir, { id: "t1", label: "T1", window: "full", patch: { timeline: JSON.parse(await readFile(path.join(p.takeDir, "take.json"), "utf8")).patch.timeline } }, { render, force: true }), /c43: its quote is heard/);
+ assert.equal(rendered, false);
+ // No take file: the project's rows still gate it (nothing loosened).
+ await rm(path.join(p.takeDir, "quote-check.json"));
+ assert.equal((await readTakeQuoteCheck(p.dir, "t1")).clips.c43.status, "no-window");
+ assert.equal(await exists(path.join(p.dir, "quote-check.json")), true);
+ } finally {
+ await rm(p.root, { recursive: true, force: true });
+ }
+});
diff --git a/umtool/lib/report/takeMaker.mjs b/umtool/lib/report/takeMaker.mjs
@@ -728,10 +728,11 @@ async function makeTakeLocked(projectDir, rawSpec, opts) {
if (wrong.length) throw new Error(`${spec.id}: ${wrong.map(incorrectWhy).join("; ")}`);
// A clip whose quote the quote check did not hear where it plays (lane
// one-clock, lib/report/quoteCheck.mjs): refused the same way, unless a
- // person ruled it (`quoteRuled`). No check on record refuses nothing.
+ // person ruled it (`quoteRuled`). No check on record refuses nothing. The
+ // take's own rows (`quote-check --take`) over the project's.
{
- const { quoteGate, readQuoteCheck } = await import("./quoteCheck.mjs");
- const unheard = quoteGate(renderDoc.timeline, await readQuoteCheck(projectDir));
+ const { quoteGate, readTakeQuoteCheck } = await import("./quoteCheck.mjs");
+ const unheard = quoteGate(renderDoc.timeline, await readTakeQuoteCheck(projectDir, spec.id));
if (unheard.length) {
throw new Error(
`${spec.id}: ${unheard.map((u) => u.why.replace("<p>", path.basename(projectDir))).join("; ")} ` +