commit c4108062bba32985377a0db1511daaa3a8393856
parent fcef7b97140f9823dad492bebc0f9f3784f01d37
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sat, 10 Oct 2026 15:40:11 -0400
plans: release 24 Lane A — H1–H4 as shipped, the gates; the editor changelog
H1 departed-channel tombstones (the last bundle is the record), H2 temp-dir
test robustness, H3 provenance kept over a rewrite (the history is the
mark); H4 needed no change — release 19 B5 fixed mix.spec's order
dependence, verified in both orders.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 111 insertions(+), 0 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,8 @@
# Changelog
## [Unreleased]
+- **A channel taken off a site, or moved to its cited scope, is withdrawn at the edge.** The next build of the site replaces every `transcripts/`, `subs/`, `posts/` and `digests/` path its last build served for that channel with an empty file of the same shape, served no-store (the way withheld X posts already are), and keeps doing so while the channel stays out. The channel's cited moments and clips still publish. A site's deploy now reads its withdrawn paths back in its live check, as the hub's does.
+- **Persisting a Wayback or archive.org record no longer undoes its title and date.** A re-download that rewrites `metadata.info.json` keeps the title, upload date and other fields `archilyzer wayback refresh --titles`, `archive-org refresh` or the feed backfill set, when the source only has its placeholder for them; a value the source genuinely changed still lands. A record a persist already reverted gets them back on its next download.
- **A site's reports can cite a channel the site does not publish.** A channel row outside the site's pool on the site form now has a **Cited only** box (`citedChannels` in site.json — see SITE.md); `/sites` shows "· N cited" beside the channel count. A report on that site may cite the channel: its moment pages and their clips publish, but not its browse page, transcripts, search entry or corpus.json entry, and its moments link no corpus page. A channel in the pool is never cited-only: ticking **Include** clears the box. A citation of a channel in neither list is still refused at compose (`not-in-site`), and the refusal now names both keys. A build or deploy whose bundle holds a cited-only channel's transcripts, subs, posts, digests, stats or archives, or lists it in corpus.json or site.json, is refused; a change to its transcripts or posts makes the site stale. Renaming a channel renames it in `citedChannels` too, and `pnpm ops get sites` lists the key. A site padding its pool with a channel only to cite it can move the channel to **Cited only**. Needs a restart of the editor for the form; rebuild each site that uses it.
- **"Clear failure list" keeps its log on screen.** On a channel's Transcribe stage, clearing the failed-transcriptions list hid the controls the moment the list emptied, its output ("Cleared N entries") with them. They now stay until the page is reloaded, the button disabled at (0).
- **archive.org imports take many items, or a search.** `pnpm ops import-archive-org` now takes `"items"` (identifiers, or `{item, files | match}`) or `"query"` (an archive.org search, its first `"limit"` items) as one job, paced between files and between items. Records already held — on disk or in the saved-video store — are skipped; a dry run lists every file as held, RESTRICTED (archive.org will not hand it out) or would-get; three items in a row refused by archive.org stop the job and back the platform off.
diff --git a/plans/release-24.md b/plans/release-24.md
@@ -26,3 +26,112 @@ worker, same results), then S5's per-worker servers if time allows. Record: `e2e
- Prune merged worktrees and branches (ruled 2026-10-10): the merged `r18-*` and `r20-*` worktrees; `r20/twitch-ids`
is kept.
- The source verify no longer probes the retired `source.archilyzer.pages.dev` alias (a script outside the repo).
+
+## Record
+
+Lane A (`r24/hygiene` off `r24/integration` `72c44159`), H1 → H4, tsc clean per commit. Every fixture is synthetic;
+nothing read the corpus.
+
+### H1, as shipped — tombstones for a channel that leaves a site's scope
+
+**What the site published before is its last bundle**, `<exportBuildsDir>/<siteId>/out`
+(`tombstones.ts` `lastBundleDir`), read by compose before the build replaces it, and only when its `site.json` names the
+site. Ruling: the bundle is the one record of the exact paths and page counts a deploy of that build shipped. No stamp
+lists them: `built.json` and `deployed.json` carry ids, counts and live checks, the compose cache only signatures of
+member trees, and `public/` is shared by every site's compose.
+
+- **Site** (`compose-site.ts`, after the X tombstones): `servedChannelTrees` lists every `transcripts/`, `subs/`,
+ `posts/` and `digests/<slug>/` the bundle served. `writeDepartedTombstones` writes a tombstone path for path for
+ each tree this compose does not ship: the tree's manifest at `pageCount: 0` (`tombstoneTreeManifest`: no size, no
+ `slugToPage`, `tracks: []` on subs, no `pageHashes`) and `[]` for each page the bundle held. A tree `public/` holds
+ (a member's, or an X tombstone) is left alone. The trees are served no-store (`tombstoneNoStoreForSite(x,
+ departed)`; `/posts/manifest.json` only when a posts tree is a tombstone). An empty site posts manifest is written as
+ for X tombstones. **Carried:** a bundle's tombstones are served paths, so they are written again while the channel
+ stays out. A channel back in the pool gets its real trees, and a tree it has none of stays a tombstone. A cited-only
+ channel's `m/` and `media/` are not touched.
+- **Hub** (`compose-hub.ts`): the hub's channel paths are its tombstones (`builtHubProblem` allows nothing else). Its
+ last bundle's posts tombstones are carried while the release 18 rule allows naming the channel
+ (`hubNameableChannels`: a non-private site's pool; `withdrawnXChannels` now uses it). A channel moved to a cited
+ scope, kept only by private sites, or on no site is never named, carried or not.
+- **Live check:** a site's deploy probes the trees its bundle's `_headers` declares withdrawn
+ (`tombstonedTreesInHeaders` → `deployStage.ts` `siteTombstoneProbes`, manifest + first page, plain and busted). The
+ bundle's own word: a real manifest-only tree reads like a tombstone on disk. This closes release 18's "a site's
+ live check does not probe its tombstones".
+- **Guard:** `builtCitedOnlyProblem` accepts a tombstone of any of the four trees (`isTombstoneChannelDir`, renamed
+ from `isTombstoneChannelPostsDir`; it now also refuses a non-empty `tracks` or `pageHashes`). The cited-only proving
+ test asks it over the tombstoned `public/` (clean) and over the last bundle (refused).
+- PUBLISH.md: "Tombstones for a channel that leaves a site".
+
+**Found and left.** A docker-runner build sees no last bundle in its container (`EXPORT_BUILDS_DIR` is the
+container's), so it writes no departed tombstones. A site switched to `search: false` (a cited site) composes no
+corpus and writes none either (`citedBuildProblem` refuses every corpus tree). Archive zips (`archives/`) and per-site
+aggregates (summaries, stats) are rewritten at the same paths and are not tombstoned. Departed tombstones never
+expire.
+
+### H2, as shipped — temp-dir test robustness
+
+`attachMedia` and `preparePlayable` take `deps.freeBytes` (default `getFreeBytes`, as `probeDuration`/`probe` are).
+Their fixtures hand in 1 TiB. One test each judges the 2 GiB margin with a fake: the exact stop sentence, nothing
+copied or remuxed, and the disk asked. `umtool/lib/articles/sources.test.mjs` compares through the `tildify` the code
+applies. Product behaviour unchanged.
+
+### H3, as shipped — persist-videos keeps provenance
+
+**The mark is the history.** Nothing in `metadata.info.json` marks a provenance-applied field. Each
+`wayback-provenance`, `archiveorg-provenance` and `feed-backfill` entry in `metadata.history.json` names the key, the
+value written and the value replaced (`PROVENANCE_WRITERS`, the writers `refreshVideoMetadata.ts` already refuses
+over).
+
+- `withMetadataHistory` runs `keepProvenanceInFile` before it records the entry, after any writer that is not a
+ provenance writer: prefetch, audio-check, download-one, archiveorg-import, refresh, local-archive.
+- Rule (`keepProvenanceFields`, pure): a key a provenance entry set comes back at the newest provenance value when the
+ rewrite lacks it, or carries a value a provenance entry replaced. That is the capture's placeholder, or an earlier
+ find a later one superseded. Any other value is the source's and lands.
+- A restored title goes right after `id` (the 16 KB head reader). Anything else absent goes at the end (`upload_date`:
+ the 8 KB tail reader).
+- A record a pre-H3 prefetch already reverted heals on its next rewrite. The rewrite's own entry is still written,
+ net of the kept fields.
+- A value the history holds only as a digest (over 16 KB) is not restored.
+
+**Found and left.** The history keeps 200 entries: a record rewritten 200 times after its provenance entry loses the
+claim. The records already reverted on disk heal only when next re-downloaded; `archilyzer wayback refresh --titles`
+still mends them offline.
+
+### H4, as shipped — umtool `mix.spec` order dependence
+
+**Already fixed by release 19 B5 (`10042c2d`), verified here: no code change.** `mix.spec.ts` moves the fixture
+corpus's clip windows (`channels/*/data/*/clips/`) aside in `beforeAll` and puts them back in `afterAll`. A run killed
+part-way is restored at the next start. The memory this slice was raised from predates B5's merge, and no full umtool
+run since B5 lists a `mix.spec` red (release 19's full run: all 12 passed; the overnight 2026-10-10 rounds: 14 reds,
+none of them mix).
+
+**How the config orders files:** `workers: 1`, `fullyParallel: false`. Files run in path order whatever order the CLI
+names them, so `clip-bench` always runs before `mix` in a run that holds both, as in the full suite. The reverse order
+was forced with an untracked copy of `mix.spec.ts` that sorts first (`a-mix-first.spec.ts`), deleted after the run.
+After the first run `testchan/vid1/clips/0.00-14.00.mp4`, clip-bench's editor-stub window, was back on disk: mix had
+set it aside and restored it.
+
+### Commits
+
+| Commit | What |
+|---|---|
+| `2fbb5fdc` | `common:` H1 — departed-channel tombstones on the site and the hub, the site live check's tombstone probes, `isTombstoneChannelDir`; PUBLISH.md |
+| `60cea572` | `common, umtool:` H2 — `deps.freeBytes` in attachMedia/preparePlayable and their tests; `sources.test.mjs` through `tildify` |
+| `198d4a8f` | `common:` H3 — `keepProvenanceFields` / `keepProvenanceInFile` in the history wrap |
+| — | H4: no commit (release 19 B5 `10042c2d` fixed it; verified above) |
+| this commit | `plans:` this record; `editor/CHANGELOG.md` (two bullets at the start of `[Unreleased]`) |
+
+### Gates
+
+| Gate | Result |
+| --- | --- |
+| tsc (`pnpm -r … tsc --noEmit`), each code commit | clean ×3 (this commit is docs only) |
+| H1 touched files | `compose-site.departed.test.ts` (new) 3/3; `tombstones.test.ts` 9/9 (+5); `compose-hub.test.ts` 8/8 (+1); `deployStage.test.ts` 16/16 (+1); `builtExport.test.ts` 22/22 (extended); compose-site + postsVisibility + composeReports + headers + liveCheck + build + lib/postsVisibility 68/68 |
+| H2 | `attachMedia.test.ts` 12/12 (+1) and `preparePlayable.test.ts` 6/6 (+1) with `/tmp` as is (tmpfs, 1.7 GB free; 8 + 2 failed before) and again 18/18 with `TMPDIR=$T/tmpdir` under `$HOME`; `sources.test.mjs` 2/2 both ways (1 failed before under `$HOME`) |
+| H3 | `metadataHistory-server.test.ts` 12/12 (+4: a Wayback prefetch, a reverted record healing, an archive.org re-import, superseded finds and no provenance); `metadataHistory.test.ts` 15/15 (+2); `forceMedia.test.ts` 9/9 (+1: a persist prefetch through `downloadOneManaged` with a fake yt-dlp); archive.org, feed, refresh, wayback, downloadOneManaged and persist tests 84/84 |
+| common, whole (after H3) | 3721 tests: 3720 pass, 1 fail — `relocateChannelMedia.test.ts` "reconcile: an extra and a changed file…" reported `./` as changed too (a directory-mtime timing flake; the file alone 44/44 twice; not touched by this lane). The two environmental files release 23 recorded (attachMedia 8, preparePlayable 2) pass |
+| `test:scripts` | 774: 771 pass, 3 skipped |
+| export unit | 118/118 |
+| umtool e2e `clip-bench.spec.ts mix.spec.ts` (`E2E_MODE=dev`) | 62 passed, 2.7 min (clip-bench first) |
+| umtool e2e, mix first (`a-mix-first.spec.ts` + `clip-bench.spec.ts`) | 62 passed, 2.4 min |
+| counts-only privacy greps over `72c44159..` (home paths, the operator's names and email, session links and trailers) | 0 each |