From e3c35614e76eb2594725dd625f019d884f17c9ed Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Sat, 11 Jul 2026 18:16:18 -0500 Subject: [PATCH] test(content-build): cover status, empty-knows, non-npc start_disposition, empty-rungs Co-Authored-By: Claude Opus 4.8 (1M context) --- tools/content_build/tests/test_resolve.py | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/content_build/tests/test_resolve.py b/tools/content_build/tests/test_resolve.py index de17399..6972b89 100644 --- a/tools/content_build/tests/test_resolve.py +++ b/tools/content_build/tests/test_resolve.py @@ -105,3 +105,29 @@ def test_missing_ladder(): def test_illegal_start_disposition(): with pytest.raises(BuildError): resolve([ladder(), town(), rumor(), npc(start_disposition="besties")]) + + +def test_illegal_status(): + bad = Entry(id="town.a", type="town", status="draft", secrecy=0, + related=[], body="x", source="t:9") + with pytest.raises(BuildError): + resolve([ladder(), bad]) + + +def test_npc_empty_knows_rejected(): + with pytest.raises(BuildError): + resolve([ladder(), town(), rumor(), npc(knows=[])]) + + +def test_non_npc_with_start_disposition_rejected(): + rec = Entry(id="person.p", type="person", status="canon", secrecy=0, + related=[], body="x", source="t:9", start_disposition="cold") + with pytest.raises(BuildError): + resolve([ladder(), town(), rumor(), rec]) + + +def test_empty_rungs_rejected(): + empty = Entry(id="rule.disposition-ladder", type="rule", status="canon", + secrecy=0, related=[], body="x", source="t:1", rungs=[]) + with pytest.raises(BuildError): + resolve([empty])