Skip to main content

Module dirty

Module dirty 

Source
Expand description

Dirty units from git: anchors, one diff per anchor, the core cascade.

A Snapshot is the repository at one commit: every SDD loaded from a checkout of it, the unit graph over them, each SDD’s anchors from its journal, and the declared ownership of every path. Asked which Verified units a change reaches (Snapshot::dirty), it resolves each recorded anchor — a short sha — to a commit, runs `git diff –name-only

` once per distinct commit (units integrated in one commit share one), drops the paths whose change is protocol state only ([`classify_changes`]), and hands the rest to [`cascade::dirty_set`]. An anchor git cannot resolve — history rewritten, a shallow clone — gets no diff, so its units are dirty with that reason: the cascade never trusts what it cannot compare. Each SDD's §5 Test command is judged the same way against its suite anchor.

A graph with a cycle has no closures to cascade along: the cycles are returned instead of a guess. Output is sorted by unit (slug, then id) and SDDs by slug, so the same repository state gives the same answer.

Structs§

DiffCache
What a run’s dirty sets found at one head, kept for the next: each anchor’s commit, and the paths that differ between it and the head. Moving to a new head diffs only the commits in between; a path they touched is compared, anchor by anchor, in one batch.
DirtySet
Which Verified units — and which suites — a change reaches.
SddAt
One SDD of a Snapshot.
Snapshot
The repository at one commit, as the re-check cascade reads it.
SpecFiles
Where the SDDs of a repository keep their files, repository-relative: what tells protocol state from everything else.
SuiteState
One SDD’s §5 Test command, against its suite anchor.

Enums§

Cascade
What the cascade made of a Snapshot.
Mode
How far recorded checks are trusted.

Functions§

benign
Whether old..new moved nothing but protocol state: new descends from old, and no path changed beyond it. What was established at old then holds at new.
classify_changes
The paths that differ between old and new, sorted, each with whether its change is protocol state only: a bundle’s journal, ledger, decision or change log; a bundle’s unit file, or a single-file SDD, that differs in nothing but vitrify-managed fields (and, in a single file, those sections). Such changes — claims, renewals, stamps, recorded questions — change nothing a build, a test or a lint reads.
describe
One human line for why a unit or a suite is dirty: the changed paths with their owners, no recorded check, every recorded check is distrusted, or anchor <c> cannot be resolved ….
substantive_changes
The paths that differ between old and new beyond protocol state, sorted.