Skip to content

fix(video_compose): accept the scene_plan artifact in the slideshow gate - #923

Open
executorrr86 wants to merge 1 commit into
OpenMontageInc:mainfrom
executorrr86:fix/video-compose-scene-plan-artifact
Open

executorrr86 wants to merge 1 commit into
OpenMontageInc:mainfrom
executorrr86:fix/video-compose-scene-plan-artifact

Conversation

@executorrr86

Copy link
Copy Markdown
Contributor

Summary

video_compose render runs a slideshow-risk gate before rendering, and it reads an optional scene_plan input. If an agent passes the scene_plan artifact as it is stored ({"version": ..., "scenes": [...]}), the gate loops over the dict's keys and scoring fails with 'str' object has no attribute 'get'. That error is only logged, so the check is skipped without notice. If the agent passes the same plan as its scenes list, the gate scores it and can block. This PR unwraps the artifact to its scenes, so both forms get the same verdict.

Related issue

None. Refs #518, which also normalizes this dict as part of a much larger change. This PR is the small piece that can be reviewed on its own.

Changes

  • video_compose.py, _pre_compose_validation: if scene_plan is a dict, use its scenes (2 lines). If the dict has no scenes or the list is empty, the gate falls back to the cuts as before.
  • video_compose.py, input_schema: declare scene_plan (array or object). execute() already read it and idempotency_key_fields already listed it, but the schema did not, so agents had no way to know the input existed.
  • test_video_compose_scene_plan_artifact.py: 7 tests that use the real scorer, with no stubs.

Testing

Gate verdicts with renderer_family: cinematic-trailer (scores from score_slideshow_risk):

Case No plan (cuts only) Plan as list Plan as artifact, main Plan as artifact, this PR
6 video cuts (3.33 revise) + slideshow plan (4.25 fail) pass block pass (scoring crashed) block
5 text cards + 1 video cut (4.00 fail) + good plan (0.63 strong) block pass pass (scoring crashed) pass
  • The new tests: 6 of 7 fail on main. The 7th passes on main only because the crash skips the check; the other tests catch that case.
  • Full pytest tests with this change: 2924 passed, 17 skipped.
  • Behaviour change to be aware of: a slideshow-like plan passed as the artifact now blocks, as it already did when passed as a list. A plan passed as a list, or no plan at all, gives the same result as before.

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable.
  • I updated docs/README if behavior or usage changed. (The new input_schema description documents the input.)
  • No unrelated files (build artifacts, local config) are included in the diff.

🤖 Generated with Claude Code

Passing the canonical scene_plan artifact ({"version", "scenes": [...]})
made the pre-compose slideshow check iterate the dict's keys, fail with
"'str' object has no attribute 'get'" and silently skip scoring. The same
plan passed as its scenes list was scored and could block. Unwrap the
artifact to its scenes so both forms gate identically, and declare
scene_plan in input_schema so agents can discover it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SanHsien added a commit to SanHsien/OpenMontage that referenced this pull request Nov 9, 2026
…open fixes

Apply the upstream diff (67 merged PRs plus 3 direct commits), resolving 13
conflicts in favour of the fork where it already had a fix. Port OpenMontageInc#894 (Piper
beside the interpreter), OpenMontageInc#913 (stale skill paths), OpenMontageInc#915 (explicit zero scene
threshold) and OpenMontageInc#923 (scene_plan artifact in the slideshow gate) with tests.
Replace the curl|bash hint in the MiniCut install message.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
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