Expand description
SRD-86 §“Settling” — a cadence-pulse phase evaluator.
A PhaseStopEvaluator is a callback registered on the metrics
cadence feed (nmbrs_metrics::cadence_reporter::CadenceReporter::subscribe,
SRD-42). It runs once per cadence pulse against the running
phase’s current state + metrics, and at any pulse may set a
terminal disposition on the phase — stopping it (cooperatively,
by raising the phase stop flag, which the activity loop reads at its
next cycle boundary) and recording which Outcome disposition it
stopped with. Once it has set a terminal disposition it
unregisters itself: it reports finished,
so the cadence-feed dispatch worker stops delivering further pulses
(no self-join deadlock — the evaluator runs on that worker thread).
The per-pulse decision is a PulseEvaluator: it returns
Some(outcome) to stop the phase with that disposition, or None to
let it keep running. The settle detector
(super::settle::SettleEvaluator) is the first implementation;
the mechanism is general (any cadence-driven phase-stop policy).
Structs§
- Phase
Stop Evaluator - A cadence-feed callback that drives a
PulseEvaluatoragainst a running phase and terminally stops it on the first verdict. See the module docs.
Traits§
- Pulse
Evaluator - Per-pulse evaluation of a running phase against the just-published
cadence window. Returns
Some(outcome)to terminally stop the phase with that disposition, orNoneto let it keep running.
Type Aliases§
- Stop
Outcome Cell - The terminal disposition a
PhaseStopEvaluatorpublishes. The executor reads it at phase completion:None⇒ the evaluator never fired (the phase ran to its natural end);Some(outcome)⇒ the evaluator stopped the phase with that disposition.