commit 6ebbac1b3d523bb339f800e2daac487019e6af14
parent e3fb751a9ebeef671a8e75b1608c0b148152cbe3
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 10 Nov 2026 23:54:46 -0500
umtool: a basic-mode cut draws no QR, so it is never blocked for a missing origin -- qrsOf returns none for render.mode basic (the footage alone), so originQrsOf, deadOriginQrsOf and the Inbox's Blocking provenance.siteOrigin card skip it: a quick clip on a channel no public site carries raised "c01 (its corner QR)" for a code it never draws. A cut that draws a corner or deck QR from a missing origin is still blocked (operator ruling on E5 A6). Unit tests both ways (lint.test, lib/report/basic-origin.test); projects.spec's siteOrigin list holds a basic-mode copy of no-origin-fixture out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat:
5 files changed, 60 insertions(+), 1 deletion(-)
diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs
@@ -945,6 +945,16 @@ writeProject(
]),
);
+// The same cut in basic mode (a quick clip on a channel no public site carries): the footage alone draws no QR, so
+// its missing origin blocks nothing (projects.spec: not among the siteOrigin defects).
+{
+ const m = manifest("basic-no-origin-fixture", "Basic, No Origin", {}, [
+ { type: "clip", id: "c01", video: "vid1", start: 0, end: 3, cite: 0, section: 0, lock: true, quote: "q" },
+ ]);
+ m.render = { ...m.render, mode: "basic" };
+ writeProject("basic-no-origin-fixture", m);
+}
+
writeProject(
"localhost-fixture",
manifest("localhost-fixture", "Localhost Origin", { siteOrigin: "http://localhost:3000" }, [
diff --git a/umtool/e2e/projects.spec.ts b/umtool/e2e/projects.spec.ts
@@ -110,7 +110,9 @@ test("the two siteOrigin defects are BLOCKING, and nothing else is", async ({ re
// siteOrigin (19 QR codes reading `undefined/?v=…`) and one pointing at
// localhost (codes that resolve to nothing on a phone).
const origins = items.filter((d) => d.kind === "manifest-invalid" && d.target === "provenance.siteOrigin");
+ // (basic-no-origin-fixture is the same cut in basic mode: it draws no QR, so its missing origin is not a defect.)
expect(origins.map((d) => d.project).sort()).toEqual(["reports/localhost-fixture", "reports/no-origin-fixture"]);
+ expect(items.some((d) => d.project === "reports/basic-no-origin-fixture" && d.target === "provenance.siteOrigin")).toBe(false);
expect(origins.every((d) => d.severity === "blocking")).toBe(true);
expect(origins.find((d) => d.project === "reports/no-origin-fixture")?.why).toContain("undefined");
expect(origins.find((d) => d.project === "reports/localhost-fixture")?.why).toContain("localhost");
diff --git a/umtool/lib/report/basic-origin.test.mjs b/umtool/lib/report/basic-origin.test.mjs
@@ -0,0 +1,34 @@
+// THE INBOX'S BLOCKING siteOrigin CARD and a basic-mode cut (operator ruling, 11 Nov, E5 A6): a cut that draws a QR
+// built from a missing origin is blocked; the same cut in basic mode -- the footage alone, no QR (a quick clip on a
+// channel no public site carries) -- is not.
+//
+// Run with: node --test umtool/lib/report/basic-origin.test.mjs
+import assert from "node:assert/strict";
+import test from "node:test";
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import path from "node:path";
+import { deadOriginQrsOf, originDeadFor } from "../projects/report.mjs";
+
+const cut = (render) => ({
+ slug: "q",
+ provenance: { siteOrigin: "", channelSlug: "chan" },
+ render: { width: 1920, height: 1080, fps: 30, ...render },
+ timeline: [{ type: "clip", id: "c01", channel: "chan", video: "v1", start: 41, end: 45, cite: 41 }],
+});
+
+test("a missing origin: blocking for a cut whose corner QR it builds, never for a basic-mode cut (no QR drawn)", async () => {
+ const dir = mkdtempSync(path.join(tmpdir(), "basic-origin-"));
+ try {
+ const drawn = cut({});
+ const qrs = await deadOriginQrsOf(dir, drawn);
+ assert.deepEqual(qrs.map((q) => q.where), ["timeline c01 (its corner QR)"]);
+ assert.equal(originDeadFor(drawn, qrs), true);
+ const basic = cut({ mode: "basic" });
+ const none = await deadOriginQrsOf(dir, basic);
+ assert.deepEqual(none, []);
+ assert.equal(originDeadFor(basic, none), false);
+ } finally {
+ rmSync(dir, { recursive: true, force: true });
+ }
+});
diff --git a/umtool/report-to-video/lint.mjs b/umtool/report-to-video/lint.mjs
@@ -101,6 +101,7 @@ import { validateStatsEntries } from "./stats.mjs";
import { validateChatEntries } from "./chat.mjs";
import { validateMontage } from "./montage.mjs";
import { validateAssist } from "yt-dlp-transcript-common/lib/clips/assist.mjs";
+import { basicOn } from "yt-dlp-transcript-common/lib/report/look.mjs";
import { validateFxEntries } from "./fx.mjs";
import { validateTransitionStyle } from "./transition.mjs";
import { validateLook } from "./look.mjs";
@@ -179,6 +180,9 @@ export function qrsOf(manifest, { only = null, metaOf = null } = {}) {
const provenance = manifest.provenance ?? {};
const timeline = (manifest.timeline ?? []).filter((e) => e && (!only || e.id === only));
const out = [];
+ // A basic-mode cut is the footage alone (basic.mjs): it draws no code, so none is measured -- nor counted as built
+ // from the origin (originQrsOf, the Inbox's Blocking siteOrigin card: a quick clip on no public site raises none).
+ if (basicOn(render)) return out;
if (deckOn(render)) {
const d = resolveDeck(render);
if (d.qr?.show) {
diff --git a/umtool/report-to-video/lint.test.mjs b/umtool/report-to-video/lint.test.mjs
@@ -13,7 +13,7 @@ import { fileURLToPath } from "node:url";
import {
MIN_QR_PX_PER_MODULE_720P, TEASER_HOUSE_CHARS, WARN_QR_PX_PER_MODULE_720P,
- imageSrcsOf, lintManifest, lintManifestFile, pxPerModuleAt720, qrModules, qrsOf, qrVersion,
+ imageSrcsOf, lintManifest, lintManifestFile, originQrsOf, pxPerModuleAt720, qrModules, qrsOf, qrVersion,
} from "./lint.mjs";
import { buildVideo } from "./build-video.mjs";
@@ -270,3 +270,12 @@ test("a build refuses a lint error before it renders anything; --no-lint builds
p.done();
}
});
+
+test("a basic-mode cut draws no code: none measured, none built from the origin -- a missing origin blocks nothing there", () => {
+ const timeline = [{ id: "c1", type: "clip", video: "v1", start: 12.7, end: 20 }, { id: "i1", type: "image", src: "a.png", citeUrl: "https://e.test/i1" }];
+ const basic = { ...BASE, mode: "basic" };
+ assert.deepEqual(qrsOf({ render: basic, provenance: PROV, timeline }), []);
+ assert.deepEqual(originQrsOf({ render: basic, provenance: { channelSlug: "chan" }, timeline }), []);
+ // The same cut drawn with its corner code: the clip's code is built from the origin.
+ assert.deepEqual(originQrsOf({ render: BASE, provenance: { channelSlug: "chan" }, timeline }).map((q) => q.where), ["timeline c1 (its corner QR)"]);
+});