commit f6326e89ace787d4994eaec98ac35052861d947b
parent 31af39e1d4622b31e619f9ea0cb99e2dbe5ff8b2
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 9 Nov 2026 23:16:15 -0500
umtool: the kind guard green again -- cast.test.mjs drops a kind it never read, usedIn asks the registry
e2e/projects.spec.ts "no page or lib outside the registry special-cases a kind" had two offenders on main:
lib/report/cast.test.mjs wrote `kind: "report-video"` into a fixture manifest (no reader looks at it; a
scaffolded manifest carries no kind), and lib/ingredients/usedIn.mjs filtered the walk by the literal id.
The usage index now keeps a project whose kind makesTakes (lib/projects/kinds.mjs), the registry's word
for "its manifests hold clips". The guard is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/umtool/lib/ingredients/usedIn.mjs b/umtool/lib/ingredients/usedIn.mjs
@@ -38,6 +38,7 @@
import { mkdir, readdir, readFile, rename, stat, writeFile } from "node:fs/promises";
import path from "node:path";
import { resolveVideoDirId } from "yt-dlp-transcript-common/lib/videoDir-server.mjs";
+import { kindMakesTakes } from "../projects/kinds.mjs";
import { walkProjects } from "../projects/walk.mjs";
export const USAGE_INDEX_FORMAT = "umtool-usage-index";
@@ -148,7 +149,9 @@ export async function buildUsageIndex({ reportsRoot, channelsDir, previous = nul
return dir;
};
- const projects = (await walk(reportsRoot)).filter((p) => p.kind === "report-video" || p.kind === undefined);
+ // A project whose kind makes takes is one whose manifests hold clips (the registry says which; a kind id is
+ // never written here -- e2e/projects.spec.ts). A walk that reports no kind (a test's) is read as one.
+ const projects = (await walk(reportsRoot)).filter((p) => p.kind === undefined || kindMakesTakes(p.kind));
const files = {};
let parsed = 0;
let reused = 0;
diff --git a/umtool/lib/report/cast.test.mjs b/umtool/lib/report/cast.test.mjs
@@ -74,7 +74,7 @@ const CH = path.join(ROOT, "channels");
);
await mkdir(DIR, { recursive: true });
await writeFile(path.join(DIR, "video.manifest.json"), JSON.stringify({
- schemaVersion: 1, slug: "voices", title: "Voices", kind: "report-video", provenance: { channelsDir: "../channels", channelSlug: "chan" },
+ schemaVersion: 1, slug: "voices", title: "Voices", provenance: { channelsDir: "../channels", channelSlug: "chan" },
render: { width: 1920, height: 1080, fps: 30, palette: { bg: "#000000", fg: "#ffffff", muted: "#888888", accent: "#c8752a" } }, timeline,
}, null, 2));
await wavOf(path.join(DIR, "narration", "posts", "1", "take-1.orpheus-zac.wav"), VOICE_A, 1.5);