Archilyzer · Source

archilyzer

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

commit 60e3c6b94a28cdcb6b3c8c481c45cedb06e7a19b
parent bd65959d892aba4ef7ade26c763d88fd8c6023d7
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 10 Oct 2026 12:41:00 -0400

plans: release 23 F4 — the stats cache sees the caption-track pass, as shipped (release 20 record)

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

Diffstat:
Meditor/CHANGELOG.md | 1+
Mplans/release-20.md | 35+++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -133,6 +133,7 @@ - **A Twitch VOD cited by its published id is found on disk.** A Twitch video's folder is named by its number while its record (and its public page) says `v` and the number, so a clip fetch asked by the record's id (the MCP's `fetch_clip`, **Fetch missing evidence**, `pnpm ops fetch-windows`), a site's evidence clips and its missing-evidence list, and umtool's local cue lookup looked in a folder that does not exist: a clip or saved video already on disk was not found, and the video's availability and length were not read. They now look in the video's own folder. Published ids and URLs do not change. Needs a rebuild and restart of the editor and of umtool. - **Transcribe uses a video's saved source video instead of downloading its audio.** A video with no audio on disk but its whole recording in the saved-video store (a persisted video, a whole-source fetch, or one attached from a local archive) was downloaded again for its audio when **Transcribe** was clicked on its page or `pnpm ops transcribe-one` was run. Its saved video is now transcribed as it is, and the job's log says so ("transcribing from the saved container … — nothing downloaded"). When the saved video's drive is not mounted or not answering, the job stops with the same "media is not reachable" sentence as a clip fetch, rather than downloading; a saved video with no sound is downloaded around as before. Needs a rebuild and restart of the editor. - **An agent can answer the operator's notes in umtool, and its replies say they are an agent's.** The MCP's `notes` tool now writes a reply (`action: "reply"`, with `note_id`, `text` and `resolve`) in umtool instead of answering with the `umtool notes reply` command to run; umtool stamps it "agent" and badges it on the page. umtool takes an agent's write only with the editor's `WORKER_TOKEN` as a bearer token — from its own environment, else the editor's `editor/.env` — and refuses any other token (401); a write from umtool's own page is the operator's as before. Register the MCP with `UMTOOL_URL` and `WORKER_TOKEN`. Needs a rebuild and restart of umtool, and a restart of the MCP server. +- **Captions the index re-read under the newer caption-track rule now reach the stats and charts.** When the index re-reads a video's captions without any of its files changing — as it did once for videos whose served `en` track had parsed to nothing — the stats behind the homepage, the hub and the sites' charts kept the old figures (no transcript, the old cue count) until something else about the video changed. The stats now follow the captions the index holds, and the first stats build after updating corrects the videos already affected. Needs a rebuild and restart of the editor, then a stats build (or a site, hub or homepage build). ## [0.11.0] - 2026-09-30 - **Transcripts that arrived after a video was first seen are counted.** The stats behind the homepage, the hub and every site's charts were cached per video and refreshed only when the video's metadata changed, so a transcript that came later — a Whisper run days after the download, or a video downloaded after the last index build — never reached them, and a video with YouTube captions alone had no transcription date. Counts and charts were low; the homepage could show a site with 0 transcripts, 0 channels and 0 hours while it served its videos. A stat is now also redone whenever the index re-reads the video, every transcript has a date, and a captioned video is dated by when its captions arrived rather than by a later Normalize run, so its place on "Transcribed over time" can move. **After updating, rebuild and restart the editor before anything else:** until then, **Build stats dataset** runs the old code and would undo the new stats, while a site, hub or homepage build already runs the new code — and the first stats build of any kind re-reads every video once (about 10–30 minutes on a large archive; it can be stopped and picks up where it stopped). Then build the index, the stats, the homepage, the hub, and the sites. diff --git a/plans/release-20.md b/plans/release-20.md @@ -185,6 +185,41 @@ pass, 11 fail — the same 11 fail on `d3296bab` without this change (`attachMed 2 — environment — and `fetchPosts.test.ts` 1, a drain timing that passes alone). Editor unit 239/239; `test:scripts` 759 pass, 3 skipped, 0 fail (the cwd-join trace guard among them). +### D3's found-and-left, as shipped (release 23 F4) — the stats cache sees the caption-track pass + +Release 23 Lane 1, on `r23/fixes`. D3 left it: the caption-track pass re-reads a record's cues and writes the same +`mtimes` record back, so `buildStats` (keyed on that record, `indexSignature`) kept `hasTranscript: false` and the +old `cueCount` for a record the pass took from no text to text. + +**What it does.** +- `buildIndex.ts`: the `mtimes` record gains `cueFingerprint` (`cueFingerprint(list)`: `"<count>:<last cue end>"`, + `"0"` for none — the two cue facts a stat is made of, `cueCount` and coverage), written on every (re)process. Any + pass that re-reads a record with no input moving (caption track, alt tracks, platform labels) moves it when the + cues it stores differ. +- `buildStats.ts`: `indexSignature` appends `cues=<fingerprint>` only when the record has one. A record written before + it gives the old string exactly, so the rollout recomputes nothing by itself; a record the index rewrites from then + on (the pass's included) recomputes once. +- **The records a pass already left stale** (the v1 caption-track pass ran on records before this): a cached stat that + says no transcript while the index holds a non-empty cue list under its key is recomputed (`statMissesStoredCues`, + the stored value's length, no decode — `storedCuesEmpty`'s test), asked only of stats that say no transcript. It + heals the no-text-to-text case at the first stats build after the rollout; a text-to-other-text change the v1 pass + already made (a cue count that moved) is not reached by it. +- Not chosen: the caption-track rule version in the signature — it would recompute every stat when the rule moves, + and a rule bump also marks every caption `transcript.cues.json` stale to umtool and normalize. + +| Commit | What | +|---|---| +| `e43f6e4c` | `common:` F4 — `cueFingerprint` in the index record and the signature; the stale-stat heal | + +**Gates.** tsc clean. `controller/buildStats.test.ts` 17/17 (+4, through the real `buildIndex` and `buildStats`): +(l) a record the pass takes from no text to text (stored cues empty, the pass due) recomputes, once; (l2) a pass that +changes a two-track record's cue count (1 → 2, `hasTranscript` true both times) recomputes — red with the fingerprint +taken out of the signature; (m) a stale cached stat (no transcript, cues held, the same key) is healed, a video with +no cues is not asked again, then nothing; (n) an old record's signature is unchanged by the field's absence. Common +3,690: 3,680 pass, 10 fail — the same `attachMedia` 8 and `preparePlayable` 2 that fail on `d3296bab` (environment: +`/tmp` is a 1.7 GB-free tmpfs here). Editor unit 243/243; `test:scripts` 767 pass, 2 skipped; export unit 118/118; +homepage unit 23/23. + ## As it went **The whisper red: "Clear failure list" unmounted its own log** (`r20/whisper-fix`). `whisper.spec.ts:184`