Archilyzer · Source

archilyzer

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

commit 8be7e46cebf8fe71a9f44dcfc5d46f3dc1c47fb3
parent fca07eb3a4f6cfd25d5f1ac2617a7b362c402635
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 28 Oct 2026 23:32:15 -0400

umtool: frame-keys test -- the deck page's items through compose-chrome capture only a changed clip's frames

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

Diffstat:
Mumtool/report-to-video/frame-keys.test.mjs | 35+++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+), 0 deletions(-)

diff --git a/umtool/report-to-video/frame-keys.test.mjs b/umtool/report-to-video/frame-keys.test.mjs @@ -371,3 +371,38 @@ test("feed items: a changed or added post changes only the frames from its event const firstC = A.k.findIndex((k, f) => k !== C.k[f]); assert.ok(firstC >= Math.floor(zIn * 30), `nothing before z's event changes (first at ${firstC}, z at ${zIn * 30})`); }); + +test("compose-chrome with the deck's items: a changed title captures only the frames its clip shows", async () => { + const dir = mkdtempSync(path.join(tmpdir(), "frame-items-")); + const env = process.env.HYPERFRAMES_BIN; + try { + const stub = path.join(dir, "hf-stub.mjs"); + writeFileSync(stub, STUB); + chmodSync(stub, 0o755); + process.env.HYPERFRAMES_BIN = stub; + const font = path.join(dir, "face.ttf"); + writeFileSync(font, "face"); + const render = { ...RENDER, fontRegular: font, fontBold: font }; + const mp = path.join(dir, "video.manifest.json"); + writeFileSync(mp, JSON.stringify({ slug: "f", render, timeline: [] })); + const out = path.join(dir, "out", "sourced"); + mkdirSync(out, { recursive: true }); + const { composeChrome, FRAME_KEYS_FILE } = await import("./compose-chrome.mjs"); + writeFileSync(path.join(out, "schedule.json"), JSON.stringify(schedule(0))); + const first = await composeChrome({ manifestPath: mp, region: "deck", doRender: true, fps: 30 }); + assert.equal(first.frameCount, 1200); + const keys0 = readFileSync(path.join(first.frames, FRAME_KEYS_FILE), "utf8").trim().split("\n"); + writeFileSync(path.join(out, "schedule.json"), JSON.stringify(schedule(0, { c02: "Another sanctuary" }))); + const second = await composeChrome({ manifestPath: mp, region: "deck", doRender: true, fps: 30 }); + const keys1 = readFileSync(path.join(second.frames, FRAME_KEYS_FILE), "utf8").trim().split("\n"); + const changed = keys1.filter((k, i) => k !== keys0[i]).length; + // c02 is on screen ~14-22 s of a 40 s cut: about a fifth of the frames, never all. + assert.ok(changed > 0 && changed < 300, `${changed} frames changed`); + assert.ok(second.reused >= 1200 - changed, `${second.reused} reused`); + assert.ok(second.captured <= changed, `${second.captured} captured`); + } finally { + if (env === undefined) delete process.env.HYPERFRAMES_BIN; + else process.env.HYPERFRAMES_BIN = env; + rmSync(dir, { recursive: true, force: true }); + } +});