Expand description
Repo-root meta-invariants.harn bootstrap policy.
Solves the “predicate code that gates predicate code” problem flagged in
decision 2 of docs/src/flow-predicates.md. Per-directory invariants.harn
files declare slice gates; this module declares the small, hand-authored
policy that gates those gates’ authorship.
Two validation entrypoints front the policy:
validate_predicate_editchecks a proposed edit to aninvariants.harnfile. Archivist may propose; humans and other non-Archivist actors may also propose. Promotion still requires the normal slice approval chain — this function only enforces the bootstrap rules (parseability, kind annotation, archivist provenance, semantic fallback presence).validate_bootstrap_editchecks a proposed edit tometa-invariants.harnitself. Archivist authorship is rejected outright; any other author yieldsRequireApprovalrouting to a human maintainer listed in the previous policy. The previous policy hash is pinned in the result so the slice approval chain has an explicit audit reference.
See parent epic #571, the predicate decision record (#584), and the implementation ticket (#734).
Modules§
- codes
- Stable error codes attached to
BootstrapViolations.
Structs§
- Bootstrap
Policy - Parsed
meta-invariants.harncontents. - Bootstrap
Validation - Result of running a bootstrap validator.
- Bootstrap
Violation - One bootstrap-policy violation produced by the validators.
- Discovered
Bootstrap Policy - Bootstrap policy as discovered on disk.
Enums§
- Edit
Author - Identity of the actor proposing a predicate-authorship change.
Constants§
- DEFAULT_
MAINTAINER_ ROLE - Default maintainer routed when the discovered policy doesn’t list any.
- META_
INVARIANTS_ FILE - Filename used for the repo-root bootstrap policy file.
Functions§
- discover_
bootstrap_ policy - Look for
<root>/meta-invariants.harnand parse it if present. - validate_
bootstrap_ edit - Validate a proposed edit to
meta-invariants.harn. - validate_
predicate_ edit - Validate a proposed edit to a per-directory
invariants.harnfile.