Archilyzer · Source

archilyzer

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

commit 67a183914fe8940e9da2ff90151b535a8c915a05
parent c8e8e83b773adf0d5965cdbcb73dcaddbcfdc097
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri,  6 Nov 2026 21:22:39 -0500

docs, umtool: one clock per recording -- AGENTS.md's measured offsets and the rule; prep --status counts the quote check; cli/knobs/changelog

AGENTS.md, beside "The two sources can disagree": two FILES of one recording
disagree too (6 Nov: c43 +13.1 s, c45 +13.6 s, ... and a step inside
v7eqa6e), and the rule -- one clock per recording, the cues'; a Rumble window
is never a seek, the saved video goes through clock.json, quote-check is the
per-clip guarantee. The Rumble two-ids paragraph says the embed id now
resolves on the disk side.

`umtool prep --status` adds the quote check's verdicts on the clips as they
are now ("quotes: 40 ok, 2 moved (c43, c45) -- umtool window <p> <clip>
--align"). docs/cli.md rows and a docs/knobs.md section; the changelog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
MAGENTS.md | 25++++++++++++++++++++++++-
Meditor/CHANGELOG.md | 1+
Mumtool/docs/cli.md | 2++
Mumtool/docs/knobs.md | 29+++++++++++++++++++++++++++++
Mumtool/lib/report/prepCli.mjs | 31++++++++++++++++++++++++++++++-
Mumtool/lib/report/quoteCheck.test.mjs | 15+++++++++++++++
6 files changed, 101 insertions(+), 2 deletions(-)

diff --git a/AGENTS.md b/AGENTS.md @@ -204,12 +204,35 @@ of four videos byte-identical, the fourth with 65 of 84 cue texts rewritten and shifted by up to **2.24 s**. `--cue-source auto|local|http` makes the choice explicit; `local` refuses to fall back rather than silently cut from other cues. +**Two FILES of one recording disagree too — by seconds, and not by a constant.** A Rumble +channel's cues are parakeet's over `data/<id>/audio.mp3`, a separate audio-only download; +its clips are cut from another file (the saved whole video, or a remote seek). Measured +2026-11-06 with parakeet word timings on every fetched window of quartering-diet rev9-a3: +c43 +13.1 s (the "310" misclip), c45 +13.6 s, c20 +5.2 s, k41 +2.6 s, c18 +1.6 s, k46 −0.7 s, +c19 ≈ −1 s, c22 ≈ +2 s — and v7eqa6e had c44 at 0 s and c45 at +13.6 s: a STEP inside one +stream. The rule (lane one-clock): **one clock per recording, the cues'.** A whole-recording +platform's window (`clips.wholeRecordingPlatforms`, default Rumble) is never a remote seek — +umtool asks `fetch-windows`, which saves the recording whole once and makes its time map +current, `data/<id>/clock.json` (the transcription source cross-correlated against the saved +container every 5 min and around each cited span, a piecewise-linear fit with its residual; +`common/lib/recordingClock.mjs`); every window cut from the saved container, and the +saved-video tier the render reads, goes through it, and windows cut on another clock are +retired. A span on a step, or a map that could not be fitted, is cut on its best guess and +said NOT certain — **`umtool quote-check <p>`** is the per-clip guarantee: the editor +transcribes what each clip plays, the quote is found in it and in the cues, and a clip heard +elsewhere is `moved` (`umtool window <p> <clip> --align` snaps the cut to the words) or +`not-found`; `umtool check` blocks on both and a take refuses them unless `--quote-ruled`. + **Rumble videos have two ids** — the archive keys by the EMBED id, a local cue dir is named for the URL SLUG — so a locally-authored manifest misses on every Rumble clip. It fails loudly; fix with a per-clip `siteVideo`/`siteChannel`, or `--resolve-site-ids` to scan the channel's shards (opt-in: a shard is up to 8 MB). Do **not** derive the id from `citeUrl`: a citeUrl may deliberately cite a different recording (a mirror that reads -better), whose clock is not the same. +better), whose clock is not the same. The other way round — a manifest citing the EMBED id, +asked of the corpus — is resolved on the disk side: on a Rumble channel, an id with no +directory is looked up in the channel's `metadata.info.json` ids (`resolveVideoDirId`, +`common/lib/videoDir-server.mjs`), so fetches, persists and the render find +`data/<slug>/` (6 Nov: every embed-id fetch went to a `data/<embed>/` that did not exist). This tooling is on `main` as of 2026-08-20. diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **Rumble clips play the words their quotes say: one clock per recording.** On 6 Nov seven Rumble clips of the weight video played other words than their quotes, c43 13.1 seconds early (the "310" clip), and one stream was right at 10 minutes and 13.6 seconds off at 38. A Rumble channel's transcript is made from a separate audio download, and its clips were cut from another file; the two do not keep the same time, and not by a constant. The operator: "stop trying to grab rumble individual clips and instead grab whole streams and clip after." **Whole, never seeked:** umtool's fetch (the bench's fetch more, `umtool fetch`, a build's fetch) asks for a Rumble clip through Fetch windows, which saves the stream once and cuts the clip from it; nothing falls back to a seek, and a failed save says why. **The right video:** a report cites a Rumble video by its embed id while the archive keeps it under its page's id; every fetch, save and render now finds the video under either (6 Nov: every such fetch went to a folder that did not exist, and one got a Rumble 403). **The time map:** before a clip is cut from a saved Rumble stream, the stream's audio is matched against the audio the transcript was made from, every 5 minutes and around each clip, and the map (`clock.json` beside the video, with how well it fits) moves every cut onto the transcript's time; clips cut before the map, or by a seek, are cut again. A stretch where the two files part (a dropped piece of the stream) is narrowed to a few seconds, and a clip on it is said to be uncertain. **The check:** `umtool quote-check <project>` has the editor transcribe what each clip will actually play and finds the quote in it: `moved` (heard seconds away), `not-found`, or `ok`; `umtool window <p> <clip> --align` puts the cut on the words as heard, `umtool check` blocks on a moved or missing quote, a take refuses one unless a person rules it (`--quote-ruled`), and `umtool prep --status` counts them. Needs a restart of the editor (umtool's half works at once). - **umtool: a counter series nobody counted shows 0, and a text card can count.** The Leaflit side-tally video has no title or totals cards, so the deck's counter is the only place the counts show, and it left out "Left" (the point of the video: she never once says she is on the left) because the tally drew only the series some mark used. A series of `deck.counter` that says `showAt: "always"` (its own, or the counter's) is now a cell from the first frame, dim at 0, whether or not anything counts it; a series that says nothing (so a counter `umtool migrate` wrote draws what it drew), a `first` series, and the fact-check verdicts' tally of a cut without a `deck.counter` are as before, and a cut that counts nothing still draws no counter. Her two X posts are text cards (`teaser`s), which could not carry a mark, so they did not step the count. A teaser now takes marks as a clip does (`umtool set <p> x-d28 mark.add=CENTER@2.15`, the second counted from the card's start; validated, stamped over the card, counted, in Play and the On-screen table), and a teaser that carries one keeps the deck up over it, with no title of its own, so the count is seen to step. A teaser that dips still hides the deck at the black. - **Free disk, weekly, with one command: `archilyzer housekeeping`.** On 6 Nov /home was at 37 GB free, and a session freed 83 GB by hand. The operator: "We should build a regularly run command for this after we're done." It runs three passes of the apps' own commands. **Superseded takes:** `umtool prune --versions` deletes whole takes through `umtool takes delete`. Per version line it keeps the highest built number; the line is the take id with its digits folded (`draft-3` and `draft-4`), and a letter is never folded (`v6c` is not `v6d`, `release-6u` is not `release-6`). An older take goes only once the newer one is 7 days old (`--grace`). It also keeps any take picked, pinned, given any verdict, rendering, a build's base, the manifest's, with operator notes on it, or refused by `takes delete`, and skips a project whose verdicts file cannot be read. **Work files:** every project's takes' work files by its prune policy; in a project idle 3 days, the newest and picked takes' work goes too (`--idle-work`). **Worktrees:** `pnpm wt prune` removes merged, clean, idle worktrees with no process in them and no ignored files of anyone's (a corpus, an env file, a changed settings file, a nested repository), keeping their branches. A project or worktree touched in the last 3 days is left alone, and a run is skipped while a render, an e2e suite or a heavy job runs, or when that cannot be checked. Each run is recorded in `~/.local/state/archilyzer/housekeeping.json`. **Worktree ports no longer move:** a worktree's port block is recorded when it is added, so removing another worktree cannot shift a running suite's ports. **Upgrading:** `archilyzer service install` (host mode) now also installs `archilyzer-housekeeping.timer`, weekly; `--dry-run` shows it first, and `--no-housekeeping` leaves it out. OPERATING.md, "Free disk". - **Sync new and Resume backfill are separate actions for an X or Bluesky channel.** A fetch meant to get new posts could walk old history instead. If an account's full-history walk had stopped part-way, the next plain fetch, from Sync or the schedule too, resumed that walk and skipped the newest posts. On 6 Nov one such fetch read 100 posts the archive already held, stopped as "caught up" with 0 new, and missed 85 newer posts. It then cleared the walk's saved place, so the place was lost as well. The operator: "We should have distinct 'sync new' and 'resume backfill' actions, they are different actions for different purposes". **Sync new** (the channel page's first button; a plain `fetch-posts`, Sync and the scheduler) now always reads from the newest post down to the newest one archived, and never moves or clears the backfill's place. A sync that stops part-way keeps its own place and finishes on the next sync. **Resume backfill** (the button, shown only when a full-history walk is unfinished; `pnpm ops resume-backfill`, or `fetch-posts "backfill": true`; `--backfill` on `archilyzer posts fetch`; `backfill` on the MCP enqueue tool) continues that walk and does nothing else. When one is unfinished, the channel page says so: "backfill unfinished — N archived; Resume backfill continues it". The job log's first line names the mode. Resume backfill is refused when no walk is unfinished, and on a forum thread, which already reads its newest pages before its history. An X search channel has one walk and refuses it too. Re-fetch full history and Fetch older posts are unchanged. **Upgrading:** a `posts-state.json` from before this keeps one `cursor`. It is read as the unfinished backfill's place, so nothing is lost, and the next fetch rewrites it. Needs a restart of the editor. diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -30,6 +30,8 @@ Inbox cannot disagree about what is wrong with one. | `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>`; **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)) | | `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)) | +| `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; `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)) | +| `window <project> <clip> --align` · `--quote-ruled` / `--no-quote-ruled` | the cut snapped to the quote as HEARD (0.15 s before its first word, 0.3 s after its last, the extent widened to hold it, `lockCut`); a person's ruling on the quote check (a take renders a ruled clip) | | `window <project> <clip> --take <take> …` | a **take's** clip (walk a take): the same fields, written into the take's patch (`takes/<take>/take.json`) with an undo point first; the project's manifest is untouched ([clip-bench.md](clip-bench.md#walking-a-take)) | | `walk <project> [--take <take>] [--all] [--json]` | the clip bench's **walk**: every clip in walk order with its window, verdict and whether a fetched file holds it, and (→) the ones the walk visits — fetched and needing a verdict; `--all` every fetched one; `--take` walks a take (a draft too); the bench's address to start at | | `link <project> <site>/<report>` · `link <project> --clear` | the manifest names the article it is the video of (settles `link-ambiguous`) | diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -99,6 +99,35 @@ the cut is the check's `patch-markers-stale` row (open: a take made with it is r cut's markers** (`umtool patch-markers <p> [<file>] --fix`): each such marker takes the `after` of the cut's marker with the same label; one no marker of the cut shares a label with is left, and named. +## The quote check (is the quote where the clip plays?) + +A clip's seconds are its CUES' seconds, and its picture and sound are cut from another file: on 6 Nov +seven Rumble clips of quartering-diet played other words than their quotes (c43 13.1 s early: the "310" +misclip), and only listening caught it. `umtool quote-check <p> [--clips a,b]` listens instead: each +clip's cut ±15 s (`--pad`) of the source the render would use is transcribed by the editor (its +transcription lane, words on), and the quote is found in those words — numbers one token however they +are written, a word one letter off still a match, an ellipsis splitting it into fragments found in +order — and in the recording's cues. The rows (`quote-check.json`, one per clip, with the cut, the +quote and the source judged): + +| row | means | what settles it | +|---|---|---| +| `ok` | heard within 0.5 s of where the cues have it | — | +| `moved` | heard N s away (with no cues: heard outside the cut) | `umtool window <p> <clip> --align` — the cut on the words as heard (0.15 s before the first, 0.3 s after the last, the extent widened, `lockCut`); or fetch it again (`umtool fetch <p> --refetch <clip>`: a Rumble clip comes from the saved whole recording through its clock) | +| `not-found` | not in the seconds checked | the refetch, a new quote, or `--quote-ruled` | +| `no-window` | nothing on disk holds the cut | `umtool fetch <p>` | + +A row is about the clip as it was: a cut or a quote changed since makes it stale, and it says nothing +until checked again (`prep --status` counts the stale ones). `umtool check` calls a current `moved` or +`not-found` BLOCKING (`clip-quote-moved`, `clip-quote-missing`, with the fix), and a take refuses the +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). + +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 +fitted, and the windows fetched before it. + ## Do the QR links open? `umtool links <p> [--json] [--fix]`, or **Check links** on the project page's link rows, resolves every diff --git a/umtool/lib/report/prepCli.mjs b/umtool/lib/report/prepCli.mjs @@ -51,6 +51,33 @@ export function stateLine(s) { const stamp = () => new Date().toISOString().slice(11, 19); +/** + * The quote check's verdicts on the project's clips as they are now (lane + * one-clock, quoteCheck.mjs): "quotes: 40 ok, 2 moved (c43, c45), 1 not found + * (c19) — umtool window <p> <clip> --align"; null with no check on record. + * @param {string} dir + */ +export async function quoteLine(dir) { + const [{ readQuoteCheck, rowIsCurrent }, { readManifest }] = await Promise.all([import("./quoteCheck.mjs"), import("../projects/report.mjs")]); + const doc = await readQuoteCheck(dir); + if (!Object.keys(doc.clips).length) return null; + const m = await readManifest(dir); + /** @type {Record<string, string[]>} */ + const by = {}; + for (const e of m?.timeline ?? []) { + if (e?.type !== "clip") continue; + const row = doc.clips[e.id]; + const st = !row ? "unchecked" : !rowIsCurrent(row, e) ? "stale" : e.quoteRuled && (row.status === "moved" || row.status === "not-found") ? "ruled" : row.status; + (by[st] ??= []).push(e.id); + } + const part = (k, label) => (by[k]?.length ? `${by[k].length} ${label}${k === "ok" || k === "unchecked" || k === "stale" ? "" : ` (${by[k].join(", ")})`}` : null); + const parts = [part("ok", "ok"), part("moved", "moved"), part("not-found", "not found"), part("ruled", "ruled"), part("stale", "stale"), part("unchecked", "unchecked")].filter(Boolean); + return { + counts: Object.fromEntries(Object.entries(by).map(([k, v]) => [k, v.length])), + line: ` quotes: ${parts.join(", ")}${by.moved?.length ? " — umtool window <p> <clip> --align" : ""}${by.stale?.length || by.unchecked?.length ? " — umtool quote-check <p>" : ""}`, + }; +} + /** The runner's progress as lines (stderr, and prep.log when it runs detached). */ export function eventLine(project, ev) { if (ev.ev === "start" && ev.take) project = `${project} take ${ev.take}`; @@ -140,10 +167,12 @@ export async function prepCommand(args, { root = REPORTS_ROOT, out = (s) => cons if (args.includes("--status")) { const s = await benchPrepState(project, { clips, take }); - if (json) out(JSON.stringify(s, null, 2)); + const quotes = await quoteLine(project.dir); + if (json) out(JSON.stringify({ ...s, ...(quotes ? { quoteCheck: quotes.counts } : {}) }, null, 2)); else { out(stateLine(s)); for (const it of s.items) if (it.state === "failed") out(` ✗ ${it.id}: ${it.error ?? "failed"}`); + if (quotes) out(quotes.line); } return 0; } diff --git a/umtool/lib/report/quoteCheck.test.mjs b/umtool/lib/report/quoteCheck.test.mjs @@ -166,3 +166,18 @@ test("umtool check: a moved quote and a missing one are blocking, with the fix; await rm(root, { recursive: true, force: true }); } }); + +test("prep --status says the quote check's verdicts on the clips as they are now", async () => { + const { quoteLine } = await import("./prepCli.mjs"); + const p = await project(); + try { + assert.equal(await quoteLine(p.dir), null); + const plan = await planQuoteCheck(p.dir, p.manifest, { channelsDirs: [p.channels] }); + await runQuoteCheck(p.dir, p.manifest, plan, { transcribe: fakeTranscribe, cuesOf: fakeCues }); + const q = await quoteLine(p.dir); + assert.equal(q.line, " quotes: 1 ok, 1 moved (c43) — umtool window <p> <clip> --align"); + assert.deepEqual(q.counts, { moved: 1, ok: 1, "no-quote": 1 }); + } finally { + await rm(p.root, { recursive: true, force: true }); + } +});