Archilyzer · Source

archilyzer

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

commit 160b873d961ef209f12b6602173d04a8f8c5b940
parent 09bd9767dd6c425191521bda1b0442a4363c4b8e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 06:56:05 -0400

plans: release 29 — evidence gaps, verdicts round 2, generation round 2, debts; the S0 record

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

Diffstat:
Aplans/release-29.md | 179+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 179 insertions(+), 0 deletions(-)

diff --git a/plans/release-29.md b/plans/release-29.md @@ -0,0 +1,179 @@ +# Release 29 — evidence gaps, verdicts round 2, generation round 2, debts + +Status: **in flight** — S0 done; phase 1 lanes A (E1 → E2), B (V1 → M8 code), C (G1 → G2 → D1). + +## Start here (the implementing session) + +Read before acting: +- `AGENTS.md`; +- `plans/STATE.md` ("Now") and `plans/FACTS.md`; +- `plans/tools/implementer-rules.md`; +- this plan, `plans/release-28.md`'s record (the media tasks, the drafts review, the bench) and + `plans/umtool-redesign.md`'s R4 and R6 records (refresh's reading of gone sources, the window judge and its marks). + +**The orchestrator** runs in the primary checkout; the integration branch is in the worktree `~/Projects/r29-integration`: +- lane worktrees: `pnpm wt add <branch> --from r29/integration`, then `link-fixture-public.sh`; +- merges are `--no-ff`; `main` moves by `git merge --ff-only` after the gates, coordinated with the "umtool redesign" + session (it shares `main`, :3001 and :3050 and runs a weekly pilot — first automatic tick 2026-10-19 06:00 ET; no + restarts then); +- rollout scripts are `~/reports/release-28/scripts` copied to `~/reports/release-29/scripts`, MERGE and LIVE re-guarded. + +## Context + +Release 28 is live (`main` also carries the umtool redesign, every phase LIVE at `dd162ec2`). It left: +- **H4:** four article citations the private homepage cannot compose — two YouTube videos are deleted, two Bluesky + posts cannot be screenshotted (the editor has no Bluesky capture). +- **M8 blocked:** the verdict bench put every model under the always-CORROBORATED baseline (Opus 48 %, qwen 46 %, + Sonnet 42 % vs 53 %), mostly calling PARTLY where the operator ruled CORROBORATED. +- **From the smoke:** Draft everything never drafts flips/threads on a converted cut (no deck); social-post promotion + text was out of r28's scope. +- **Debts:** relocateDir's mtime-only "changed" message, flaky tests, `generate`'s answer order. + +## Rulings (operator, 2026-10-14) + +- All four tracks (evidence gaps, verdicts, generation, debts). +- Bench v2 before M8; M8 ships enabled only for models that pass the operator's bar. +- Delete the three r28 smoke drafts. +- Draft everything's deck is an option, off by default. +- Bluesky shots are the real bsky.app page (headless, no login). +- A deleted video with no copy found becomes a text-only moment marked "source deleted". + +## Facts found (survey 2026-10-14, re-verified 2026-10-15 at `dd162ec2`) + +- **en track → 0 cues is already CLOSED** (release 20 D3, `videoStatus.ts:123-131`, `vtt.ts:59`). Not in r29. +- Bluesky: `capturePostsProblem` (`common/controller/capturePosts.ts:78-85`) refuses any fetcher without the optional + `captureByIds` (`common/social/fetchers.ts:287`); only X (`xGalleryDlFetcher.ts:1349`) and XenForo have it. + `blueskyFetcher.ts` (no login, AppView API) has `fetch`, `checkAvailability`, `fetchOne`; `normalizeBlueskyItem` + (:207-268) keeps `mediaCount` only, no image URLs. Capture storage: `common/social/postCapture.ts` + (`posts-media/<id>/{shot.png, media…, capture.json}`, `writePostCapture`, `captureWork`); prepare needs `shot.png` + (`common/publish/citedPostCaptures.ts:108`). Playwright loader: `common/social/playwrightRuntime.ts`. +- Compose gate: `common/publish/composeReports.ts:656-692` (`missing-media`; only the all-or-nothing + `allowMissingMedia`). The renderer already copes without media (`common/components/report/MomentArticle.tsx:50-80`, + `CitationCard.tsx:112`). Per-video gone status: `data/<id>/availability.json` (`common/lib/availability.ts`, + `isPermanentlyGone`); `missingEvidenceWindows` (`common/publish/reportMedia.ts:548-551`) already lists "unfetchable: + gone". `fetch-windows` takes a per-item `webpageUrl` override (`controller/fetchWindows.ts:439-441`), so a found copy + can fill `data/<ytid>/clips/` today. No Wayback CDX lookup exists; archive.org search/item/import do + (`archiveOrgClient.ts`, ops `archive-search`/`archive-item`), but an import lands under the archive.org identifier, + not the YouTube id. +- Bench: `common/lib/report/draft/bench/{items,prompt,run,score,store}.ts`; the prompt defines CORROBORATED as "true as + stated", PARTLY as "part unsupported" (`prompt.ts:37-41`) and puts `verdict` before `reason`; the model sees no + report/section context; resume iterates the union of models (`run.ts:183`), so a qwen-only rerun re-asks API pairs; + no prompt version is stored. Verdict meanings are written nowhere but the prompt. umtool bench page: + `umtool/app/tools/bench/page.tsx`, `umtool/lib/bench.ts`, `components/bench/BarForm.tsx`. +- M8 has nothing yet: `claimSchema` is strict (`common/lib/report/schema.ts:76-87`, docs `CLAIM_FIELD_DOCS` :204-216 → + REPORT.md); `makeCurrent` (`iterations.ts:699-726`) overwrites the article's report, so proposals kept in + `report.json` would vanish on a later iteration; the redesign reserved a `verdict-proposed` inbox kind + (`plans/umtool-redesign.md:162`); the pattern is `drafts-unreviewed` (`umtool/lib/inbox.ts`, + `inbox/{drafts,groups,what}.mjs`). Don't reuse `claim-unadjudicated` (the manifest claim bench's). +- Deck: `draftPrecheck` (`umtool/lib/report/chain-draft.mjs:16-23`) skips; the tasks refuse (`flips.ts:220-224`, + `threads.ts:169-172`); the minimal chrome is `{engine:"hyperframes", layout:"deck", deck:{}}` (`deck.mjs:137-157`, + `OnscreenSection.tsx:1053`); `STARTER_RENDER` has no chrome (`convertManifest.ts:389-411`). +- Social: nothing exists. The pattern is `publish.youtube` — `drafted.mjs` (:40, :47-55, :158, `validatePublish` + :505-530), `tasks/youtube.ts` (`YOUTUBE_SPEC`), `umtool/report-to-video/youtube.mjs` (`composeYoutubeText`, + `youtubePreview`), `build-video.mjs` `writeYoutubeText`, umtool `YoutubeSection` in + `components/projects/report/MediaTab.tsx:66`. +- **Since the redesign (2026-10-15):** + - Media surface: `umtool/components/projects/report/MediaTab.tsx` renders `<MediaDrafts>` (:32), `<OnscreenSection>` + (:46), `<YoutubeSection dir manifest>` (:54) — hardcoded JSX, no registry; draft rows come from `MEDIA_SECTIONS` in + `components/projects/MediaDrafts.tsx:51-59`; the Draft everything button is `MediaDrafts.tsx:517-531` + (`ChainPanel mode="draft-all"` :554). Chain logic (`chain.mjs`, `chain-run.mjs`, `chain-draft.mjs`) unchanged. + - `reportDraft.ts` dispatches `ReportDraftTask = GenerationTask | "refresh" | "triage"` (:143-146; triage :469, + refresh :477) with new body keys (`ids`, `fetch`, `dryRun`, triage's); `tasks/` gained `refresh`, `restrict.ts`; + `draft/refresh/`, `draft/triage/` are new. `GENERATION_TASKS`, `MEDIA_STEP_TASKS`, `claimSchema`, `FIELD_TASKS` + unchanged. + - **R4 already reads gone sources** (`draft/refresh/delta.ts:194-195, 273-295`, `RecordRead.state`, `goneParts` + "1 source deleted on YouTube", `refresh/types.ts:86-121, 226`) — E2 reuses that reading, not a second one. + - **R6's window judge** (`draft/triage/judge.ts` `judgeCandidates` :113): an injected `ask(system, user, schema)` over + `structuredAnswer` + `Meter`, model lines verified verbatim in the window (`locate`, `checkWordsInWindow`), a trace, + a cap via `stop()`; calibration by operator Right/Wrong marks (`umtool/lib/research/triage-marks.mjs`, + `precisionOf`/`suggestThreshold` in `triage/types.ts:313,335`, `GenerationTriage` settings). V1 reuses its shapes + (ask injection, trace, marks → precision) rather than inventing new ones. + - Inbox kinds (`umtool/lib/inbox/groups.mjs:42-66`): research-proposal, iteration-failed/ready, drafts-unreviewed, + open-note, unreadable-notes, link-ambiguous, looks-done, tick-failed/held/partial, edition-ready, worth-researching, + refresh-held/available. `verdict-proposed` is still unbuilt (reserved, redesign plan :1065, :1129). + - Flakes the redesign recorded and left: `publish-lane.spec:78`, `storage-locations.spec:723`; `site-scope.spec` owed + to r29 (R3 record); `fetchPosts.test.ts` red again under load in R5. +- Debts: `relocateDir.ts` `classifyDrift` :397-411 / the reconcile message :590-599 (`DIR_MTIME_ONLY` :368 already used + by verify); `fetchPosts.test.ts:236` (fixed 100/300 ms gaps, a 200 ms cancel); `scripts/queue-lock.test.mjs` fixed + holds at :167, :185/:196, :206/:212, :808; `mcp/src/generation.ts` `renderIterationSummary` :421-426. + +## Shape (slices) + +| # | Slice | What | Depends | +|---|---|---|---| +| S0 | Setup (orchestrator) | `r29/integration` from `main`; this plan; the test kit: a synthetic Bluesky post + AppView fake (`common/testing/social/fakeBluesky.mjs`), a fake Wayback CDX (`common/testing/web/fakeWayback.mjs`), a deleted-video record (`GONE_RECORD`, `GONE_AVAILABILITY`) in the draft corpus; delete the three r28 smoke drafts (`archilyzer reports delete <id> --apply`, plan first) | — | +| E1 | Bluesky capture | `blueskyFetcher.captureByIds`: `getPosts` (liveness + `embed.images[].fullsize`), headless Playwright with no profile on `bsky.app/profile/<h>/post/<rkey>` → `shot.png` (cropped to the post), images beside it, `writePostCapture`; availability merged as X's is. Optionally archive image URLs as `Post.media[]` in `normalizeBlueskyItem`. Paced (one page at a time, real gaps). | S0 | +| E2 | Deleted-video fallback | (a) ops `wayback-lookup {url\|slug,id}` → CDX captures (paced, the same client manners as `archive-search`); (b) `archive-search` by YouTube id → a mirror's direct file URL; (c) a `find-copy` step that tries Wayback then archive.org for each cited gone window and calls `fetch-windows` with `webpageUrl` (provenance records which copy); (d) compose: a cited moment whose recording `isPermanentlyGone` (or post deleted in `posts-availability.json`) and has no media is accepted, flagged `sourceGone`; `MomentArticle`/`CitationCard` show "source deleted" (export site + homepage share the components); prepare reports it as a warning, not a failure. Gone status is read the way R4's refresh reads it (`refresh/delta.ts`), one helper for both. | S0 | +| V1 | Bench v2 | `prompt.ts`: definitions to the operator's standard (CORROBORATED = the substance is shown; framing/unshown detail does not demote; PARTLY needs a part shown overstated or wrong), a CORROBORATED-vs-PARTLY tie rule, `reason` before `verdict`, report/section/speaker/date context, `PROMPT_VERSION`; the definitions in one shared place (`verdicts.mjs` + REPORT.md, generated). `items.ts`: window modes (±N, speaker turn), counted (not silent) drops, stratified `--limit`. `run.ts`/`store.ts`: `--items-from <run>`, resume over the invocation's models only, prompt version + item hash in the summary (refuse a cross-version resume). `score.ts`: "not CORROBORATED" precision/recall, run-vs-run comparison. Reuse R6's judge shapes: the injected `ask` for tests, a per-call trace, and operator Right/Wrong marks on disagreements (as `triage-marks.mjs`) so the bar can be set from marked precision. umtool `/tools/bench`: a run's prompt version, compare two runs, mark a disagreement (inside the existing page, on the redesign's primitives). | S0 | +| V2 | Bench v2 runs (orchestrator) | qwen-only on `vb-r28`'s items (free) per prompt iteration; then one paid run (≤ $5) on the best prompt; results in the record (counts only); the operator sets the bar | V1 | +| M8 | Proposed verdicts | Proposals in a sidecar `transcripts/reports/<id>/verdicts.proposed.json` written through the registry (survives `makeCurrent`; never in `report.json`); `tasks/verdicts.ts` (reuses `benchItemsOfReport` in an "unruled" mode + `benchPrompt`; refuses models not in `settings.generation.verdicts.models`; never writes `verdict`); `GENERATION_TASKS` + routes, dispatched in `reportDraft.ts` beside R4/R6's `refresh`/`triage`; `pnpm ops verdict-review {article, claim, approve, note}` (approve → `patchArticle` sets `verdict`); umtool: the `verdict-proposed` inbox kind (`lib/inbox.ts`, `inbox/{groups,what}.mjs`) + approve/reject on the article (a new small component). Built after V1; ships enabled only for models that pass the bar. | V1 (code); V2 + the operator's bar (enable) | +| G1 | Deck option | Draft everything `deck: true` (umtool chain body `deck`, `umtool chain --deck`): a non-model chain step `deck` before `draft-flips` writes the minimal chrome only when `render.chrome` is absent, through the manifest writer (snapshot), and says so in the step detail; default off (behaviour unchanged). UI: a "with the deck" checkbox beside the button in `MediaDrafts.tsx` (~:517). | S0 | +| G2 | Social promotion text | `publish.x` / `publish.bluesky` drafted fields (`drafted.mjs` registry + `validatePublish`); `tasks/social.ts` on the media scaffold (one post + an optional short thread each; code enforces X 280 with URLs at 23, Bluesky 300 graphemes; grounded, third person, no unsaid quotes; links appended by code: the video/article URL); chain step `draft-social` after YouTube; `report-to-video/social.mjs` composer → `out/x.txt`, `out/bluesky.txt`; `components/projects/SocialPostSection.tsx` (show + Copy, like `YoutubeSection`) mounted in `MediaTab.tsx` after `YoutubeSection` (:54); `social` added to `MEDIA_SECTIONS` (`MediaDrafts.tsx:51-59`) for its draft row. Text only — never posts. | S0 | +| D1 | Debts | relocateDir counts `DIR_MTIME_ONLY` separately in the reconcile message; `fetchPosts.test.ts` and `queue-lock.test.mjs` gate on files instead of fixed delays; `generate`'s answer puts `Video project:` first for step tasks; editor `site-scope.spec` (a Back lands on about:blank, ~1/13 since r23), `publish-lane.spec:78` and `storage-locations.spec:723` — wait on the real event; each 5 runs. | S0 | + +## Lanes (at most three Opus implementers; worktrees from `r29/integration`) + +- **S0 (orchestrator)**, then **phase 1**: + - lane A (`r29/evidence`): E1 → E2; + - lane B (`r29/verdicts`): V1 → M8 (code); + - lane C (`r29/gen-debts`): G1 → G2 → D1. +- The orchestrator: S0; V2's runs once V1 merges; the gate round; the rollout; H4's re-run. +- Prelude `$T/r29-prelude.md` (from r28's), plus: umtool UI on the redesign's primitives (`components/ui/*`, role + tokens, `lib/hrefs.ts`) and URLs (`/projects/<p>?tab=…`, `/tools/bench`; old paths are 308s). +- Merge hotspots: `reportDraft.ts` / `generationSettings.ts` / `tasks/index.ts` (B's `verdicts`, C's `social`); + `drafted.mjs` (C); `umtool/lib/inbox/*` (B); `scripts/archilyzer-ops.mjs` + COMMANDS.md (A's ops, B's + `verdict-review`); SETTINGS.md; `editor/CHANGELOG.md`; this file's Record. Generated docs are regenerated at merge. + +## Rules that bind every slice + +As release 28: +- no session links or trailers; the Co-Authored-By line alone; +- heavy work through the heavy slot (6 GB floor, one `next build` at a time); +- scratch in the job dir, never `/tmp`; +- no hand edits under `transcripts/**`; +- no yt-dlp, gallery-dl or ASR by hand — captures and fetches go through the editor, paced: one stream, real gaps, back + off on 429; +- never print the key or the scrub files; +- Candace data stays local-only — bench commits carry counts only; +- tests use fakes; real calls only in V2 (≤ $5) and the live smoke (≤ $3); +- message the redesign session before restarting :3050 or moving `main`. + +## Verification + +- Unit: E1 against the fake AppView + a Playwright page over a local fixture (no network); E2 CDX parsing, find-copy + order, compose's `sourceGone` acceptance and its refusal of a live-but-missing moment; V1 prompt version / resume / + items-from / stratified limit / the new scores; M8 never writes `verdict`, refuses unlisted models, the sidecar + survives `makeCurrent`; G1 the deck written only when absent; G2 lengths (X URL weighting, Bluesky graphemes), + grounding; D1 flakes 5× each. +- e2e: umtool `verdict-bench.spec` (prompt version, compare), a `verdict-proposed` spec (inbox row → approve → verdict + set), `media-draft.spec` gains deck + social; editor `capture-posts` for a Bluesky channel over the fakes; the export + `report` suite gains a source-deleted moment. +- Gates on the integration tip: typecheck, all unit suites, docs/settings checks, four capped builds, `pnpm e2e:all`, + privacy counts, the source mirror check. +- Live (the operator's key, ≤ $3 smoke; ≤ $5 bench): capture the two H4 Bluesky posts; run find-copy on the two deleted + videos (a copy found → clip; else text-only "source deleted"); `reports prepare` + the private homepage build succeed; + Draft everything with the deck on a fresh article (flips/threads drafted); `out/x.txt` / `out/bluesky.txt`; bench v2 + numbers for the operator's bar; then M8 on one fact-check for a passing model, a proposal approved in umtool. + +## Rollout + +Fast-forward `main` (coordinated with the redesign session); editor + umtool rebuild/restart via +`~/reports/release-29/scripts` (copied from r28's, MERGE/LIVE re-guarded); homepage source-mirror publish; the private +homepage build (H4 closed). + +## Record + +### S0, as shipped (2026-10-15, orchestrator) + +`r29/integration` from `main` `dd162ec2`, in the worktree `r29-integration`. + +| Commit | What | +| --- | --- | +| `89b93fa5` | the test kit: `social/fakeBluesky.mjs` (AppView `resolveHandle`/`getPosts` with `embed.images[].fullsize`, a bsky.app-shaped post page with `postThreadItem-by-<handle>`, PNG images, 429s), `web/fakeWayback.mjs` (CDX json/text, status filter, limit, prefix, captures, 429/503), `draft/corpus.mjs` `GONE_RECORD` + `GONE_AVAILABILITY` | +| (this commit) | this plan | + +Gates: common tsc clean; `testing/fakes.test.ts` 13/13 (10 + 3 new). + +## Not in this release + +Auto-posting to X/Bluesky/YouTube (text only); any umtool restructuring; the "en track → 0 cues" bug (closed in r20).