Documentation
¶
Overview ¶
Package currentstate validates parsed ADR application authority and topics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
func Check ¶
Check validates application sequences, operation history, forward results, and inverse provenance. Parsed record formats identify the legacy bootstrap.
func CheckPair ¶
CheckPair validates the current-state transition from the before universe to the after universe (ADR-0135): every current-state-v1 ADR status change across the pair is a legal lifecycle edge, and the claim add/update/remove mutations between the two topic corpora correspond exactly to the operations of the ADRs that reached Implemented across the pair. An update must preserve the claim Origin, extend its Revised-by by exactly the updating ADR while keeping the prior list as an exact prefix, and change a canonical field that is neither provenance nor formatting; a claim mutation with no matching operation and an operation with no matching mutation are both rejected. It also runs the full after-state static Check, so a legal transition still lands in a valid state. Parsed record formats identify the closed migration bootstrap. Findings are returned sorted by message.
type Loaded ¶
Loaded is one immutable current-state view: the cutoff-aware ADR records and the topic corpus assembled from the same snapshot. A caller runs Check over the records and topics and EvaluateCoverage over the topic corpus, so both the static handshake and coverage read a single consistent universe.
func LoadFromTree ¶
func LoadFromTree(tree *snapshot.Tree, cfg *config.Config, boundaries adr.FormatBoundaries, gaps []int) (Loaded, error)
LoadFromTree assembles the ADR and topic corpora from a single snapshot Tree, so a working-tree, index, or commit universe yields exactly the current-state view that tree encodes (ADR-0135). cfg supplies the docs directory, configured domains, and marker-source families; parse it from the same tree for a single-universe load. boundaries are the lock's ADR format cutoffs routing per-ADR legacy/V1/V2 parsing, and gaps are the recorded absent lower ADR numbers the contiguity check tolerates. It does not run Check or EvaluateCoverage; the command layer applies eligibility filters and routes findings.
type Universe ¶
Universe is one parsed current-state view reduced to the two inputs the transition check compares: the cutoff-aware ADR records and the topic set. It is the loader-agnostic shape the working, index, and commit loaders each collapse to, mirroring Check's parsed-input contract so CheckPair reads a Git diff without knowing how either side was loaded. Loaded.Universe builds one.