commit 5ff69ce01425586d8539d420443d44931653f90e
parent 2916f0a1d627506a825ed8101fd6131c1da942ff
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 4 Nov 2026 23:47:07 -0500
umtool: render.posts is shared -- the combo validator refused `progress` (written by `posts progress auto`), so every cut with the progress bar failed its lint (the Mr. Obvious full cut and its takes); it now knows every module's key (clock, progress, panel, join, linkVisit, threadMap) and still refuses a typo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/umtool/report-to-video/post-combo.mjs b/umtool/report-to-video/post-combo.mjs
@@ -413,14 +413,20 @@ function knobErrors(o, where, keys) {
return errors;
}
+/** The keys `render.posts` holds, each its own module's. */
+export const POSTS_RENDER_KEYS = ["combo", "redact", "slurs", "scene", "clock", "progress", "panel", "join", "linkVisit", "threadMap"];
+
/** Every reason `render.posts.combo` cannot be built. */
export function validatePostComboRender(render) {
const p = render?.posts;
if (p === undefined || p === null) return [];
if (!isObj(p)) return ["render.posts must be an object (its `combo` knobs)"];
- // render.posts is shared: `redact` and `slurs` are post-redact.mjs's (validatePostsRender checks them), `scene`
- // post-media-scene.mjs's (validatePostSceneRender).
- const errors = Object.keys(p).filter((k) => !["combo", "redact", "slurs", "scene"].includes(k)).map((k) => `render.posts.${k} is not a knob (combo, redact, slurs, scene)`);
+ // render.posts is shared: `redact`, `slurs`, `clock` and `progress` are post-redact.mjs's (validatePostsRender checks
+ // them), `scene` post-media-scene.mjs's, `panel` post-item.mjs's, `join` post-join.mjs's, `linkVisit`
+ // post-link-visit.mjs's, `threadMap` post-branch-map.mjs's -- each validated by its own module. A key none of
+ // them owns (a typo) is refused here. (`posts progress auto` wrote a `progress` this list refused: every cut
+ // with the cut's progress bar failed its lint, 4 Nov.)
+ const errors = Object.keys(p).filter((k) => !POSTS_RENDER_KEYS.includes(k)).map((k) => `render.posts.${k} is not a knob (${POSTS_RENDER_KEYS.join(", ")})`);
if (p.combo === undefined) return errors;
if (!isObj(p.combo)) return [...errors, "render.posts.combo must be an object of knobs"];
return [...errors, ...knobErrors(p.combo, "render.posts.combo", Object.keys(COMBO_DEFAULTS))];
diff --git a/umtool/report-to-video/post-combo.test.mjs b/umtool/report-to-video/post-combo.test.mjs
@@ -253,4 +253,6 @@ test("the sound's print: the same clip re-encoded matches, another sound does no
test("render.posts is shared: the combo validator leaves redact and slurs to post-redact.mjs (a cut with redacted words built again)", () => {
assert.deepEqual(validatePostComboRender({ posts: { redact: [{ term: "Someone" }], slurs: { on: true }, combo: { on: true } } }), []);
assert.match(validatePostComboRender({ posts: { comb: {} } }).join(" "), /render\.posts\.comb is not a knob/);
+ // Every module's key under render.posts passes this one (the progress bar's failed every cut that had it, 4 Nov).
+ assert.deepEqual(validatePostComboRender({ posts: { progress: "auto", clock: { on: true }, panel: {}, join: {}, linkVisit: {}, threadMap: {}, scene: {} } }), []);
});