Skip to content

See interior dead air and colliding narration windows; validator hands over the summary - #15

Merged
leochenpm merged 9 commits into
sync/edit-ops-correctnessfrom
sync/narration-coverage
Aug 12, 2026
Merged

See interior dead air and colliding narration windows; validator hands over the summary#15
leochenpm merged 9 commits into
sync/edit-ops-correctnessfrom
sync/narration-coverage

Conversation

@leochenpm

Copy link
Copy Markdown
Collaborator

Batch 2/8 of the release_1.6.5 sync (narration coverage + plan validation). Stacked on #14 — merge that first, then re-target this to main. Re-mapped by hand from Orkas commits 154c24196, 61cf39158, 8a94dc1c0, 66c1a720e.

Real bugs this fixes in OSS today

  1. coverageRatio is blind to interior silence — it is computed as clamp(voicedEnd / ref), i.e. how far the last line reached. The upstream incident: a 60s cut with 29.7s of interior dead air (seven holes up to 6.9s) scored 95%. coverageForSegments already had the per-segment timings in hand and collapsed them to min/max. Now the per-line voiced spans flow through: the report adds voicedRatio, interiorGaps (≥0.5s, largest first, capped), maxInteriorGapSec, and a gapped status when a hole exceeds 2.5s.
  2. Nothing anywhere reports two lines speaking at once. buildMixFilter adelays each line to its start_sec and amixes — overlapping windows mix as double narration silently. Two layers now catch it: validateEdl rejects overlapping line windows (E_NARRATION_WINDOWS_OVERLAP) at free validation before any synthesis is spent (the classic mistake: target_sec written as the line's END time instead of its duration), and the coverage report measures raw-span collisions (overlapped status) after the mix.
  3. A valid plan validated into silence. ovs plan validate printed {ok: true} and the model then wrote its own six-line abstract and asked for approval of an EDL the user never saw. A passing validate/plan_validate now attaches the host-rendered summary — the last thing the model reads before presenting the plan is the real plan.
  4. Three terse enum rejections (reference media_type, reference role, edit_strategy decision signal) now name the legal values, matching the style the intent/intent_basis messages already had.

Verification

Build green; 244 unit tests pass; full OVS_E2E=1 suite passes 254/254 including a built-CLI check that a valid plan prints its Timeline: summary. New unit cases: gapped (reach 0.97 vs voiced 0.47), overlapped (1s collision), span-less backward compatibility, EDL window-overlap accept/reject/skip.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV

leochenpm and others added 2 commits August 12, 2026 01:08
…, and hand the summary to the validator

Sync of the narration-coverage fixes from Orkas release_1.6.5
(154c24196, 61cf39158, 8a94dc1c0, 66c1a720e), re-mapped onto the ovs
toolchain:

- assessVoiceoverCoverage now takes the per-line voiced spans instead of
  only min/max reach. coverageRatio only says how far the LAST line
  reached — a 60s cut with 29.7s of interior silence still scored 95% on
  it. The report adds voicedRatio (share of the clip that actually
  carries voice), interiorGaps (holes ≥0.5s, largest first) with a
  'gapped' status past 2.5s, and raw-span overlap detection with an
  'overlapped' status: a line whose audio runs past the next line's
  start mixes as two voices speaking at once. coverageForSegments
  already had the per-segment structure in hand and was collapsing it to
  min/max.
- validateEdl rejects overlapping narration line windows
  (E_NARRATION_WINDOWS_OVERLAP) at free validation, before any
  synthesis is spent. The classic mistake is writing target_sec as the
  line's END time instead of its duration.
- The three remaining terse enum rejections (reference media_type,
  reference role, edit_strategy decision signal) now name the legal
  values, like the intent/intent_basis messages already do.
- `ovs plan validate` / MCP plan_validate attach the host-rendered plan
  summary to a passing result: it is the last thing the model reads
  before presenting the plan, and presenting a hand-written abstract
  instead of the real plan is how an unreviewed EDL got approved.

Verified: build green; 244 unit tests pass and the full OVS_E2E=1 suite
passes 254 (new coverage cases for gapped/overlapped/span-less, EDL
window-overlap cases, and a built-CLI check that a valid plan prints
its summary).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV
…rate taste findings to advisory

Sync of the composition-QA fidelity fixes from Orkas release_1.6.5
(61cf39158, e6a71cc8f, ce7b2427c, 72e541a87, bafbdcda8, 4ef7be4ec),
re-mapped onto the ovs toolchain:

- htmlCopySearch: approved copy split across elements for per-word
  reveals could never be found — a CJK line carries no whitespace, and
  the raw-HTML haystack put tags between its characters. Script/style
  bodies no longer count as visible copy. Applied to scene copy, the
  cover headline, and cover signals.
- Accept the meaning, not one spelling: scenes writing the
  background/midground/foreground fields the depth fixHint itself
  prescribes now pass it; `motion` counts next to motion_verbs. Both
  fixHints name the design contract's own scenes[] as the home so the
  fix does not land in the manifest's strict canonical scenes[].
- DESIGN_CONTRACT_BUDGET_INCOMPLETE names each missing section's own
  required fields — bare section names cost one structurally guaranteed
  extra round (add shells, then get told the fields).
- designContractReadiness() runs the contract checks at PREPARE time,
  when "before writing HTML" can still be followed, and rides the
  prepare/reconcile result. Frame-evidence checks stay with inspect.
- Severity calibration: completeness stays blocking; grading authored
  prose does not. GENERIC_AESTHETIC_THESIS, declared-signal count,
  fidelity-contract completeness, rendered cover signals, and the cover
  hero marker drop to advisory. A declared signal the frame renders as
  readable copy counts however it is marked; a signal that only
  restates the headline never counts.
- FROZEN_FRAME_RUN removed: identical sampled hashes on an
  intentionally static composition are noise the preview already shows.
- runSourceAlignmentQa activates only on a real shotlist shape — a
  stray {scenes:[...]} file under the retired name no longer wakes the
  legacy alignment layer.
- BLANK_FRAME_MAX_CONTRAST exported so any capture-retry path re-shoots
  exactly the frames QA would reject.

Verified: build green; full OVS_E2E=1 suite 266/267 (1 intentional
skip) with 12 new cases covering each behavior above.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV
leochenpm and others added 3 commits August 12, 2026 01:22
…eral second's replacement

Sync of the scene-anchor work from Orkas release_1.6.5 (77aaebf4c,
814e2c5a1, e78b20c0f context), re-mapped onto the ovs scaffold:

- buildCompositionScaffold defines S(id)/D(id) helpers that read each
  section's data-start/data-duration, and positions its reveal tweens
  from S(id) instead of a literal second. Scene windows move when
  `ovs composition reconcile` rewrites the attributes (e.g. once
  narration is measured, after the HTML is authored); an anchored tween
  follows by construction, a literal keeps playing against the old
  window and captures blank at that scene's QA frames.
- reconcileCompositionHtml keeps S()-anchored reveals anchored, and
  keeps a legacy literal-positioned scaffold literal (rewriting it to
  S() would reference an undefined helper).
- New AUTHORED_ABSOLUTE_TIMELINE_SECONDS advisory in contract QA: scans
  tl.set/to/from/fromTo/add/addLabel/call positions (call's position is
  its THIRD argument), skips S()/D() and relative string positions, and
  hands back the exact replacement — `line N: tl.to(..., 6.5) ->
  S("payoff") + 1.5` — instead of only the complaint. The checker knows
  every window; the upstream incident left 46 stranded literals and 13
  round trips of hand-retiming.
- stage-compose's Timing rule now prescribes S()/D() anchoring; the old
  rule ("position every tween with an explicit time so it is
  reproducible") is what authored the stranded literals.

Verified: build green; full OVS_E2E=1 suite 269/270 (1 intentional
skip), including a real hyperframes render of the S()-anchored
scaffold, a legacy-scaffold reconcile case, and detector unit cases.

Prompt audit: stage-compose "Timing" bullet replaced (explicit-time
rule -> scene-anchor rule with the retime rationale); no other prompt
clause added or removed; the new rule states what the scaffold now
actually emits, so prompt and code cannot disagree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV
… directly, and findings can be waived

Sync of the gate-authority reversal from Orkas release_1.6.5
(d2c477f34, e6a71cc8f, 274678ccf, 33904ce59 context), re-mapped onto
the ovs resolver and draft gate:

- resolveGateTransition: an exhausted visual-QA cycle is now a USER
  FORK, not a silent wait. `present_findings_and_ask_user_direction`
  replaces `report_visual_qa_blocker`: show the current frames and
  remaining findings, offer another repair round or skipping the named
  check, and end the turn; the user's reply grants the next cycle, and
  the follow-up edit must be materially different — the failed
  strategies are recorded, and repeating one spends the new budget for
  nothing. A real revise decision still starts the fresh cycle
  directly, unchanged.
- New `origin` input: who asked for the change decides whether to ask
  again. A gate_b_payload revision the CURRENT user turn names in the
  user's own words resolves to `apply_user_instruction_then_approve_plan`
  — the instruction is itself the authorization; asking the user to
  confirm a change they just dictated costs a full round trip and
  teaches them their instructions are not taken at face value. A
  model-initiated or mixed reply stays on the amendment path. Origin is
  the driving agent's honest self-report; nothing verifies it in OVS,
  and the skill says so.
- QA waivers make the skip option honorable: `ovs draft --waive <codes>`
  (CLI + MCP) downgrades the named blocking findings to informational
  with a "[skipped by user decision]" suffix, persists them in
  qa/waivers.json so the user is never asked to skip the same check
  twice, and refuses evidence-integrity codes (missing frames/maps,
  parse failures) — those are repaired, not offered.
- gate-control SKILL.md carries the matching contract: the exhausted
  fork with real choices, the origin classification step, the
  offer-the-waiver rule, and "repair passes that remain never stop for
  the user; an exhausted cycle does".

Verified: build green; full OVS_E2E=1 suite 275/276 (1 intentional
skip). New cases: exhausted fork (with and without an error code),
user-dictated vs model/mixed amendment, waivable/refused codes, and a
draft-gate integration proving a waiver moves past the blocking design
finding, refuses the integrity code, persists, and never re-asks.

Prompt audit: gate-control SKILL.md — replaced the "technical QA
exhaustion must never create a recovery form" clause with the
user-fork contract (behavioral reversal shipped in the resolver);
added the origin classification step and the offer-the-waiver rule
(both state what the resolver/draft now enforce); inverted the closing
exhausted-cycle bullet. No clause duplicates another rule; each names
the code path that backs it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV
… the direction stop first

Sync of the checkpoint-protocol craft from Orkas release_1.6.5
(c4ba98815 end-state, 707a8bf1f, 734cfc675, ed5d22684, 2182ad89a,
72e541a87, b0514f075, f0e0c348a), prompt-only, re-mapped onto the OSS
orchestration/gate-control/video-router split:

- orchestration: "Show the work; stop only five times" — the stops are
  a closed set and showing an artifact is not an ending in itself; the
  visual preview stops once per VISUAL IDENTITY (narration-only changes
  inherit the accepted frames); artifacts ride the message that ENDS
  the turn; an enumerated-option reply IS the decision; everything
  outside a tool call is user-facing copy (no finding codes or severity
  words; passing checks stay silent); repair every independent finding
  in one message and never re-read to confirm a successful write.
- Gate A: the direction stop comes first, before any plan file exists;
  2-3 genuinely different concepts; an exact brief still stops with ONE
  concept; propose instead of interrogating for creative preferences.
- AUTO: an assembled production is ONE video — the stop count is fixed
  by the gate table, never per segment; an edit invalidates only its
  own segment.
- gate-control: Gate B opens with the locked direction summary and
  restates settled facts instead of reopening them; a different-language
  reply is a revise instruction; amendment aftermath follows the visual
  identity; a recovery is executed, not narrated (the concrete mutation
  precedes the validator retry).
- video-router: routing ends at the direction boundary — no plan file,
  script, narration copy, or art direction before the user picks.

Verified: skills content tests pin each new clause; suite 266 pass.

Prompt audit: every clause above is NEW behavioral guidance absent from
the OSS pack (verified against current SKILL.md text); none duplicates
gate-control's authorization rules — orchestration carries presentation
/stop craft, gate-control carries authorization; the five-stops set
matches the resolver's gate enum; no clause contradicts the PR5
user-fork/waiver contract, and the preview-identity rule is consistent
with the PR5 amendment-aftermath resolver reasons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL7mRpmEphLAbcH7YmABnV
Checkpoint craft: five stops, visual identity, and the direction stop first
Exhausted QA becomes a user fork; dictated changes apply directly; findings can be waived
Anchor tweens to scene windows; name every literal second's replacement
Repair QA self-contradictions, see split CJK copy, calibrate taste findings to advisory
@leochenpm
leochenpm merged commit 3709e1f into sync/edit-ops-correctness Aug 12, 2026
1 check passed
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.

1 participant