Synchronize pair cast metadata

This commit is contained in:
2026-06-27 12:48:12 +02:00
parent 2a5e565ce7
commit e5e194c68b
4 changed files with 40 additions and 4 deletions
+10
View File
@@ -3976,6 +3976,16 @@ def _expect_pair(pair: dict[str, Any], name: str) -> None:
_expect_custom_row(pair.get("hardcore_row") or {}, f"{name}.hardcore_row")
_expect_text(f"{name}.shared_descriptor", pair.get("shared_descriptor"), 12)
_expect(pair.get("shared_cast_descriptors"), f"{name}.shared_cast_descriptors should not be empty")
shared_cast_text = "; ".join(str(item).strip() for item in pair.get("shared_cast_descriptors") or [] if str(item).strip())
_expect(
pair["hardcore_row"].get("cast_descriptor_text") == shared_cast_text,
f"{name}.hardcore_row cast descriptors drifted from pair root",
)
if pair.get("options", {}).get("softcore_cast") == "same_as_hardcore":
_expect(
pair["softcore_row"].get("cast_descriptor_text") == shared_cast_text,
f"{name}.softcore_row cast descriptors drifted from same-cast pair root",
)
_expect_text(f"{name}.softcore_prompt", pair.get("softcore_prompt"), 20)
_expect_text(f"{name}.hardcore_prompt", pair.get("hardcore_prompt"), 20)
_expect_trigger_once(f"{name}.softcore_prompt", pair.get("softcore_prompt"), Trigger)