Skip to main content

Module interval

Module interval 

Source
Expand description

Interval wrapper — the first PHASE-level wrapper (SRD-82/92 cross-level; see docs/cross-level-wrapper-cascade-scope.md). interval: is its sigil: re-run this phase, dwelling interval between runs, bounded by repeat:.

Why a PHASE wrapper and not a rate: a rate paces the units inside a phase (for a recall phase, individual queries), so rate: 1/300 would trickle one query every 5 minutes — a single glacial pass, not a measurement every 5 minutes. Pacing the phase is one layer out: each iteration is a whole phase run (a complete recall measurement), and the repeats live in ONE session — one metrics timeline — which an external while … sleep loop cannot give you (each nmbrs run is its own session).

  • No interval: → the phase runs exactly once (unchanged).
  • interval: <dur> + repeat: N → up to N runs, dwelling interval between them.
  • interval: <dur> with no repeat: → runs until the session stops.

The dwell is cooperative: it wakes on a short tick to observe the session stop, so Ctrl-C / a stop_when action: abort cuts the wait immediately instead of waiting out the remaining interval. A failing run ends the repeat (the phase’s own outcome propagates unchanged).

Registration is declared here at WrapperLevel::Phase so the field validation + telemetry stay consistent with the op wrappers; the construction is hooked at the phase seam (PhaseShell::run) because a phase layer wraps an ExecShell, not an OpDispenser.

Constants§

NAME