Skip to main content

Module coverage

Module coverage 

Source
Expand description

Coverage reports tying expected periods to the runs that satisfied them.

Two halves: expected_periods enumerates the periods a control owes over a window (respecting schedule.yaml skip directives), and coverage walks evidence/<control>/ to find the complete runs that claimed each period. The resulting CoverageReport is the auditor-shaped answer: every period is Satisfied, Gap, Skipped, or Future, and any unclaimed/legacy evidence is surfaced separately.

Structs§

CoverageReport
EvidenceError
A manifest that exists but could not be read or parsed — evidence that is present yet unusable. Walkers that skip these must give the caller the list, so a report can say so in-band instead of silently reading the period as a gap.
EvidenceWalk
sealed_runs_by_control’s result: runs bucketed by control-dir name, plus every manifest the walk had to skip.
PeriodCoverage
RunRef
SealedRun
One sealed run on disk: its run directory and parsed manifest. The single walk result both coverage and report assembly consume, so the evidence layout and the lenient corrupt-manifest policy live in exactly one walker.
UnclassifiedRun

Enums§

PeriodStatus

Functions§

coverage
Build a coverage report for control_id over [window_start, window_end].
coverage_over_runs
coverage over runs the caller already walked — so a caller that also needs the manifests (report assembly) touches the evidence tree once instead of twice.
expected_periods
Periods a control is expected to cover within [window_start, window_end].
sealed_runs_by_control
One walk of the whole evidence tree, bucketing sealed runs by the control-dir name. Per-control sequences are identical to what sealed_runs_for_control returns — registry-wide callers (report assembly) use this to avoid re-enumerating the year/quarter dirs once per control, and to receive the corrupt-manifest list the per-control walker silently skips.
sealed_runs_for_control
Walk <root>/evidence/*/*/control_id/*/manifest.json and return one row per sealed manifest, sorted by path. Skips pending runs (no manifest yet) and silently skips manifests that fail to parse — coverage queries shouldn’t take down the whole report on one corrupt manifest. Callers who want stricter checking should use crate::evidence::verifier.