Skip to content

Deterministic video-prompt linter for continuous episode clips - #6231

Merged
atomantic merged 3 commits into
mainfrom
claim/issue-6226
Sep 4, 2026
Merged

Deterministic video-prompt linter for continuous episode clips#6231
atomantic merged 3 commits into
mainfrom
claim/issue-6226

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Adds server/lib/videoPromptLinter.js: a pure, structured lint pass for continuous-video clip prompts (chained/continue-cut video generation). Checks a cutType: 'continue' clip for the "Hard cut to <framing>:" opener plus a framing distinct from the preceding clip, requires every referenced bible cast/location descriptor to appear verbatim, bans cross-clip referents (same/still/again/continues/as before), negatives (no/without/never), and UI-overlay language (text/caption/overlay), and enforces an 800-character prompt bound.
  • Returns {pass, reasons[]} per clip rather than throwing — callers decide how to surface a failing lint.
  • Registered in the server/lib/ barrel + README per the module-organization convention.

Test plan

  • cd server && npx vitest run lib/videoPromptLinter.test.js lib/index.test.js — 31/31 passing, including malformed-input (never-throw) and underscore-boundary false-positive cases.
  • Reviewed locally with opencode (2 rounds) against the branch diff; findings applied (never-throw guards on non-string/non-array input, \b-based word-boundary matching instead of a hand-rolled character class, precompiled regexes).

Closes #6226

…ips (#6226)

Chained video generation smears/collapses faces, clothing, and environments
when a continuing clip's prompt drifts from the prior one — a missing hard
cut, a re-used framing, a paraphrased bible descriptor, or language (same/
still/negatives/on-screen text) that a video model renders literally instead
of ignoring. videoPromptLinter.js checks a clip prompt against every rule and
returns structured per-clip results instead of throwing, so a caller decides
whether to block, warn, or retry.
…adjacent terms

- Never throw on a non-string prompt/framing or non-array references/clips
  (the module's own contract is to return a structured result, not throw).
- Match banned terms on \b word boundaries instead of a hand-rolled
  [^a-z0-9] class, so "same_frame_id" no longer false-positives on "same".
- Precompile the banned-term regexes once at module load instead of per call.

Found in local opencode review of #6226.
(clips || []) only caught null/undefined — a string, number, or plain
object still hit .map and threw, violating the module's own
never-throw contract. Found in local opencode review round 2.
@atomantic
atomantic merged commit e8f2829 into main Sep 4, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-6226 branch September 4, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deterministic video-prompt linter for continuous episode clips

1 participant