feat(content): reparent disposition-ladder to mechanics.md; purge Duncarrow
Move rule.disposition-ladder into content/lore/mechanics.md and delete the Duncarrow scaffolding (source + 23 generated JSON). Remove the redundant test_duncarrow.py (routing/secrecy already covered by test_emit.py synthetic fixtures); repoint a cosmetic slug-test id. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HuHRPE7VfppUJEaoGBEUqZ
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
"""End-to-end: the real promoted Duncarrow bible builds green and routes the
|
||||
Crell secret correctly (body server-only; the id ships in the gate skeleton)."""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from content_build.__main__ import _load_world, check
|
||||
from content_build.emit import build_trees
|
||||
|
||||
REPO = Path(__file__).resolve().parents[3]
|
||||
LORE = REPO / "content" / "lore"
|
||||
WORLD = REPO / "content" / "world"
|
||||
SERVER = REPO / "content" / "server"
|
||||
|
||||
|
||||
def test_duncarrow_builds_and_check_is_clean():
|
||||
assert check(LORE, WORLD, SERVER) == 0
|
||||
|
||||
|
||||
def test_secret_body_is_server_only():
|
||||
client, server = build_trees(_load_world(LORE))
|
||||
assert "topics/crell-runs-slave-trade.json" in server
|
||||
# the secret's descriptive id ships in the gate skeleton (schema property)...
|
||||
npc = client["npcs/mayor-oswin-crell.json"]
|
||||
assert any(k["fact_id"] == "secret.crell-runs-slave-trade"
|
||||
and k["gate"] == "never" for k in npc["knows"])
|
||||
# ...but its BODY never reaches any client artifact
|
||||
blob = json.dumps(client)
|
||||
assert "elf-slaving" not in blob and "sells them into slavery" not in blob
|
||||
|
||||
|
||||
def test_mera_never_holds_the_secret():
|
||||
client, _ = build_trees(_load_world(LORE))
|
||||
fenn = client["npcs/mera-fenn.json"]
|
||||
facts = {k["fact_id"] for k in fenn["knows"]}
|
||||
assert "secret.crell-runs-slave-trade" not in facts
|
||||
assert "fact.crells-guard-acts-alone" in facts
|
||||
@@ -13,11 +13,11 @@ def _raw(**over) -> RawEntry:
|
||||
|
||||
|
||||
def test_namespace_and_slug():
|
||||
e = entry_from_raw(_raw(id="npc.mera-fenn", type="person",
|
||||
e = entry_from_raw(_raw(id="npc.specimen-teague", type="person",
|
||||
start_disposition="cold",
|
||||
knows=[{"fact": "rumor.x", "gate": "warm"}]))
|
||||
assert e.namespace == "npc"
|
||||
assert e.slug == "mera-fenn"
|
||||
assert e.slug == "specimen-teague"
|
||||
|
||||
|
||||
def test_category_predicates():
|
||||
|
||||
Reference in New Issue
Block a user