Expand description
Perpetual guard root state machine, policy identity, and receipt types. Perpetual guard root state machine, policy identity, and receipt types.
This module owns the versioned non-secret guard state types that every other lane builds on. It does not import CLI, transport, or presentation code (one-way dependency: core state is the bottom of the stack).
§State machine
Every registered root has exactly one [GuardRootState]. Transitions are
centralized in [GuardRootState::transition] so adding a state makes the
state/exit/documentation matrix test fail until a decision is recorded.
§Policy identity
[GuardPolicyIdentity] binds every input capable of changing findings or
coverage. A mismatch makes existing attestations ineligible immediately.
Structs§
- Filesystem
Identity - Non-secret filesystem identity for root replacement detection.
- GitClean
Attestation - Summary of a complete clean scan outcome for one Git blob, suitable for durable reuse. Only complete clean outcomes are reusable: a blob that produced a finding, coverage gap, panic, persistence failure, or incomplete report is never inserted as clean.
- GitClean
Attestation Key - Key for the clean attestation lookup: hash algorithm + blob OID + policy identity. Backend identity is recorded in the receipt but does not create different correctness outcomes.
- Guard
Policy Identity - Every input capable of changing findings or coverage, bound into one
canonical identity. A mismatch makes existing attestations ineligible
immediately and transitions the root to
GuardRootState::StalePolicy. - Guard
Receipt - Terminal receipt for a guard commit transaction or background reconciliation. Carries exact byte and object totals so the client can validate conservation.
- Guard
Root Record - Persistent record for one registered guard root.
Enums§
- GitHash
Algorithm - Git object hash algorithm supported by the guard.
- Guard
Root Mode - Whether a guarded root is a Git repository or a plain filesystem root.
- Guard
Root State - The explicit state of one registered guard root.
- Guard
Transition - Events that drive the root state machine.
- Receipt
Error - Error returned when receipt conservation validation fails.
- Transition
Error - Error returned when a transition is not legal from the current state.
Constants§
- GUARD_
SCHEMA_ VERSION - Current guard state schema version. Bumped on any incompatible change to the durable store layout or the serialized shapes in this module.