Archilyzer · Source

archilyzer

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

commit e9618560ed6df01ca05be5ca6a3202919fab962d
parent 0c4c4da9322502e257dbaa54541a20e6f8bca8ec
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 14 Oct 2026 19:46:53 -0400

plans: umtool redesign — R6.1, as shipped (honest tier 0, enumerate's ids, partial ticks, fetch under a transcription hold, reset-triage; the read-only proof; gates)

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

Diffstat:
Mplans/umtool-redesign.md | 150++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 149 insertions(+), 1 deletion(-)

diff --git a/plans/umtool-redesign.md b/plans/umtool-redesign.md @@ -445,7 +445,7 @@ edition reviewed with the operator before the schedule is left on. | Board races fix | `ux/board-race` → `main` `d9c119e2` | LIVE 2026-10-14 | | 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` | in progress (found by the pilot's first tick) | +| R6.1 honest tier 0 + R4.1 | `ux/r61` | shipped on the branch | | Co-host pilot | — | schedule `co-host-updates` made and PAUSED; tick 1 a false quiet (tier 0 capped); re-run after R6.1, then the operator's review | ### P2a, as shipped @@ -3383,3 +3383,151 @@ between the stub's two writes, 3/3 alone and green in run 2); the new `visual-au included (→ `/create?from=…`); every place 200, `/work?kind=watch` 200; decisions API 833 rows, notes' hrefs end `note=<id>`; the MCP `notes` tool lists the same 14 open notes. Browsers now cache these redirects for good. +### R6.1, as shipped + +**What.** The co-host pilot's first live tick (2026-10-14) ended **quiet, $0** with no warning while recordings in its +scope had been uploaded since its start date: tier 0 took "what exists in scope" from ONE `enumerate_matches(".")`, +which stops at 2,000 recordings (`MCP_POLICY.hardVideoCap`). The scan reads channels in order and a channel's pages +oldest first, so on five channels holding 23,284 recordings it stopped inside TheQuartering at page 5 of 29 and never +reached the newest. The cap was in triage.json's warnings but never reached the tick: the tick ended quiet and +recorded a quiet edition, and seen.json kept the 2,000 old ids as `known`. The next by-id run would have counted the +other ~21,000 as new. Separately, the fetch stage queued `transcribe-bucket` while transcription was paused and would +have waited up to 6 h; a cancelled step raised no warning, and every "nothing new to transcribe" was one. + +- **A complete scope listing** (`mcp/src/enumerate.ts` `listRecordings`; `CorpusTools.listRecordings`, not an agent + tool; `CorpusToolsLike.listRecordings?`). Every recording in a scope, by id, comes from each channel's transcripts + manifest (`slugToPage`: every record the build ships, uncapped). Dates and titles come from the summaries index, or, + for a record the index lacks, from its own page (only those pages are read). A posts channel lists nothing and is + not a gap. A scope token no channel matches, a manifest that does not read, or a record no page dates is said in + `problems` and makes the listing incomplete. Tier 0 (`triage/tier0.ts`) lists with it; a corpus without it falls + back to `enumerate(".")` per channel, its cap said per channel. **The listing is the WHOLE scope on a first run too** + — this departs from the brief's "bound by `date_from = since`", because a since-bounded listing would become the next + run's `known` and every older recording would then be new by id. "New" on a first run is still by date + (`date >= since`). It is cheap: the pilot's five manifests and the index list 23,284 recordings in under 2 s. +- **Bounded term queries.** `enumerate_matches` takes **`ids`** (`search.ts`): the scan plan reads only the pages + holding them (`slugToPage`, the posts pass too), only their records match, and the footer says "restricted to N + recording id(s): M held by a channel in scope". Tier 0's terms query carries the new ids, and on a first run also + `date_from = since`. `deltaCandidates` with no known set adds `date_from = since` (a refresh of an iteration that + kept no whole match set; the daily check) and takes `ids`. A restricted sweep's `enumerate_matches` passes its ids + to the scan (`tasks/restrict.ts`), so a cap on the scope can no longer hide them. +- **No silent zeros.** + - `enumerateOf` reads a capped answer's coverage whole. A channel name with parentheses ("TheQuartering (Rumble)") is + read to the line's end; the old reading cut it at the ")". The channel the cap stopped inside is new: `stopped`, + "TheQuartering (stopped at page 5 of 29)". `enumerateViaTools` puts it first in `unreached`. + - **Tier 0** is `partial` with `unreached` and `problems`, and `listedBy`, manifests or enumerate. A partial run + keeps no seen set (`seen: null`): the last complete run's seen.json stands, or with none the next run counts new + from its `since`. Its summary starts "partial (not reached: …) ·", and its warning says what was not kept. + `partialWords` (triage/types.ts) is the one phrasing. The tick line's triage carries `partial`, and so does the job + marker. + - **The tick** (`reportTick.ts`): a partial triage **below the threshold** ends the tick **`partial`**, a new tick + status in `CALL_STATUSES` (a Your call card). The reason reads "partial — not reached: …; nothing flagged in what + was read (…)". A series records no quiet edition for it, so the next tick covers the window. A partial triage + **at or above** the threshold still escalates, with a warning on the tick. + - **The window check** (R5's `CountWindow`): the editor's count says `partial` and what it did not read. A 0 from a + capped check ends the edition step `partial` ("the window check of … was capped (…): nothing matched in what it + read, so the window is not called quiet"). With matches, the count is logged as "at least N" and the edition goes + on. + - **The refresh** (`refresh/task.ts`): a capped search with nothing to update ends `partial` (a new + `RefreshStatus`), "partial — not reached: …; Nothing new since … in what was read". This holds after a sweep that + found nothing too, unless a triage named the ids. `r4Steps.refresh` maps it to a partial tick. + - **The daily check** (umtool `lib/inbox/refresh.ts`): it keeps `unreached`, the stopped channel included. A partial + check with nothing new still raises **refresh-available**: "nothing new since … in what the check read · the + check was partial — not reached: …; a Refresh reads the rest". With new ones it says "at least N". + `umtool refresh --check` prints `PARTIAL (not reached: …)`. +- **R4.1 — fetch under holds** (`refresh/fetch.ts`). Before queueing `transcribe-bucket`, the fetch asks + `transcriptionHeld`. The default is `transcriptionHeldNow` (`controller/reportRefresh.ts`): the worker pool's live + state, paused or no worker enabled, never the stored flag. Under a hold the step is skipped with "transcription is + paused (…) — N recordings wait; a later run reads them once transcribed", keeping the ids, and it is a warning. A + `cancelled` step is a warning. "nothing new to transcribe" is a skip marked `routine`: never a warning, in + `r4Steps` or a refresh's tick. +- **Recovering a bad run: `report-schedule` `reset-triage {id, k?, confirm?}`** (`controller/reportSchedule.ts` + `planResetTriage` / `resetTriage`). The plan, unless `confirm: true`, names three things. The triage runs from run + `k` on (default all, `reports/.triage/<id>/<k>/`). seen.json goes when those runs fed it, so the next run counts new + from its `since`. The quiet edition lines those runs covered are dropped (found by the ticks' `edition` + + `triage.k`), so the next tick covers their windows again. The schedule, its cadence, its tick log and every edition + article stay. The reset is refused while a tick runs; with nothing to discard it is refused, saying so. One + read-patch-write under the article store's lock. COMMANDS.md regenerated. +- **umtool**: + - Inbox kind **tick-partial** (Your call, **See what was missed** → the schedule's page), its why the tick's reason. + - The series page tones a partial tick (`open`) and marks a partial triage run (`data-triage-partial`, the + `partial` badge and what it did not reach). The triage page's tier 0 names it (`data-tier0-partial`). + - A refresh `partial` is labelled on the Overview (the neutral `state` tag, as held-by-cap is). + - After the merge of `main` (P6b), P6b's notes on these files: the triage page's crumbs start at the series or + watch it belongs to (no "work"), and the Refresh dialog's started line is a neutral status (`text-text-2`, not + Signal). + - Files touched (for the orchestrator): `app/series/[id]/page.tsx`, `app/series/[id]/triage/[k]/page.tsx`, + `components/series/TriageView.tsx`, `components/articles/RefreshSummary.tsx`, + `components/articles/RefreshDialog.tsx`, `lib/inbox/{schedules,groups,what,refresh}.*`, + `lib/research/triage{,-types}.ts`, `lib/articles/refresh.ts`, `bin/refresh.ts`, `e2e/triage-first.spec.ts`. + Not touched: `umtool/docs/`, which is P6b's. `docs/inbox.md` and `docs/triage.md` should gain tick-partial, the + partial tier 0 and reset-triage. + +**Read-only proof on the real corpus** (offline `tsx` over `export/.export-builds/jeralyzer/out`, no editor, no +writes; the pilot's scope and terms from its triage.json; `since = 2026-10-07`): + +| | | +|---|---| +| the old scan (`enumerate(".")` over the scope) | 2,000 rows, partial: stopped inside TheQuartering at page 5 of 29; never reached TheQuartering (Rumble), Quartering Live, Jeremy Hambly, Melonie Mac | +| the listing | **23,284 recordings in scope, complete**: the-quartering 11,583, the-quartering-rumble 8,093, jeremy-hambly 2,419, quartering-live 980, melonie-mac 209; none undated | +| new (uploaded on or after 2026-10-07) | **99**: the-quartering 39, the-quartering-rumble 19, jeremy-hambly 22, quartering-live 17, melonie-mac 2 | +| term matches among them | **1**: melonie-mac `-oMa-NtaEOQ` 2026-10-08 "Go Boom Live! Ep 61" (the terms query read 99 ids; not partial) | +| seen.json it would keep | 23,284 ids | +| time / memory | 1.8 s, 403 MB RSS | + +The brief expected hundreds new; the build holds 99 uploaded since 2026-10-07. An independent per-channel check agrees: +`enumerate(".", date_from)` gives 39 / 19 / 17 / 22 / 2, none truncated, and the terms in the same windows match 1, the +same recording. The whole-scope terms query the pilot ran matched 1,619 and was truncated; none of the 1,619 was +recent. So the pilot's "0 new" was a silent partial, and on this build the honest answer is 99 new, 1 candidate. + +**Commits** (`ux/r61`, from `main` `4ceae82d`; `main` `26a482cf`, P6b live, merged before the final umtool gates): + +| sha | what | +|---|---| +| `10626f0b` | common, mcp, editor: `listRecordings` and enumerate's `ids`; tier 0 on a complete listing with bounded terms; partial everywhere an enumerate decides (tier 0, the tick, the window check, the refresh, `deltaCandidates`); `enumerateOf`'s coverage read; R4.1's transcription hold, cancelled and routine steps; `reset-triage`; tests (common +12, mcp +3); COMMANDS.md | +| `f152740d` | umtool: tick-partial, the series and triage pages' partial, a partial refresh, the daily check's partial card and `--check`; unit tests (+2) | +| `3c3308c4` | e2e: `triage-first.spec`'s partial tick (the stub's "partial"); `ops-api.spec`'s reset-triage over HTTP | +| `202df297` | `[Unreleased]` bullets | +| `795e5002` | merge `main` `26a482cf` (P6b live): CHANGELOG (both sides); `triage-first.spec` auto-merged | +| `dcdc9339` | P6b's notes: the triage page's crumbs, the refresh's neutral started line | +| (this commit) | this record | + +**Gates.** + +| Gate | Result | +|---|---| +| repo-wide `tsc --noEmit` | clean at `10626f0b`, `f152740d`, `3c3308c4` (common, umtool, editor); umtool clean at `dcdc9339` | +| common (`SETTINGS_FILE` at the primary's, read only) | **4167/4167** at `dcdc9339`. A first run before COMMANDS.md was regenerated had `cli-docs.test` red, which the same commit fixes. +12 new: tier 0 over a scope larger than the cap whose new recordings sort last; a capped scan partial, the channels named, seen not kept and the earlier seen.json standing; the corpus's listing the default; enumerateOf's coverage; deltaCandidates bounded by since and ids, partial under a cap; a capped refresh partial; R4.1's held, routine and cancelled steps; a partial tick (series, watch, living); the window check under a cap; r4Steps' partial and warnings; reset-triage | +| mcp | **368/368** (+3: `listRecordings.test.ts`, a three-page channel with the newest last: a capped scan's coverage parsed back, the listing dated by the index and by a page, an unknown channel said, enumerate with `ids` reading two of three pages) | +| 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 (before and after the merge; +1, `inbox/schedules.test.mjs`'s tick-partial) | +| `pnpm --filter umtool test` | **32/32** (before and after the merge; +1, the partial daily check's card) | +| `pnpm run test:scripts` | 1013 tests, 1010 pass, 3 skipped, 0 fail (before and after the merge) | +| `archilyzer docs cli --check` / `settings example --check` | clean / clean | +| capped editor `next build` (heavy slot, `MemoryMax=5G`) | exit 0; compiled 23.0 s, 2:43 wall, 2.51 GB max RSS | +| capped umtool `next build` (corpus linked inside the heavy slot, `MemoryMax=5G`) | exit 0; compiled 13.5 s, 1:24 wall, 1.54 GB max RSS; the link removed | +| **full editor e2e** (`export/public` linked from the primary, 0 dangling; queued, detached) | **714 tests: 701 passed, 1 failed, 12 skipped**, 24.0 min. Run on `3c3308c4`'s tree; the merge after it changed no editor file or spec (outside umtool only CHANGELOG and plans). The red: `channel-build-toggle.spec:23`, the /channels toggle still "Skipped" after 5 s under load; R6.1 touches no channels page or index build — alone below. Green among the 701: `ops-api.spec:1013` (the watch over HTTP, then reset-triage's plan, confirm and refusal) and `report-draft.spec:413` (a watch over the fake models, tier 0 now on the corpus tools' listing) | +| `channel-build-toggle.spec` alone (editor) | **1/1, 1/1, 1/1** | +| **full umtool e2e** at `dcdc9339` (merged; queued, detached) | **543 tests: 533 passed, 4 failed, 6 skipped**, 10.6 min. `triage-first.spec` green, including the new partial tick (the tick partial, the series page's tick row and run, the triage page's tier 0, the Inbox's tick-partial card and its action) and P6b's Work-kind check. The four reds are `board.spec`'s serial chain from `:127` (`e` did not focus the claim at `:167`; the three after it read the board it left). No board file is touched here | +| `board.spec` alone (5 runs at `dcdc9339`) | 8/8, **4 passed 4 failed** (the same `:167`, while this lane's common suite ran beside it), 8/8, 8/8, 8/8 | + +**Found and left.** +- **`board.spec:127`'s `e` still loses the claim field under load**, after the board-races fix: red in the full run + and in one of five runs alone, that one beside a 4,167-test common suite. Green in four quiet runs alone. Not this + lane's (no board file touched); for whoever next touches `BoardView.tsx`'s held keys. +- **`channel-build-toggle.spec:23`** went red once in the full editor run (the /channels toggle still "Skipped" after + 5 s under load) and was 1/1 three times alone. +- **The co-host pilot still carries its bad run.** `reports/.triage/co-host-updates/` holds run 1 and a seen.json of + 2,000 old ids taken from a partial scan. The series holds the quiet edition that run covered. After rollout: + `pnpm ops report-schedule --json '{"action":"reset-triage","id":"co-host-updates"}'`, then the same with + `"confirm": true`. The next tick then counts new from its since. Nothing was written to the live store here. +- **A first run's listing is the whole scope, not `since`-bounded** (above). The terms query is what `since` bounds. +- **The fallback** (a corpus without `listRecordings`: none in the editor, the MCP's in-process tools have it) still + scans `enumerate(".")` per channel. A big channel there is partial and says so; it is never quiet. +- **The refresh's search again with a known match set still scans the whole scope.** "Changed" and "unmatched" need + every match, so it is not `since`-bounded. A scope with more than 2,000 matches is partial, said, and an update + still reads what was found. +- **`umtool/docs/` is P6b's.** `inbox.md` and `triage.md` should name tick-partial, the partial tier 0 and + `reset-triage`. +- **Not built:** a partial edition that sweeps the window anyway. A partial tick is the operator's call: narrow the + scope, reset, or tick again. +