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
regas oftoday. Sorted by(next_due ascending, control_id); controls without a computable firing date come last. - due_
within - Return controls due within
windowdays oftoday(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
controlon or aftertoday, taking schedule overrides and the last-run pointer into account. - next_
due_ with_ reason - Like
next_duebut returns the date together with theDueReasonthat produced it and the override’s note (if any). - resolve_
scope - Expand a control’s scope against the inventory on the given run date.