Archilyzer · Source

archilyzer

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

commit 2605f7f648f7c52764cb24f3ff0d0a5d36bccd8c
parent cbb48cd58cdf7aad928134aaf5d6be06d5c638e4
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 08:17:45 -0400

plans: release 29 — lane C's records (G1 the deck option, G2 the social posts, D1 the debts, the lane's gates), FACTS "Release 29 lane C", CHANGELOG

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

Diffstat:
Meditor/CHANGELOG.md | 6++++++
Mplans/FACTS.md | 40++++++++++++++++++++++++++++++++++++++++
Mplans/release-29.md | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 195 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog ## [Unreleased] +- **Draft everything can add the on-screen deck first.** Tick **with the deck** beside **Draft everything** on a cut's Media tab (or `umtool chain <article> <n> --draft-all --deck`): before the flips, a step adds the on-screen deck with every setting at its default to a cut that has none, so the flips and threads are drafted on a cut the converter made. A copy of the cut as it was is kept in its revisions first. A cut that already has a deck is left as it is, and the step says "deck added" or "deck already there". Off by default: without the tick, Draft everything is as it was. Needs a restart of umtool. +- **Posts for X and Bluesky, drafted for you to copy — never posted.** A new media draft, `social`, writes a post for X and one for Bluesky, each with up to four more posts under it, from the article's evidence: third person, every name and number from the report, quotation marks only around words a cited clip says, and no links, hashtags, @mentions or emoji of its own. The link under the first post is added by code: the video's URL when the cut's manifest has one (`publish.videoUrl`, yours to set once the video is up), else the article's page on the homepage when the article is public there. The lengths are counted as each platform counts them — on X a link is 23 and an emoji 2, at most 280; on Bluesky 300 characters as a reader sees them — and a post over it is cut at a sentence or refused, never sent long. The Media tab's **Social posts** shows each post with its counted length and **Copy**; every build that writes `out/youtube.txt` also writes `out/x.txt` and `out/bluesky.txt`, and Draft everything drafts them after the YouTube text. Draft it alone from the Media tab's **Social** row, `archilyzer gen run social --iteration <n>`, or `generate` in the MCP. It takes narration's route in every preset. Needs a restart of the editor and umtool. +- **The site picker no longer loses your place in the history, or lags under load.** Choosing another site on a site's own page could, now and then, replace the page you chose it on in the browser's history, so Back skipped it; and on a busy machine a new site could take seconds to show on Dashboard or Channels. The choice is now written first and the page then moves or re-renders, every time. Needs a restart of the editor. +- **The drive health timing on `/storage` says "Saved." at once** — it could wait about five seconds (the next automatic refresh), as Settings' save did before. Needs a restart of the editor. +- **A storage move's Reconcile and resume no longer calls a folder whose date alone differs "changed".** It says "N directories differ only in mtime" apart from what was added, missing or changed, and a reconcile with nothing else to settle says the copy's content already matches. +- **`generate`'s answer for a media draft names the video project first**, above the iteration's own files. - **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 @@ -9524,3 +9524,43 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri - **The Wayback CDX client** (`lib/waybackClient.ts`) is an `ArchiveOrgClient` instance of its own (gap, UA, back-off); `parseCdxJson` reads the header row's columns, and `[]`, an empty body or a header alone are none. + +## Release 29 lane C: the deck step, the social posts, the active-site write (verified 2026-10-15, branch `r29/gen-debts`) + +- **A chain step may carry an `option`** (`umtool/lib/report/chain.mjs`, `CHAIN_OPTIONS = ["deck"]`): it is in a + chain only when that option is on — `chainStepsOf(mode, {deck})`, and `chainStart` / `chainSteps` / `planChain` + take `deck` (refused with the video chain). Draft everything with `deck` has the optional, model-less step `deck` + between `draft-teaser` and `draft-flips`; without it the draft-all list is release 28's plus `draft-social` at the + end (16 steps; 17 with the deck). The chain route takes `deck` (POST) / `&deck=1` (GET); `chainViewOf` lists the + step when asked or when the iteration recorded `chain:deck`. +- **The minimal deck is `deckChrome()`** (`umtool/lib/report/chain-draft.mjs`; the On-screen switch's too), and the + writer that adds it only to a cut with none is `addDeckChrome(dir, chrome)` (`lib/report/manifest.mjs`: a set + `render.chrome` is never touched; else `validateChrome`, an `auto-before-deck` snapshot, the write). Its defaults + do not fit a small frame (640×360 refuses: the deck needs ~294 px of footage height). +- **`publish` holds `youtube`, `x`, `bluesky`, `videoUrl`** (`PUBLISH_KEYS`, `validatePublish`, `drafted.mjs`). + `publish.x` / `publish.bluesky` are `{post, thread?}`, drafted fields of the `social` task (`FIELD_TASKS`; review + addresses `social/*/publish.x`, `social/*/publish.bluesky`); the stored first post INCLUDES its link (under a blank + line). `publish.videoUrl` is the operator's (an http(s) URL; nothing drafts it). +- **How a social post is counted is `common/lib/report/social.mjs`** (exported, no node imports): X 280 with every + `http(s)://` / `www.` URL 23, an emoji grapheme 2, a code point in 0–4351, 8192–8205, 8208–8223 or 8242–8247 1, any + other 2 (`xLength`); Bluesky 300 NFC graphemes (`blueskyLength`); a thread of at most 4 (`SOCIAL_LIMITS`). + `socialLinkOf(manifest, {articleUrl})`: `publish.videoUrl`, else the article URL the caller gives. +- **The `social` task** (`common/lib/report/draft/tasks/social.ts`) is a media step with narrate's route in every + preset: one unit per platform; the link is resolved once per run (`publish.videoUrl`, else `PROJECT_URL` + + `/articles/<id>/` when the registry has the article published and public, else none — logged, not a check); + `toField` appends it. `out/x.txt` / `out/bluesky.txt` are `report-to-video/social.mjs` `composeSocialText` (the first + post, then `— k/n —` and each thread post), written by build-video at the top of `writeYoutubeText` (a platform with + no post loses its file) and by Draft everything's `draft-social`. +- **The active-site cookie is written by `POST /api/active-site`** (`editor/app/api/active-site/route.ts`: JSON + `{value}`, an Origin that is not this host refused, `{ok}`), not a server action (`setActiveSiteAction` is gone). + `SiteScopeProvider.choose(value, {navigating?})` refreshes the router after a write unless the caller navigates; + `record` (a site page's visit, the migration) refreshes too. Why: a cookie set in a server action is answered before + the router applies the action's re-render; a `router.push` in that gap discards the action and its replayed refresh + can commit the push as a history REPLACE (Next 16 `HistoryUpdater`: a push whose URL is already the location is a + replace). +- **A server action that revalidates delays its own answer** until the router applies the revalidated tree, which + under in-flight prefetches can wait for the next AutoRefresh pulse (~5 s). Settings' save (R6.3) and the drive + health timing's save (`saveHealthTimingsAction`, D1) no longer revalidate and refresh after an ok answer; the lane + pause/resume actions (`LaneActionButton`) still revalidate. +- **`CopyDifferences.mtimeOnly`** (`common/controller/relocateDir.ts`): `classifyDrift` puts a directory whose only + difference is its mtime there, not in `changed`; `describeDifferences` names it apart. diff --git a/plans/release-29.md b/plans/release-29.md @@ -372,6 +372,155 @@ Gates (from the worktree root): Not done: the editor has no UI for find-copy (ops and the research door only — the brief named none); prepare's `warnings` are in the index and the job log, not on the editor's Reports tab. +### G1, as shipped (2026-10-15, lane C, `r29/gen-debts`) + +Draft everything's deck, as ruled: an option, off by default. Built as the plan's Shape row, with these as built: +- **The step** is `deck` in `CHAIN_STEPS` (`umtool/lib/report/chain.mjs`), mode `draft-all`, `option: "deck"`, placed + after `draft-teaser` and before `draft-flips`, no `draft` (no model, no `--model` on its argv). A step with an + `option` is in a chain only when that option is on: `chainStepsOf(mode, {deck})`, and `chainStart` / `chainSteps` / + `planChain` take `deck`. Without it the draft-all chain is exactly release 28's list (its labels count the same); + `deck` with the video chain is refused. It is `optional`: a refusal is recorded failed and the chain goes on (flips + and threads are then skipped by `draftPrecheck`, as before). +- **What it writes** is `deckChrome()` (`chain-draft.mjs`, the one constructor: `{engine: "hyperframes", layout: + "deck", deck: {}}`, a fresh object), which the On-screen section's switch now calls too (it had the literal). There + was no constructor in `deck.mjs` to reuse (its :137-157 is `validateChrome`). It is written by + `addDeckChrome(dir, chrome)` (`lib/report/manifest.mjs`): under the manifest lock, a cut whose `render.chrome` is + set (anything but null/absent) is left untouched (`{added: false}`, nothing written); else `validateChrome`, an + `auto-before-deck` snapshot in `revisions/`, then the writer. The step's line is "deck added: …" or "deck already + there: …" (`deckStepDetail`). +- **Where it is asked for:** umtool's chain route takes `deck` in the POST body (refused without `draftAll`) and + `&deck=1` on the GET; `chainViewOf(…, {deck})` lists the step when asked or when the iteration recorded a + `chain:deck` step; `ChainPanel` takes `deck`; `MediaDrafts` has the **with the deck** checkbox + (`data-draft-everything-deck`) beside **Draft everything**, the run keeping the value it was started with; + `umtool chain <article> <n> --draft-all --deck` (`--deck` alone is refused). +- **Found:** the minimal deck (its defaults) does not fit a small frame: on the e2e's 640×360 cuts `validateChrome` + refuses it ("footageScale 0.82 needs 294px but a 190px deck leaves 170"). The step is then recorded failed, as built; + the e2e's deck cut is full HD. + +| Commit | What | +| --- | --- | +| `ca779c9d` | umtool: the `deck` step, `deckChrome`, `addDeckChrome`, the route/view/panel/checkbox and `--deck`; `chain.test.mjs` (+1), `chain-draft.test.mjs` (+1); common `deckOption.test.ts` (3: flips and threads drafted on a converted cut given the deck, over the fake ollama, through umtool's own writer) | +| `b3e05faf` | (G2's commit, which carried the e2e of both) umtool e2e: `media-surfaces.spec.ts` "Draft everything with the deck" on msurf i3: the deck step done, the flips drafted (the stub's canned flips on a cut with a deck), the threads skipped, the snapshot, then the chain cancelled | +| `4979ee0e` | umtool e2e: msurf i3 is a full-HD cut (the minimal deck's defaults need the room) | + +### G2, as shipped (2026-10-15, lane C, `r29/gen-debts`) + +The social promotion text, text only. Built as the plan's Shape row, with these as built: +- **The counts are one module**, `common/lib/report/social.mjs` (+ `.d.mts`, exported; no node imports, so umtool's + page reads it): `SOCIAL_LIMITS` (X 280, Bluesky 300, a thread of at most 4, a URL 23), `xLength` (twitter-text's v3 + weighting: every `http(s)://` or `www.` URL 23, an emoji grapheme 2, a code point in 0–4351, 8192–8205, 8208–8223, + 8242–8247 1, any other 2), `blueskyLength` (NFC graphemes, `Intl.Segmenter`), `withLink` (the post, a blank line, + the link), `validateSocialPost`, `socialLinkOf`. +- **The fields:** `publish.x` and `publish.bluesky` `{post, thread?}` in `drafted.mjs` (`DRAFTED_MANIFEST_FIELDS`, + `FIELD_TASKS` → `social`, `isEmptyField`, the marks' placement check). `validatePublish` takes `PUBLISH_KEYS` + (`youtube, x, bluesky, videoUrl`): each post within its platform's count, a thread of at most 4, and + `publish.videoUrl` an http(s) URL. **`publish.videoUrl` is new**: the video's public URL, the operator's to set once + it is up; nothing drafts it. The stored first post INCLUDES its link (so the field is the post as published, and + the lint counts what is pasted). +- **The task** (`tasks/social.ts`, `SOCIAL_SPEC` on `runMediaTask`): one unit per platform, the YouTube task's + evidence (`evidenceOf`, now exported). The link is code's, resolved once per run: `publish.videoUrl`, else the + article's homepage page (`PROJECT_URL` + `/articles/<id>/`) when the registry has it published and `audience` + public, else none — said once in the log, not a check (a check's soft problem would re-ask a model that cannot fix + it). The prompt names the first post's budget (the limit minus the link's room: 255 on X); code counts the post + WITH its link, refuses links, timestamps, hashtags, @mentions and emoji, and grounds every post with + `checkLine(…, {quotes: true})` (names and numbers, Q1's third person, quotation marks only around a cited quote's + words). The repair keeps the first post's sentences that pass and fit, and drops failing thread posts (to 4); never + a rewrite. `toField` appends the link. +- **Wired** as a media step: `MEDIA_STEP_TASKS`, `GENERATION_TASKS`, narrate's route in every preset (a release-28 + settings file keeps its preset, `social` takes the preset's route), `reportDraft.ts`'s media case, `runTask`, the + MCP's lists and `MEDIA_REVIEW`, `/gen`'s phrasings, `archilyzer gen`'s usage; SETTINGS.md, settings.json.example and + COMMANDS.md regenerated. +- **Files:** `umtool/report-to-video/social.mjs` (`composeSocialText`: the first post, then each thread post under a + `— k/n —` line; `socialTexts`, `socialTextName`), exported `umtool-report-to-video/social`. build-video's + `writeSocialText` runs at the top of `writeYoutubeText` (every chapter mux, every variant: the posts are the cut's) + and removes a platform's file when its post is gone. Draft everything's `draft-social` (after `draft-youtube`) writes + the two files itself, no build needed, also when the draft is skipped. +- **umtool:** `SocialPostSection.tsx` on the Media tab after the YouTube section (each platform's posts, their counted + lengths in Meter — no verdict colour, "over the limit" in words — the file's age, "drafted by", **Copy**); `social` + in `MEDIA_SECTIONS`, `PROJECT_DRAFT_TASKS` and its draft row; `writeDraftedField` takes `publish.x` / + `publish.bluesky` ("Use this"); the drafts review labels them. +- Test kit: `draft/runs/social.json` (the X post's first answer refused — first person, a link, a hashtag — and + re-asked; the Bluesky post kept at once; no link: the kit's article is not public). + +| Commit | What | +| --- | --- | +| `b3e05faf` | common, umtool, mcp: `social.mjs`, the fields and `validatePublish`, `tasks/social.ts`, the wiring, `report-to-video/social.mjs`, build-video's writer, `draft-social`, `SocialPostSection`, the kit's run, docs; tests: common `social.test.ts` (7), `drafted.test.ts` (+1), `generationSettings.test.ts` (one test widened); umtool `social.test.mjs` (2), `chain-draft.test.mjs` (+1), `drafted-writer.test.mjs` (+1), `chain.test.mjs`/`create.test.mjs` lists; mcp `generation.test.ts` lists | +| `b3e05faf` (cont.) | umtool e2e: `media-draft.spec.ts` "social" (the real task over the kit's run on mdraft i4, the Media tab's posts and counts); `media-surfaces.spec.ts` the draft-all chain's 16 steps with `out/x.txt` and `out/bluesky.txt`; the stub's canned social, `social` run for real on mdraft | +| `4979ee0e` | umtool e2e: eight draft sections; the Bluesky post's count read on its first post | + +### D1, as shipped (2026-10-15, lane C, `r29/gen-debts`) + +- **relocateDir:** `CopyDifferences` gains `mtimeOnly`; `classifyDrift` puts a `.d..t` line (`DIR_MTIME_ONLY`) there, + not in `changed`; `describeDifferences` appends ", and N directories differ only in mtime (…)"; a reconcile whose + only drift is that says "the destination copy's content already matches the source; N directories differ only in + mtime (…), which the mirror pass settles". The verify's own `.d..t` rule is unchanged. +- **fetchPosts.test:** the fake's paged mode is stepped by files (`FAKE_GATES`: a page's cursor waits for + `cursor-<p>`, the next page for `page-<p+1>`), so the drain lands between page 1's records and its cursor whatever + the load; the resume run is cancelled once the fake's argv is in its log, not after 200 ms. +- **queue-lock.test:** every fixed hold a test's assertion depended on is a gate (`gateCmd`) opened once the waiter + has printed its banner (or, for the pass-through cases, once the nested run has finished while the lock is still + held — no stopwatch): the banner, `QUEUE_LOCK_HELD`, `E2E_QUEUE=0`, the SIGKILL (until `holder.json`, not 500 ms), + two heavy contenders, an e2e run behind a heavy one, two builds, the undeclared job, the nested build, named suites, + the SIGTERM waiter, `--scale-by`; the FIFO test's first hold too. +- **`generate`'s answer** (`renderIterationSummary`): for a media draft the `Video project:` line comes second, under + the header; any other task's stays under the iteration's files. +- **The editor flakes were product races, fixed in the app as R6.3 fixed Settings' save** (aaba3723): + - `site-scope.spec` (Back on `about:blank`): the active-site cookie was set in a server action, which Next answers + before its router applies the re-render the action carries; the picker's `router.push` in that gap discards the + pending action, which is replayed as a refresh after the push, and React committing the two together writes the + push's history entry as a REPLACE (Next 16's `HistoryUpdater`). The cookie is now written by **`POST + /api/active-site`** (same-origin JSON; `setActiveSiteAction` and `lib/activeSiteActions.ts` are gone), and the + provider refreshes after a write unless the caller navigates (`choose(value, {navigating})`). The same runs also + showed two other site-scope reds, both fixed: a re-scope waiting seconds on the action's re-render under load + (gone with the action), and the spec's `hydrated` (React's props on the select) coming before the provider's + BroadcastChannel subscription — it now waits on the picker's `data-hydrated`, stamped by a re-render after every + first-commit effect. + - `storage-locations.spec:723` (the timing's "Saved." late): `saveHealthTimingsAction` no longer revalidates + `/storage`; `HealthTimingForm` refreshes after an ok answer. The same spec's `:661` (any-age eviction) asserted a + transient "still disabled" right after Preview, which a preview answering at once on the small fixture raced (2 of + 5 under load): a MutationObserver in the page now records whether the button was armed before the answer. + - `publish-lane.spec:78`: the spec waits on the lane's held state (`publishStatus`), then reloads, before reading + the pause/resume button (the shared `LaneActionButton` and its lane actions are unchanged). + +| Commit | What | +| --- | --- | +| `315e8335` | common, mcp, scripts: relocateDir's `mtimeOnly` (`relocateDir.test.ts` +1, one case rewritten); `fetchPosts.test.ts`; `queue-lock.test.mjs`; `renderIterationSummary` (`generation.test.ts` +1) | +| `742da22c` | editor: `POST /api/active-site`, the provider and the picker; the timing action and form; `site-scope.spec.ts`'s `hydrated`; `publish-lane.spec.ts` | +| `d30248dc` | merge of `r29/integration` (`cfdeb856`: V1, E1, E2), clean | +| `800a26fc` | editor e2e: `storage-locations.spec.ts`'s any-age eviction watched in the page | +| (this commit) | these records, FACTS "Release 29 lane C", CHANGELOG | + +### Lane C gates (2026-10-15, `r29/gen-debts`) + +Counts at the branch's start (`3217bdfb`) → before the merge → after the merge of `r29/integration` (`d30248dc`): +- tsc (all packages): clean before every commit. +- common: 4193/4193 → 4205/4205 (+12: `deckOption.test.ts` 3, `social.test.ts` 7, `drafted.test.ts` +1, + `relocateDir.test.ts` +1) → 4235: 4234 pass, 1 failed — `ttsServer.test.ts` "a start that times out…", run beside + an editor e2e; 6/6 alone. +- mcp 370 → 371/371 (+1). editor unit 304 → 304 → 308/308 (the merge's). umtool unit 33/33. +- `test:scripts`: 1013 (1008 pass, 2 failed — `queue-lock.test.mjs` "an e2e run takes the heavy slot too" and "two + builds never overlap", the fixed holds — 3 skipped) → 1019 (1016 + 3 skipped, 0 failed) → 1020 (1017 + 3 skipped, + 0 failed). +- Flakes, 5 runs each, `fetchPosts.test.ts` and `queue-lock.test.mjs` run two at once: 8/8 and 37/37 every run. +- `docs env|files|cli --check`, `settings example --check`: clean (COMMANDS.md, SETTINGS.md regenerated in + `b3e05faf`; clean again after the merge). +- umtool e2e, two specs per run, foreground: `media-draft.spec.ts` + `media-surfaces.spec.ts` 4/7 (the deck refused on + a 640×360 cut, a Bluesky count's locator, seven sections → eight), then 7/7 (1.5 min), and 7/7 after the merge + (1.4 min). +- Editor e2e, one spec per run with `--repeat-each=5`, foreground (each run's prebuild a capped `next build` through + the heavy slot): `site-scope.spec.ts` 64/65 (the other-tab broadcast), 64/65 (a re-scope over 5 s), then with the + route 65/65 (2.0 min); after the merge `publish-lane.spec.ts` 10/10 (58.5 s); `storage-locations.spec.ts` 43/45 + (`:661` twice) then 45/45 (2.2 min). +- umtool capped build, the corpus linked, through the heavy slot (5 GB): ok, 49 s wall; the link removed. + +Found and left: +- The minimal deck refuses a small frame (G1, above). Draft everything on such a cut records the deck step failed. +- A social post's link is resolved when it is drafted: a `publish.videoUrl` set later is in the posts only after a + forced re-draft or an edit (the field shows its link, so the operator sees which). +- `LaneActionButton`'s lane actions still revalidate (`/jobs`, `/workers`, the lane's page), so their buttons can + re-render late under load as the timing's did; the publish-lane spec now waits on the lane's state instead. Not + changed here: the button is shared by every lane. + ## Not in this release Auto-posting to X/Bluesky/YouTube (text only); any umtool restructuring; the "en track → 0 cues" bug (closed in r20).