Apply GH-DEC-2026-017 to audit-core's layer declaration.
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 4s

Remove standard_version from layer.yaml and INTENT.md frontmatter (A12),
mark layer.yaml derived from INTENT.md (A11), and add tests asserting the
derived markers, the absence of a standard version, and agreement of the
two forms after an ASCII case fold over the closed four-token vocabulary
(A9). Layer values are left as spelled: INTENT.md Engine, layer.yaml engine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 63291@bnt-lap001
Assistant-Session: 8bd77868-ca68-4f49-bb1e-d539ecc0d703
This commit is contained in:
tegwick 2026-09-21 07:34:00 +02:00
parent 03e27e9d62
commit 856ccc6613
3 changed files with 39 additions and 2 deletions

View file

@ -146,3 +146,38 @@ def test_the_declared_freshness_window_matches_the_contract():
assert surface["window_hours"] == 168
contract = (ROOT / surface["contract"]).read_text()
assert "168 hours" in contract
# GH-DEC-2026-017 (amendments A9, A11, A12): INTENT.md governs, layer.yaml is
# derived from it, the §3 vocabulary is closed at four tokens compared after an
# ASCII case fold, and a declaration carries no standard version.
VOCABULARY = {"taxonomy", "tooling", "engine", "staff"}
def _intent_frontmatter() -> dict:
text = (ROOT / "INTENT.md").read_text()
assert text.startswith("---\n"), "INTENT.md must carry frontmatter"
return yaml.safe_load(text.split("---\n", 2)[1])
def _fold(value: str) -> str:
return value.encode("ascii").lower().decode("ascii")
def test_layer_yaml_is_marked_derived_from_intent():
assert LAYER["derived"] is True
assert LAYER["derived_from"] == "INTENT.md"
def test_the_two_forms_agree_after_folding_and_nobody_re_spells():
intent_layer = _intent_frontmatter()["layer"]
assert _fold(intent_layer) in VOCABULARY
assert _fold(LAYER["layer"]) in VOCABULARY
# Assert the fold, not equality: a casing difference is conforming, a
# layer divergence that survives folding is a finding and must fail.
assert _fold(intent_layer) == _fold(LAYER["layer"])
def test_no_standard_version_in_either_form():
assert "standard_version" not in LAYER
assert "standard_version" not in _intent_frontmatter()