Archilyzer · Source

archilyzer

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

commit 75783ecfe2d3a7e1256d413b227ffffa091922cc
parent 891551e1ddffc6829a780f5cfa2feaad1f00248f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 13 Nov 2026 22:16:11 -0500

review B1: a still's corner code reads its own corner -- the image segment no longer names the clip's

buildImageSegment drew its code with cornerOverlayXY(cornerQr.corner, ...), a name that
exists only in buildClipSegment: every cut with no deck, no rail and the QR on crashed
on a still with a citeUrl (ReferenceError). It reads cornerQrOf(entry, render) -- bottom
right when the cut names no corner, the overlay as it always was. A render test builds a
cut of a clip, a still with a citeUrl, a title card and a video entry with the QR on
(default and top left) and off, and finds the still's code at its corner. The touched
modules were scanned for undefined names (tsc --checkJs): none.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mumtool/report-to-video/build-video.mjs | 4+++-
Mumtool/report-to-video/clip-kit-render.test.mjs | 34++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/umtool/report-to-video/build-video.mjs b/umtool/report-to-video/build-video.mjs @@ -3444,6 +3444,8 @@ async function buildImageSegment(entry, render, outDir, chrome, provenance, base ? null : await qrForEntry(entry, provenance, render, outDir); const qrM = render.qr?.margin ?? 28; + // A still's code stands in the cut's corner (render.qr.corner, clip-kit.mjs): bottom right when it names none. + const stillCorner = cornerQrOf(entry, render)?.corner ?? "br"; const secs = dur.toFixed(3); // Inputs: one per picture, then the silence, then the code. @@ -3460,7 +3462,7 @@ async function buildImageSegment(entry, render, outDir, chrome, provenance, base } parts.push( qr - ? `[${q}][${qrIdx}:v]overlay=${cornerOverlayXY(cornerQr.corner, { VW, FH, HH, m: qrM })}[v]` + ? `[${q}][${qrIdx}:v]overlay=${cornerOverlayXY(stillCorner, { VW, FH, HH, m: qrM })}[v]` : `[${q}]null[v]`, ); diff --git a/umtool/report-to-video/clip-kit-render.test.mjs b/umtool/report-to-video/clip-kit-render.test.mjs @@ -247,3 +247,37 @@ test("a zoom: the framed short's picture pushed in on its focus for its span, ea await rm(p.root, { recursive: true, force: true }); } }); + +// ---- the corner code in every entry type a cut with no deck draws (review B1) --------------------------------------- +test("a cut with no deck, the QR on and off: a clip, a still with a citeUrl, a title card and a video entry all build; the codes where they always were", { skip: !have && "needs ffmpeg and qrencode" }, async () => { + quiet(); + for (const qr of [{ scale: 4 }, false, { corner: "tl" }]) { + const p = await project({ render: { width: 640, height: 360, headerHeight: 0, qr } }); + try { + mkdirSync(path.join(p.root, "stills"), { recursive: true }); + const still = path.join(p.root, "stills", "one.png"); + const vid = path.join(p.root, "stills", "v.mp4"); + assert.equal(spawnSync("ffmpeg", ["-v", "error", "-y", "-f", "lavfi", "-i", "color=c=gray:s=640x360:d=1", "-frames:v", "1", still]).status, 0); + assert.equal(spawnSync("ffmpeg", ["-v", "error", "-y", "-f", "lavfi", "-i", `color=c=gray:s=640x360:r=${FPS}:d=2`, "-f", "lavfi", "-i", "sine=frequency=330:sample_rate=48000:duration=2", "-c:v", "libx264", "-preset", "ultrafast", "-c:a", "aac", "-shortest", vid]).status, 0); + const m = JSON.parse(await readFile(p.manifestPath, "utf8")); + m.timeline.push( + { type: "image", id: "i1", src: "stills/one.png", seconds: 1.5, citeUrl: "https://example.test/still/1" }, + { type: "card", id: "k1", style: "title", heading: "A heading", seconds: 2 }, + { type: "video", id: "v1", src: "stills/v.mp4" }, + ); + await writeFile(p.manifestPath, JSON.stringify(m)); + const r = await buildVideo({ manifestPath: p.manifestPath, opts: { noNetwork: true } }); + assert.ok(r.out, `built (qr ${JSON.stringify(qr)})`); + const segs = path.join(p.root, "out", "sourced", "segments"); + if (qr === false) continue; + // The still's code: bottom right (as it always was), or the cut's corner. + const size = 64; + const at = qr.corner === "tl" ? { x: 28 + 4, y: 28 + 4 } : { x: 640 - 28 - size + 8, y: 360 - 28 - size + 8 }; + const box = { ...at, w: 24, h: 24 }; + const inStill = range(path.join(segs, "i1.mp4"), box, 0.5); + assert.ok(inStill.max > 215 || inStill.min < 40, `the still's code is drawn at its corner (qr ${JSON.stringify(qr)}: ${JSON.stringify(inStill)})`); + } finally { + await rm(p.root, { recursive: true, force: true }); + } + } +});