Archilyzer · Source

archilyzer

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

commit 480a6cd14989bcf33c209819bb220b3e8cb0f2ca
parent d030ae48b0c3c40f832d5063e36420b6c57fe49c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 25 Oct 2026 22:34:16 -0400

Takes: a windowed take keeps the clips its patch adds right after a covered clip (withPatchEntries)

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

Diffstat:
Meditor/CHANGELOG.md | 1+
Mumtool/lib/report/takeMaker.mjs | 31++++++++++++++++++++++++++++++-
Mumtool/lib/report/takeMaker.test.mjs | 12++++++++++++
3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **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 tall post screenshot in the posts feed grows into the room the column has, instead of shrinking to a thumbnail.** A screenshot was capped at the height of a card of words and drawn smaller to fit it, so a post with a picture (the Huck video's "Hucks home!!!!!! God Is Good!!!") came out a narrow strip beside empty space. Now a picture cut by that cap grows, up to its own full-width height, into the room left in the column beside the card under it — that card stays on screen; only cards further down scroll out as before. A post that fits, and a card of words, are drawn as they were. Needs a restart of umtool and a rebuild of the video. - **Every wait before the archive asks a site now varies a little, and only ever upward.** A job every 20.0 s, a page every 3.0 s or a sync at the same minute each day is a machine's beat, so each such wait is now stretched by up to a quarter of itself at random, and never shortened: every pacing number stays a minimum (Rumble's 120 s, X's 5 min, the sleep between downloads). It covers the gap between two downloads and between two jobs on one platform, yt-dlp's `--sleep-requests` and `--sleep-subtitles` (drawn once per yt-dlp run, and shown in its logged command line), the archive.org, Wayback and web-fetch gaps, the rate-limit cooldowns and the platform hold's probe, the download lane's metadata-scan batches (60 to 75 titles) and its rests, Save Page Now's and the Kick recorder's polls, and each channel's sync interval (later by at most 30 minutes, the same on every tick until it syncs, and shown so on /operations/sync). The share is **Jitter on every wait before a request** on /settings (`pacing.jitter`, default 25 %; 0 turns it off). Three waits that already varied could come out SHORTER than their minimum and no longer do: the platform cooldown (±10 %), archive.org's back-off (±20 %) and a forum's page pause (as little as 0.85 of it, under its own 5 s floor). It now lands between the pause and 1.8 times it. Four loops that asked a site with no gap at all now wait between requests: a Bluesky feed's pages (3–6 s), a Nitter timeline's pages (4 s and up), the availability check's per-video probes (3 s and up) and umtool's network clip fetches in a build with no editor (one at a time per platform, 30 s apart, Rumble 120 s). Needs a restart of the editor and of umtool. diff --git a/umtool/lib/report/takeMaker.mjs b/umtool/lib/report/takeMaker.mjs @@ -285,6 +285,35 @@ export function windowEntries(timeline, win, schedule = null) { } /** + * The window's ids with the entries a take's patch ADDS among them. The window + * is timed against the project's own timeline (windowEntries), which has never + * heard of a clip only the patch carries, so such a clip was never in a + * windowed take. One the patch puts right after a covered entry (or after + * another such added one) is kept, in the take's order; one beside nothing the + * window covers stays out, as it would for any clip outside the window. + * + * @param {Array<Record<string, any>>} takeTimeline + * @param {Array<Record<string, any>>} baseTimeline + * @param {string[]} ids + * @returns {string[]} + */ +export function withPatchEntries(takeTimeline, baseTimeline, ids) { + const inBase = new Set(sourcedEntries(baseTimeline).map((e) => e.id)); + const keep = new Set(ids); + const out = []; + let prevKept = false; + for (const e of sourcedEntries(takeTimeline)) { + const added = !inBase.has(e.id); + const kept = keep.has(e.id) || (added && prevKept); + if (kept) out.push(e.id); + prevKept = kept; + } + // Ids the take no longer holds are left for the caller's `present` check. + for (const id of ids) if (!out.includes(id)) out.push(id); + return out; +} + +/** * The manifest a window renders: `manifest` with only `ids` in its timeline * (the sourced ones), and everything that names a clip outside it dropped -- * the build refuses a reference to a clip its timeline does not hold: @@ -464,7 +493,7 @@ export async function makeTake(projectDir, rawSpec, opts = {}) { const schedule = await readJson(path.join(projectDir, "out", "sourced", "schedule.json")); covered = windowEntries(base.timeline, spec.window, schedule); const present = new Set(sourcedEntries(ruled.manifest.timeline).map((e) => e.id)); - const ids = covered.ids.filter((id) => present.has(id)); + const ids = withPatchEntries(ruled.manifest.timeline, base.timeline, covered.ids).filter((id) => present.has(id)); if (!ids.length) throw new Error(`${spec.id}: the patch or the clip rulings removed every entry the window covers (${covered.ids.join(", ")})`); renderDoc = windowManifest(ruled.manifest, ids); } diff --git a/umtool/lib/report/takeMaker.test.mjs b/umtool/lib/report/takeMaker.test.mjs @@ -27,6 +27,7 @@ import { uniqueTakeId, windowEntries, windowManifest, + withPatchEntries, } from "./takeMaker.mjs"; import { listTakes, readVerdicts, setTakeVerdict } from "./takes.mjs"; import { validateDeckClaims, validateDeckMarkers } from "umtool-report-to-video/deck"; @@ -538,3 +539,14 @@ test("windowManifest: markers and claim checks outside the window are dropped; a assert.equal(all.render.chrome.deck.claims.length, 4); assert.equal(all.render.chrome.deck.claims[2].steps.length, 2); }); + +test("withPatchEntries: a clip only the take's patch adds stays in the window beside the covered clip before it", () => { + const base = [{ id: "a" }, { id: "b" }, { id: "c" }, { id: "d" }]; + // The patch adds x after b (covered), y after x, z after d (not covered). + const take = [{ id: "a" }, { id: "b" }, { id: "x" }, { id: "y" }, { id: "c" }, { id: "d" }, { id: "z" }]; + assert.deepEqual(withPatchEntries(take, base, ["b", "c"]), ["b", "x", "y", "c"]); + // Nothing added: the window's ids as they were. + assert.deepEqual(withPatchEntries(base, base, ["b", "c"]), ["b", "c"]); + // An id the take dropped is passed on for the caller's present-check. + assert.deepEqual(withPatchEntries([{ id: "a" }, { id: "c" }], base, ["b", "c"]), ["c", "b"]); +});