docs(plan): record the Door C facet decisions, the mutation result, and the harness that lied

Four decisions: Door C projects and never derives (D-C1), the projection is
key-agnostic so it is not about numbering (D-C2), an unrenderable value drops
the facet and never the concept (D-C3), and a faceted entry is refreshed
because it is the first entry that can go stale (D-C4).

Also records a measurement about the measuring. The mutation harness first
reported 11 of 11 killed; the number was entirely false, because it invoked
pytest with an unrecognised `--timeout` flag and every run exited non-zero. The
negative control caught it by being reported killed when it provably could not
be. Honest result is 9 of 11, with both survivors analysed as equivalent
mutants and the one real gap they exposed (profile threading pinned only by
coincidence) closed with a direct test.

Closes open item 6 of the Door B record, which asked exactly the question this
answers: whose claim does the frontmatter make.
This commit is contained in:
Kjell Tore Guttormsen 2026-08-27 11:03:37 +02:00
commit d35bcb21ec
2 changed files with 202 additions and 4 deletions

View file

@ -319,3 +319,41 @@ def test_an_unfaceted_profile_keeps_the_early_return_it_always_had(tmp_path: Pat
link_in_index(bundle, "import-a.md", "a", profile=DEFAULT)
assert (bundle / "index.md").read_text(encoding="utf-8") == "- [Hand Edited](import-a.md)\n"
# --- properties that were pinned only as a side effect ---------------------
def test_the_door_writes_into_the_profiles_namespace_not_defaults(tmp_path: Path) -> None:
# Every profile shipped today reuses `DEFAULT.paths`, so no existing test
# could tell a threaded profile from a hard-coded DEFAULT here — the
# mutation that reverts the threading survived the whole suite. That makes
# this a property held by coincidence rather than by test, which is the one
# kind of green that means nothing. A profile owning its own namespace says
# it directly.
profile = replace(
STRUCTURED_V1,
paths=replace(STRUCTURED_V1.paths, import_prefix="ekstern-"),
)
place(tmp_path / "source", "a.md", "---\ntype: dataset\nnumber: N500\n---\n\nBody.\n")
_, bundle = run_with(tmp_path, StubImportGate(), profile=profile)
assert (bundle / "ekstern-a.md").is_file()
assert not (bundle / "import-a.md").exists()
assert index_of(bundle, profile) == "- [a](ekstern-a.md) — number: N500\n"
def test_a_key_the_sender_declared_empty_produces_no_facet(tmp_path: Path) -> None:
# Senders leave keys in with nothing after the colon. An empty value must
# not become `status: ` in the index — a facet stating nothing is worse than
# an absent one, because it reads as a value the sender chose.
place(
tmp_path / "source",
"a.md",
"---\ntype: dataset\nnumber: N500\nstatus:\ndate:\n---\n\nBody.\n",
)
_, bundle = run_with(tmp_path, StubImportGate(), profile=STRUCTURED_V1)
assert index_of(bundle, STRUCTURED_V1) == "- [a](import-a.md) — number: N500\n"