Archilyzer · Source

archilyzer

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

commit b5e33d680f2684753ba1d1b3afb7ae98216027f7
parent a90e3e9bab5b3d885627cb93d83d887e49d9cbfb
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon, 26 Oct 2026 00:39:50 -0400

Forum walk: an unfinished catch-up's owed page does not unmark a complete history (deriveForumWalk)

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

Diffstat:
Mcommon/lib/forumWalk.test.ts | 16++++++++++++++++
Mcommon/lib/forumWalk.ts | 19++++++++++++++++++-
Meditor/CHANGELOG.md | 1+
3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/common/lib/forumWalk.test.ts b/common/lib/forumWalk.test.ts @@ -94,3 +94,19 @@ test("retry on a block: bounds, parsing, words", () => { assert.equal(describeRetryOnBlock({ minutes: 30, max: 12 }), "wait 30 min after a block, up to 12 tries"); assert.equal(describeRetryOnBlock(undefined), "off"); }); + +test("an interrupted catch-up's own gap does not unmark a complete history", () => { + // 2026-10-26: complete through page 987, a catch-up read 1090 down to 988 and was cut off with page 987's newer + // half still owed (its older posts held under a page number that has since drifted to 986). + const pages = [...Array.from({ length: 986 }, (_, i) => i + 1), ...Array.from({ length: 103 }, (_, i) => 988 + i)]; + const stored = { newestPage: 1090, oldestPageReached: 1, newestPostId: "25880529", complete: true, catchUpPage: 987 }; + const { walk, notes } = deriveForumWalk(stored, undefined, pages); + assert.equal(walk.complete, true); + assert.equal(walk.historyPage, undefined); + assert.equal(walk.catchUpPage, 987, "the catch-up still owes its page"); + assert.deepEqual(notes, []); + // Without an unfinished catch-up the same gap is the history's, as before. + const { walk: w2 } = deriveForumWalk({ ...stored, catchUpPage: undefined }, undefined, pages); + assert.equal(w2.complete, false); + assert.equal(w2.historyPage, 989); +}); diff --git a/common/lib/forumWalk.ts b/common/lib/forumWalk.ts @@ -85,8 +85,25 @@ export function deriveForumWalk( notes.push(`Read the old single resume point (page ${n}) as the history position.`); } } - const band = heldBand(heldPages); + const held = [...heldPages]; + const band = heldBand(held); if (!band) return { walk, notes }; + // An unfinished catch-up owes the pages from `catchUpPage` down to the mark, + // so the gap under the band it read is ITS gap, not the history's: the + // history is judged by the pages at or below its resume point. (2026-10-26: + // a restart cut a catch-up at page 988 of a complete thread whose page 987 + // was still owed; the next run unmarked the history and re-read 150 held + // pages before it was stopped.) + const owed = walk.catchUpPage; + if (walk.complete && owed !== undefined && band.low > 1) { + const below = heldBand(held.filter((p) => p <= owed)); + if (below && below.low <= 1) { + walk.oldestPageReached = 1; + walk.newestPage = Math.max(walk.newestPage ?? band.high, band.high); + delete walk.historyPage; + return { walk, notes }; + } + } walk.oldestPageReached = Math.min(walk.oldestPageReached ?? band.low, band.low); walk.newestPage = Math.max(walk.newestPage ?? band.high, band.high); if (band.low <= 1) { diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **An interrupted catch-up no longer sends a finished forum thread back through its whole history.** When an editor restart cut a thread's catch-up short, the next run saw the page the catch-up still owed as a hole in the history, marked the history unfinished and re-read every held page below it (on 2026-10-26 it re-read 150 pages of the Ethan Klein thread before it was stopped; left alone, every sync would have gone on doing it). The page an unfinished catch-up owes is now its own, and the history stays complete. Needs a restart of the editor. - **A take of part of a cut (`--at`) now shows the clips its own changes add.** The window is timed against the project's cut so every take of a group covers the same clips, and a clip only the take adds (a montage line, an extra beat) was never in it: the Huck cut's pitch-count take rendered seven of its eight pitches. A clip the take adds right after one the window covers now renders with it. Needs a restart of umtool for takes made from the app (the `umtool take` command has it now). - **An assistant can now change a report video's timeline, find a clip's scene cuts, and add a post from the archive, all from the command line.** `umtool timeline <project>` lists the cut (index, id, type, video, start–end, date and title) and does what the Cut tab's timeline does: `insert --after <id> <channel>/<video>@<start>-<end>` with `--title`, `--date`, `--quote` and `--cite`, `move <id> --to <index>`, `remove`, `duplicate`, `post`, `post-remove`, `teaser` and `undo`. It goes through the same writers as the page, so each change saves an undo point first, is refused when the build would refuse it, and leaves an edit note on a generated manifest. A bad `--date` is refused before anything is written. `umtool scenes <project> <clip>` prints where the picture cuts and where it goes black in the clip's fetched window, in the recording's own seconds, for setting a blur's from and to or a trim: the Huck dog clip is black 250.49–251.09 and cuts at 251.09. It fetches nothing. `umtool posts add <project> <channel>/<postId>` makes a post card from the posts archive (its words, date, link, handle and screenshot, with `--attach <clip>` and `--flag`) and copies the capture into the project's `posts-media/`. A post with no screenshot is refused, and the message names the `pnpm ops capture-posts` to run first. - **A download filter's `^` and `$` now anchor to the video's title.** A filter pattern was only ever matched against the title and the description joined together, where `$` means the end of the description, so a pattern that names exact titles (`^ROOSTER(123|456)$`) could never match: the h3-podcast-audio-feed channel's filter selected nothing for two days. Include and exclude now match when the pattern matches the title alone or the title and description together, as before. A pattern with no `$` at its end behaves exactly as it did. The channel's Playlist stage, the download lane, Download missing and `pnpm ops keep-videos` all use the same rule, and the Configure form's hints say so. Needs a restart of the editor.