Clean up per-beat H3 script output

This commit is contained in:
2026-09-02 14:52:58 +00:00
parent 62fbbdd98e
commit 76b88b0c59
2 changed files with 95 additions and 62 deletions
+22 -3
View File
@@ -599,6 +599,25 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
self.assertIn("# shot 1 refs: Picture 1 Mara (by name); Picture 2 Hangar (by name)", report)
self.assertIn("# shot 2 refs: none", report)
def test_annotate_script_debug_groups_each_prompt_with_its_beat_info(self):
refs = [
{"kind": "character", "image": "img1", "name": "Mara"},
{"kind": "location", "image": "img2", "name": "Hangar"},
]
report = self.module.annotate_script_debug(
["[Generation 1] Mara waits in the Hangar.", "[Generation 2] Nobody else is here."],
[1],
"auto",
refs,
)
self.assertIn("Prompt 1\n[Generation 1] Mara waits in the Hangar.", report)
self.assertIn("Beat 1 info\nAnatomy guard: injected into this prompt", report)
self.assertIn("References used: <Picture 1> Mara (matched by name); <Picture 2> Hangar (matched by name)", report)
self.assertIn("Prompt 2\n[Generation 2] Nobody else is here.", report)
self.assertIn("Beat 2 info\nAnatomy guard: not injected for this prompt\nReferences used: none", report)
def test_input_types_expose_nine_ref_slots(self):
optional = self.module.H3LongVideos.INPUT_TYPES()["optional"]
@@ -1038,9 +1057,9 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
plan_only=True,
)
self.assertIn("# anatomy_guard: injected on shot(s) 2", result[3])
self.assertIn("# shot 1 refs: none", result[3])
self.assertIn("# shot 2 refs: none", result[3])
self.assertIn("Prompt 1", result[3])
self.assertIn("Beat 1 info\nAnatomy guard: not injected for this prompt\nReferences used: none", result[3])
self.assertIn("Beat 2 info\nAnatomy guard: injected into this prompt\nReferences used: none", result[3])
self.assertIn(
"[Generation 1] editorial room, soft practical lighting. Francine stands alone.",
result[3],