Skip to main content

Module resolver

Module resolver 

Source
Expand description

Cadence resolution and scope expansion.

Pure functions over the loaded model. Cadence math follows the table in docs/storage.md; scope follows the inventory + tag-filter rules in the same doc. Anything date-shaped enters as chrono::NaiveDate so tests can pin “today” deterministically.

Structs§

DueResolution
A firing date with provenance and (where the override carried one) the operator’s note.
DueRow

Enums§

DueReason
Why a particular firing date won — i.e. which input to the resolver produced it. The CLI surfaces this via secunit due --why; the GUI renders it as a chip on the Schedule view.

Functions§

due_rows
Compute next-due rows for every control in reg as of today. Sorted by (next_due ascending, control_id); controls without a computable firing date come last.
due_within
Return controls due within window days of today (inclusive).
grace
Per-cadence grace period after which a due control is overdue.
is_overdue
Has the control passed its grace window?
next_due
Compute the next firing date for control on or after today, taking schedule overrides and the last-run pointer into account.
next_due_with_reason
Like next_due but returns the date together with the DueReason that produced it and the override’s note (if any).
resolve_scope
Expand a control’s scope against the inventory on the given run date.