Skip to main content

Module bootstrap

Module bootstrap 

Source
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_edit checks a proposed edit to an invariants.harn file. 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_edit checks a proposed edit to meta-invariants.harn itself. Archivist authorship is rejected outright; any other author yields RequireApproval routing 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§

BootstrapPolicy
Parsed meta-invariants.harn contents.
BootstrapValidation
Result of running a bootstrap validator.
BootstrapViolation
One bootstrap-policy violation produced by the validators.
DiscoveredBootstrapPolicy
Bootstrap policy as discovered on disk.

Enums§

EditAuthor
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.harn and 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.harn file.