Archilyzer · Source

archilyzer

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

commit 84aa4735e28129dfaec28395d96e1da5304c3b35
parent 929cdd303eb3511bffeb2a87e488eb10f0a26fea
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 08:00:51 -0400

plans: release 29 — the M8 record (proposed verdicts, code), FACTS (the sidecar, the verdicts task, the inbox kind), CHANGELOG

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

Diffstat:
Meditor/CHANGELOG.md | 1+
Mplans/FACTS.md | 17+++++++++++++++++
Mplans/release-29.md | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **A model can propose verdicts for a fact-check's unruled claims, for you to approve or reject.** `pnpm ops report-draft --json '{"task":"verdicts","article":"<id>"}'` asks each claim with no verdict, with the verdict bench's own prompt, and keeps each proposed verdict, its reason, the model and the prompt version in `verdicts.proposed.json` beside the article, never in `report.json`. It runs only on a model you ticked on the verdict bench (`settings.generation.verdicts.models`, empty until you do), and never sets a verdict itself. umtool's Inbox shows "N verdicts proposed" under Review; **Review verdicts** opens the article, where each proposal has **Approve** (the claim gets that verdict) and **Reject** (the claim stays unruled), with an optional note. A claim you have ruled, or whose proposal you have reviewed, is not asked again. `pnpm ops verdict-review` does the same from the command line. Needs a restart of the editor and umtool. - **The verdict bench asks to the operator's standard, and says which prompt it asked with.** What each verdict means is written once (`common/lib/report/verdicts.mjs`) and read by the bench's prompt, REPORT.md and umtool's bench page: CORROBORATED when the substance of the claim is shown by the cited words (framing, emphasis or a detail the transcript does not show does not demote it), PARTLY only when a part is shown overstated or wrong, and when in doubt between the two, CORROBORATED. The model now writes its reason before its verdict, and sees the report's title, the claim's section, and each cited line's speaker and recording date. Each run records its prompt version and a hash of its items; a run made before this is version 1, and a run is never resumed under another version. Needs a restart of the editor and umtool. - **`archilyzer reports bench-verdicts` takes `--items-from <run>`, `--window-mode seconds|turn` and a stratified `--limit`.** `--items-from vb-r28` asks the same items again (for example a local model on a new prompt, at no cost). `--window-mode turn` shows the cited speaker's turn instead of a fixed number of seconds either side, bounded by `--window`. `--limit` keeps every verdict the operator ruled, in proportion. A re-run of a run asks only the models it names, so a local-only re-run never asks a paid model again. A citation that gives no transcript is listed with its reason instead of being left out silently. `pnpm ops bench-verdicts` takes the same keys (`itemsFrom`, `windowMode`, `limit`). - **umtool's verdict bench compares runs and takes your marks.** `/tools/bench` shows each run's prompt version and items hash, and **compare with** lists the runs over the same items: each model's agreement in both and every claim whose answer changed. Each disagreement has **Right** and **Wrong** (was the model right?), kept beside the run, and the not-CORROBORATED precision and recall beside the bar are shown as ruled and with your marks, so the bar can be set from what you marked. "What the verdicts mean" lists the definitions. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -9495,3 +9495,20 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri (`draft/triage/types.ts`, which `precisionOf` now uses too). - **The injected model** is `BenchDeps.ask(system, user, schema, model)` — no Meter, so an injected ask costs nothing in the run's spend. + +## Release 29 M8: verdict proposals (verified 2026-10-15, branch `r29/verdicts`) + +- **The sidecar** is `transcripts/reports/<id>/verdicts.proposed.json` (`archilyzer-verdict-proposals` v1, + `{article, proposals: {<claim id>: {verdict, reason, model, promptVersion, at, status: proposed | approved | + rejected, note?, reviewedAt?}}, updatedAt}`). ONE writer: `common/lib/report/verdictProposals.ts` + (`recordVerdictProposals`, `reviewVerdictProposal`) under `withArticleStoreLock`; reads lock-free + (`readVerdictProposals`: null when absent, a `VerdictProposalsError` 409 when it does not read). It is never in + `report.json`; a claim's `verdict` is set only by the operator's approve (`patchArticle`). +- **`verdicts` is a GenerationTask with no iteration and no step**: `report-draft {"task": "verdicts"}` is its own job + (`controller/reportVerdicts.ts`), answering `iteration: 0`; `runReportDraft` refuses it like refresh and triage. It + runs only on a model in `settings.generation.verdicts.models` (`verdictsModelOf`; the job re-reads the list at its + turn). Its usage rows are task `verdicts`, iteration 0. +- **umtool's `verdict-proposed`** rows are one per waiting proposal on a still-unruled claim of a store fact-check + (`umtool/lib/articles/verdicts.ts` `readArticleProposals`), group Review, action "Review verdicts" → + `/articles/<id>?tab=article`, whose region `verdict proposals` approves or rejects through `/api/articles/verdicts` → + `POST /api/ops/verdict-review`. diff --git a/plans/release-29.md b/plans/release-29.md @@ -256,6 +256,79 @@ Found and left: of segments. - **An injected `ask` has no Meter**: its calls cost nothing in the run's spend (the cap still applies to the estimate). +### M8, as shipped (code) (2026-10-15, lane B, `r29/verdicts`) + +Proposed verdicts: a model that cleared the bench's bar proposes a verdict for each unruled claim of a fact-check; the +operator approves or rejects each. Built and tested over the fakes and an injected `ask` only; **nothing runs live +until the operator ticks a model** (`settings.generation.verdicts.models` is empty by default) — after V2 and the bar. + +- **The sidecar** `transcripts/reports/<id>/verdicts.proposed.json` (`archilyzer-verdict-proposals` v1: + `proposals: {<claim>: {verdict, reason, model, promptVersion, at, status: proposed|approved|rejected, note?, + reviewedAt?}}`), written only by `common/lib/report/verdictProposals.ts` under the article store's lock, whole and + atomic; a file that does not read is a 409, never taken for empty. Never in `report.json`, so `makeCurrent` cannot + drop it (tested); compose, the homepage and the history read `report.json` only. `recordVerdictProposals` replaces a + waiting proposal and keeps a reviewed one; `reviewVerdictProposal` approve → `patchArticle` sets the claim's + `verdict` (refused when the claim was ruled meanwhile, or is gone), then the proposal `approved`; reject → `rejected`, + the claim untouched. +- **The task** `common/lib/report/draft/tasks/verdicts.ts` `proposeVerdicts`: `unruledItemsOfReport` (V1's reading of + the claims with no verdict; a ruled claim is skipped "ruled by the operator") and `benchPrompt` (PROMPT_VERSION on + every proposal), one claim per call; REFUSES a model not in `allowed` (`settings.generation.verdicts.models`, read + again at the job's turn); never writes `verdict`; skips a claim whose proposal the operator approved or rejected; an + API model held to `maxUsd` before each call. `verdictsModelOf`: the asked model (must be listed), else the first + listed model on the `verdicts` route (`api`/`local`); `code` needs a model named. +- **Generation:** `verdicts` in `GENERATION_TASKS` and every preset (`code`, `balanced` local, `api`, `local`); + `report-draft {"task": "verdicts", "article", "claims"?, "model"?, "maxUsd"?}` dispatched in `reportDraft.ts` beside + refresh/triage to `controller/reportVerdicts.ts` `enqueueVerdictProposals` — one `report-draft` job (no iteration: + the answer's `iteration` is 0) on `draft:local` (the GPU arbiter's gated fetch, ollama unloaded at the end) or + `draft:api` (the revision cap, the daily cap at the ask and the turn, ledger rows task `verdicts`); the cues the + local corpus's (`diskCuesOf`, as the bench); the log ends `@@report-draft {…, verdicts: {proposed, failed, skipped, + promptVersion}}`. The new body key `claims` (a verdicts job's only). +- **Review:** `pnpm ops verdict-review {article, claim, decision: approve|reject, note?}` → `POST + /api/ops/verdict-review` (synchronous; 404 no proposal, 409 reviewed already / ruled meanwhile / a sidecar that does + not read). The ops ACTIONS row and help, COMMANDS.md, SETTINGS.md (`routes.verdicts`), settings.json.example, + REPORT.md (the sidecar, the claim's `verdict` doc) regenerated. +- **umtool:** the Inbox's `verdict-proposed` kind (Review, action **Review verdicts** → the article's `?tab=article`; + `lib/inbox/verdicts.mjs` after `drafts-unreviewed`'s pattern, one row per proposal, the card "N verdicts proposed", + "by <model> · prompt v<n>"; `lib/inbox.ts` reads each store fact-check's waiting proposals on still-unruled claims — + gone once approved, rejected, or ruled by hand); the article tab's region `verdict proposals` + (`components/articles/VerdictProposals.tsx`: each claim with its section, the proposed verdict as plain mono text — + no verdict colour, it is not a ruling — the reason, model and prompt version, a note box `note on <claim>`, **Approve** + / **Reject** outlines; `data-proposal`, `data-proposed`; status "Approved: c2 is PARTLY." / "Rejected: c3 stays + unruled.") through `/api/articles/verdicts` → the editor's verdict-review. The e2e stub runs the REAL review over the + fixture's store (`common/testing/verdicts/reviewStub.ts`). Docs: `umtool/docs/inbox.md`, `tools.md`. + +| Commit | What | +| --- | --- | +| `784e421f` | common, editor: the sidecar store, the task, the generation wiring, the controller, `verdict-review` (route + ops row); `tasks/verdicts.test.ts` (4), `_verdicts.test.ts` (2), mcp `generation.test.ts` (the api preset routes verdicts); COMMANDS.md, SETTINGS.md, REPORT.md, settings.json.example | +| `62ed2add` | umtool: the inbox kind, the proposals panel, `/api/articles/verdicts`, the stub route, `verdict-proposed.spec`, `inbox/verdicts.test.mjs` | +| `a14f4fc6` | docs: umtool's inbox and tools | +| (this commit) | this record, FACTS, CHANGELOG | + +Gates (at `a14f4fc6`): + +| Gate | Result | +| --- | --- | +| repo-wide `tsc --noEmit` | clean at each commit | +| common | 4202 tests, 4201 pass, 1 fail — `controller/transcribeFile.test.ts` "with no workerId the pool's highest-priority local worker…" (timing under the full suite's load; that file 24/24 three times alone; not touched by this lane) (+4: `tasks/verdicts.test.ts` — the model rule; the unruled claims only, report.json byte-identical, unlisted models refused; the sidecar survives makeCurrent, approve through patchArticle, reject, twice refused, a rerun skips ruled and reviewed claims, a reviewed proposal never replaced, a claim ruled by hand refuses approve; an API model capped) | +| editor unit | **306/306** (+2 `_verdicts.test.ts`: the body; refused until a model clears the bar, then a job on draft:local writing proposals and never a verdict, ollama unloaded, approve sets it) | +| mcp | 370/370 | +| `test:scripts` | 1015 tests, 1012 pass, 3 skipped, 0 fail (+1 `inbox/verdicts.test.mjs`) | +| `pnpm --filter umtool test` | 33/33 | +| `docs cli|files|env --check`, `settings example --check` | clean | +| capped umtool `next build` (the corpus linked, heavy slot, `MemoryMax=5G`) | exit 0; compiled 16.5 s, 55.7 s wall, 1.54 GB max RSS; the link removed; `/api/articles/verdicts`, `/api/bench/marks`, `/tools/bench`, `/api/browse/decisions` traces 1,019–1,088 files, none from `transcripts/`, `.e2e-song` or `.env*` | +| capped editor `next build` (heavy slot, `MemoryMax=5G`) | exit 0; compiled 21.2 s, 1:31 wall, 2.52 GB | +| umtool e2e `verdict-proposed.spec` (+ `article-notes.spec`, foreground, queued) | run 1: 9 passed, 1 failed — the panel unmounted with its status when the last proposal went (fixed: mounted while the article has a proposals file); run 2: **1/1**, 40.6 s | + +Found and left: +- **Enabling is the operator's**: tick a model on `/tools/bench` after V2; then `pnpm ops report-draft --json + '{"task":"verdicts","article":"<a fact-check>"}'` (or the MCP's `generate`). No umtool button starts a run yet (the + brief named none); the Inbox and the article tab are the review side. +- **The window** a proposal reads is the bench's default (±60 s, `seconds`); a bar set on a `turn` run would want the + proposals in that mode too — `VerdictsInput.windowMode` exists, nothing sets it from settings yet. +- **Two lock windows on approve**: the verdict is set by `patchArticle`, then the proposal marked; a crash between + leaves a `proposed` entry on a ruled claim, which nothing shows (the inbox and the tab list unruled claims only) and + a rerun skips. + ## Not in this release Auto-posting to X/Bluesky/YouTube (text only); any umtool restructuring; the "en track → 0 cues" bug (closed in r20).