Apply GH-DEC-2026-017 to audit-core's layer declaration.
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:
parent
03e27e9d62
commit
856ccc6613
3 changed files with 39 additions and 2 deletions
|
|
@ -5,7 +5,6 @@
|
|||
layer: Engine
|
||||
role: Evidence
|
||||
standard: canon/standards/security-layer-model_v0.7.md
|
||||
standard_version: "0.7"
|
||||
declared_by: intakes/intakes.md AUDIT-IN-0001
|
||||
declared_at: "2026-08-29"
|
||||
---
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@
|
|||
|
||||
schema_version: "0.1"
|
||||
framework: netkingdom-security-layer-model
|
||||
standard_version: "0.7"
|
||||
# GH-DEC-2026-017 / amendment A11: INTENT.md frontmatter governs; this file is
|
||||
# its derived machine-readable form. A12: no standard version in a declaration.
|
||||
derived: true
|
||||
derived_from: INTENT.md
|
||||
repository: audit-core
|
||||
layer: engine
|
||||
role: evidence # §3.3 engine typing
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue