Archilyzer · Source

archilyzer

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

commit f3e526cea82af7a266f51c5bf101ff39086cc489
parent 7ab65b91685f0e64dd37f03b78242c87ac768833
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed,  4 Nov 2026 13:51:01 -0500

umtool: `take --from` reuses a post item's segment whose key matches -- its record (.post.json) and its combo badge's (.combo.json) are linked with it (SEGMENT_FILE_SUFFIXES), the build no longer unlinks a post's linked files before its key check, and a rebuilt post writes its record and its combo record through a rename (never through another take's link); before, every post segment was rebuilt under --from

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

Diffstat:
Mumtool/report-to-video/build-video.mjs | 6++++--
Mumtool/report-to-video/post-combo-render.mjs | 4+++-
Mumtool/report-to-video/post-render.mjs | 4+++-
3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/umtool/report-to-video/build-video.mjs b/umtool/report-to-video/build-video.mjs @@ -2484,7 +2484,7 @@ async function buildMontageWall({ M, entries, render, outDir, timeline, provenan * started `--from` another keeps the intro's file, and the crossfade batch * over it, instead of copying the intro in again). */ -export const SEGMENT_FILE_SUFFIXES = Object.freeze([".mp4", ".cut.json", ".teaser.json", ".narration.json", ".intro.json", ".quote.txt", ".attrib.txt", ".channel.txt"]); +export const SEGMENT_FILE_SUFFIXES = Object.freeze([".mp4", ".cut.json", ".teaser.json", ".narration.json", ".intro.json", ".quote.txt", ".attrib.txt", ".channel.txt", ".post.json", ".combo.json"]); /** * Before an entry's segment is rebuilt: each of its files in `segDir` that is @@ -6412,7 +6412,9 @@ export async function buildVideo({ manifestPath, opts = {}, out, only, fetchOnly render, encode: encodeArgs(render), outDir, manifestDir, workers: CHROME_WORKERS, emit: (ev, f) => EMIT(ev, f), }); } - if (entry.type !== "teaser" && entry.type !== "clip") { + // A post item (post-render.mjs) keeps a segment `--from` linked in when its key matches (its record, `.post.json`, + // linked beside it) and writes every file of its own through a rename -- never through the link -- when it does not. + if (entry.type !== "teaser" && entry.type !== "clip" && entry.type !== "post") { await detachSegmentFiles(path.join(outDir, "segments"), entry.id); } if (entry.type === "card") { diff --git a/umtool/report-to-video/post-combo-render.mjs b/umtool/report-to-video/post-combo-render.mjs @@ -200,7 +200,9 @@ export async function applyPostCombo(seg, entry, { combo, render, outDir, box, e } await rename(tmp, seg); const out = sigOf(await stat(seg)); - await writeFile(/* turbopackIgnore: true */ record, JSON.stringify({ version: 1, id: entry.id, key, out, count: combo.count, at: cp.at, media: combo.media, region: cp.place.region, sfx: sfx ? combo.knobs.sfx : "off" }, null, 2) + "\n", "utf8"); + // Through a rename: a record `--from` linked in (another take's) is replaced, never written through. + await writeFile(/* turbopackIgnore: true */ `${record}.tmp`, JSON.stringify({ version: 1, id: entry.id, key, out, count: combo.count, at: cp.at, media: combo.media, region: cp.place.region, sfx: sfx ? combo.knobs.sfx : "off" }, null, 2) + "\n", "utf8"); + await rename(`${record}.tmp`, record); emit("note", { message: `${entry.id}: combo ×${combo.count} at ${cp.at.toFixed(2)} s${sfx ? ` (sfx ${combo.knobs.sfx})` : ""}` }); return seg; } diff --git a/umtool/report-to-video/post-render.mjs b/umtool/report-to-video/post-render.mjs @@ -800,7 +800,9 @@ export async function buildPostSegment(entry, { render, outDir, manifestDir, box await rename(tmp, seg); // The follow frames are in the segment now: a rebuild shoots them again (they are many, and the key decides). if (cards.follow) await rm(path.dirname(cards.follow.list), { recursive: true, force: true }); - await writeFile(record, JSON.stringify({ version: 1, id: entry.id, key, layout: layout.mode, total: plan.total, steps: plan.steps.length, ...(zooms.length ? { zooms: zooms.map((z) => ({ i: z.i, at: z.t, source: z.source, span: z.span, region: z.region, word: z.word })) } : {}), ...(narration ? { narration: { take: take.file, ...plan.narration, gainDb: narration.gainDb, measured: narration.lufs, ...(bleeps ? { slurs: { mode: bleeps.mode, spans: bleeps.spans } } : {}) } } : {}), ...(cards.follow ? { follow: { blocks: plan.follow.blocks.length, shots: cards.follow.shots, frames: cards.follow.frames, pan: cards.follow.path.segments.length, max: cards.follow.path.max } } : {}) }, null, 2) + "\n", "utf8"); + // Through a rename: a record `--from` linked in (another take's) is replaced, never written through. + await writeFile(`${record}.tmp`, JSON.stringify({ version: 1, id: entry.id, key, layout: layout.mode, total: plan.total, steps: plan.steps.length, ...(zooms.length ? { zooms: zooms.map((z) => ({ i: z.i, at: z.t, source: z.source, span: z.span, region: z.region, word: z.word })) } : {}), ...(narration ? { narration: { take: take.file, ...plan.narration, gainDb: narration.gainDb, measured: narration.lufs, ...(bleeps ? { slurs: { mode: bleeps.mode, spans: bleeps.spans } } : {}) } } : {}), ...(cards.follow ? { follow: { blocks: plan.follow.blocks.length, shots: cards.follow.shots, frames: cards.follow.frames, pan: cards.follow.path.segments.length, max: cards.follow.path.max } } : {}) }, null, 2) + "\n", "utf8"); + await rename(`${record}.tmp`, record); emit("note", { message: narration ? `${entry.id}: post item ${plan.total.toFixed(1)} s, narrated (${take.file}: ${plan.narration.seconds.toFixed(1)} s from ${plan.narration.at} s, muffled to ${plan.narration.voiceEnd.toFixed(1)} s)`