fix(content): repair client consumers broken by the Duncarrow purge
The purge plan assumed content/world/** was pure build output. The client reads it: content_db.gd loads content/world/topics/ (now absent, since every topic was Duncarrow-generated) and its tests asserted on deleted ids. - content_db: a missing content dir is an empty dir, not an error (§13) - test_content_db: repoint at cosmology canon; drop deleted npc.mera-fenn - test_content_db: assert the no-body-on-client invariant structurally, so it cannot pass vacuously when the topic set is empty - schema.md: finish repointing the worked example onto specimen.md's ids - restore a local real-bible --check smoke test (was only in CI) - roadmap: record that generated content has client consumers Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,17 +52,25 @@ func test_null_quest_ref_resolves():
|
||||
assert_eq(db.unresolved_refs(o), [])
|
||||
|
||||
|
||||
func test_loads_canon_and_topics():
|
||||
assert_true(db.has_canon("town.duncarrow"))
|
||||
assert_true(db.has_canon("place.the-white-antlers"))
|
||||
assert_true(db.has_topic("rumor.travelers-go-missing"))
|
||||
func test_loads_canon():
|
||||
assert_true(db.has_canon("faction.the-seven"))
|
||||
assert_true(db.has_canon("person.the-warden"))
|
||||
assert_true(db.has_canon("rule.disposition-ladder"))
|
||||
|
||||
|
||||
func test_topic_skeleton_has_no_body():
|
||||
var t: Dictionary = db.topic("secret.crell-runs-slave-trade")
|
||||
assert_false(t.has("body")) # bodies are server-only
|
||||
func test_no_loaded_topic_has_a_body():
|
||||
# Bodies are server-only (secrecy≥1 knowledge routes to content/server/topics,
|
||||
# never the client). Structural, so it stays a real guard even when the
|
||||
# topic set is empty (as it is now — the last authored topics were purged)
|
||||
# and automatically starts testing something the moment a topic exists.
|
||||
# One assertion, always executed (not per-loop-item), so an empty topic
|
||||
# set still exercises the check instead of asserting zero times.
|
||||
var leaked: Array = []
|
||||
for id in db.topics:
|
||||
if db.topics[id].has("body"):
|
||||
leaked.append(id)
|
||||
assert_eq(leaked, [], "topic(s) leaked a body to the client")
|
||||
|
||||
|
||||
func test_legacy_npcs_still_load():
|
||||
assert_true(db.has_npc("fenn"))
|
||||
assert_true(db.has_npc("npc.mera-fenn"))
|
||||
|
||||
Reference in New Issue
Block a user