Widen A12 enforcement from the key name to the declaration's content (GH-DEC-2026-020).
internal/layer/conformance.go enforced A12 as "no key named standard_version", and so could not see the same pin as a versioned standard: path or as companion_version. It now detects a version of the standard or its companion in any key or value of the declaration (INTENT.md frontmatter, layer.yaml), including a version in a path, and excludes comments and schema_version. It refuses to be applied to pep-stance.yaml, pip-claims.yaml or evidence-classification.yaml, which A12 r2 does not reach (§3). Every run of check_layer_conformance and of the estate survey now prints the standard version it checks against (layer.ValidatedAgainst, kings-guard's pattern) and its scope (§4). The survey applies the same detection to peers' declarations; the receipt is refreshed because the survey's output changed (no peer declaration currently carries a version). Tests fail if a versioned standard: path or a companion_version comes back. flex-auth's own INTENT.md needed no change. 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
2be655703d
commit
e0c6c4389d
7 changed files with 334 additions and 17 deletions
|
|
@ -1,5 +1,8 @@
|
|||
// Command check_layer_conformance asserts the INTENT.md layer declaration
|
||||
// and that no Tooling client exists in production Go sources.
|
||||
//
|
||||
// Every run — pass or fail — prints the standard version it checks against and
|
||||
// the scope it ranged over, as A12 r2 requires (GH-DEC-2026-020 §4).
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -16,6 +19,8 @@ func main() {
|
|||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(2)
|
||||
}
|
||||
fmt.Printf("Validated against: %s\n", layer.ValidatedAgainst)
|
||||
fmt.Printf("Scope: this repository only — %s/INTENT.md frontmatter (the §11 declaration), the files it names, and production Go sources under cmd/, internal/, pkg/. Stance, claims and classification maps are not read.\n", filepath.Base(root))
|
||||
if _, err := os.Stat(filepath.Join(root, "INTENT.md")); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "INTENT.md not found in %s\n", root)
|
||||
os.Exit(2)
|
||||
|
|
@ -24,5 +29,5 @@ func main() {
|
|||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println("PASS — Engine/PDP declaration parses; no Tooling client in the tree.")
|
||||
fmt.Println("PASS — Engine/PDP declaration parses; no standard or companion version anywhere in it; no Tooling client in the tree.")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,12 @@
|
|||
// shell survey, which is the same defect in a different costume — a finding
|
||||
// nobody can reproduce is an assertion. This makes it a command.
|
||||
//
|
||||
// It checks ONE property: whether each layer: value sits in the §3 vocabulary
|
||||
// as written, case-sensitively. It does not apply flex-auth's own declaration
|
||||
// It checks TWO properties: whether each layer: value sits in the §3
|
||||
// vocabulary (ASCII case folded, GH-DEC-2026-017 §2), and whether a
|
||||
// declaration carries a standard or companion version in any key or value
|
||||
// (A12 r2, GH-DEC-2026-020). It reads declarations only — INTENT.md frontmatter
|
||||
// and layer.yaml — never stance, claims or classification maps. Every run prints
|
||||
// the version it checks against and its scope. It does not apply flex-auth's own declaration
|
||||
// rules to any other repository, and it does not grade anyone: §11 is explicit
|
||||
// that a layer stated about a repository by another repository is not a
|
||||
// declaration.
|
||||
|
|
@ -131,22 +135,34 @@ func main() {
|
|||
fmt.Printf("\nOutside the closed §3 vocabulary (four tokens, case folded): %s\n", strings.Join(offVocab, ", "))
|
||||
}
|
||||
|
||||
pinned := layer.VersionPinned(rows)
|
||||
if len(pinned) > 0 {
|
||||
fmt.Printf("\nDeclarations carrying a standard or companion version (A12 r2): %d\n", len(pinned))
|
||||
for _, p := range pinned {
|
||||
fmt.Printf(" %s\n", p)
|
||||
}
|
||||
} else {
|
||||
fmt.Println("\nNo declaration carries a standard or companion version (A12 r2).")
|
||||
}
|
||||
|
||||
if vol := layer.VolunteerDeclarations(rows); len(vol) > 0 {
|
||||
fmt.Printf("\nDeclared voluntarily, outside §4 catalog scope — welcome, and NOT a §11\nnon-conformance: %s\n", strings.Join(vol, ", "))
|
||||
}
|
||||
|
||||
if *jsonOut != "" {
|
||||
receipt := map[string]any{
|
||||
"derived_at": "run time",
|
||||
"scope": scope,
|
||||
"root": dir,
|
||||
"rows": rows,
|
||||
"spellings": spellings,
|
||||
"undeclared": undeclared,
|
||||
"off_vocab": offVocab,
|
||||
"self_disagreeing": disagree,
|
||||
"volunteers": layer.VolunteerDeclarations(rows),
|
||||
"checks_only": "the closed four-token §3 vocabulary, ASCII case folded per GH-DEC-2026-017 §2; no flex-auth house rules applied to peers",
|
||||
"derived_at": "run time",
|
||||
"validated_against": layer.ValidatedAgainst,
|
||||
"version_pinned": pinned,
|
||||
"scope": scope,
|
||||
"root": dir,
|
||||
"rows": rows,
|
||||
"spellings": spellings,
|
||||
"undeclared": undeclared,
|
||||
"off_vocab": offVocab,
|
||||
"self_disagreeing": disagree,
|
||||
"volunteers": layer.VolunteerDeclarations(rows),
|
||||
"checks_only": "the closed four-token §3 vocabulary, ASCII case folded per GH-DEC-2026-017 §2; and A12 r2 (GH-DEC-2026-020): no standard or companion version in any key or value of INTENT.md frontmatter or layer.yaml; stance, claims and classification maps not read; no flex-auth house rules applied to peers",
|
||||
}
|
||||
b, err := json.MarshalIndent(receipt, "", " ")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue