From 973af41a6e193623b51ffc8b6b03c0266121abc3 Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Sat, 11 Jul 2026 18:25:43 -0500 Subject: [PATCH] test(content-build): assert candidate entries excluded from build_trees --- tools/content_build/tests/test_emit.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/content_build/tests/test_emit.py b/tools/content_build/tests/test_emit.py index 8a96dd4..1649431 100644 --- a/tools/content_build/tests/test_emit.py +++ b/tools/content_build/tests/test_emit.py @@ -3,7 +3,7 @@ from pathlib import Path import pytest from content_build.emit import build_trees, check_secrecy, write_trees, dump_json -from content_build.model import entry_from_raw +from content_build.model import entry_from_raw, Entry from content_build.parse import parse_bible from content_build.resolve import resolve from content_build.errors import BuildError @@ -62,3 +62,14 @@ def test_write_trees_serializes_deterministically(tmp_path): write_trees(client, server, tmp_path / "world", tmp_path / "server") written = (tmp_path / "world" / "npcs" / "tess.json").read_text() assert written == dump_json(client["npcs/tess.json"]) + + +def test_candidate_entries_are_excluded_from_both_trees(): + world = _world() + world.entries.append(Entry(id="town.draft", type="town", status="candidate", + secrecy=0, related=[], body="draft town", + source="t:99")) + client, server = build_trees(world) + # a candidate entry ships in NEITHER tree + assert "canon/draft.json" not in client + assert all("draft" not in relpath for relpath in list(client) + list(server))