From 5ab7096cfc2210d98d4b777d2476925ba8bf9927 Mon Sep 17 00:00:00 2001 From: Z User Date: Sun, 1 Nov 2026 02:42:30 +0000 Subject: [PATCH] easy-media-track-gate: allow an empty media_inventory (pure t2v stories) A story with no pictures/audio/video at all is valid: outline.media_inventory may now be []. With zero media rows the override builder emits no media tokens and the track validator enforces that none appear; the runtime parser then demands no image/audio/video inputs, so nothing needs wiring into the editor. Example suite regression-checked unchanged. --- easy-media-track-gate/verify_track_rules.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easy-media-track-gate/verify_track_rules.py b/easy-media-track-gate/verify_track_rules.py index fea6637..4e71cf2 100644 --- a/easy-media-track-gate/verify_track_rules.py +++ b/easy-media-track-gate/verify_track_rules.py @@ -294,8 +294,10 @@ def prompt_rules(user_prompt: str, continuity_mode: str, followed_by_join: bool, def _validate_media_inventory(outline: dict[str, Any]) -> dict[str, dict[str, Any]]: rows = outline.get("media_inventory") - if not isinstance(rows, list) or not rows: - raise Fail("outline.media_inventory must be a non-empty array of media rows") + if not isinstance(rows, list): + raise Fail( + "outline.media_inventory must be an array of media rows — use [] for a pure " + "t2v story with no media at all (no picture tokens may then appear in prompts)") inventory: dict[str, dict[str, Any]] = {} for i, row in enumerate(rows): where = f"media_inventory[{i}]"