Skip to main content

tick

Function tick 

Source
pub fn tick() -> Action
Expand description

The “fast re-poll” requeue action — after_secs(TICK_SECONDS).

The ONE substrate owner of the “immediate re-poll after a signal consumption or state-change latch” requeue intent every FSM handler tail and top-level dispatcher exits through. Pre-lift the intent was hand-authored at 12 workspace-wide sites past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across two files, each naming the same intent independently:

  • tatara-reconciler::phase_machine — 10 sites fed the local const TICK_RETRY: u64 = 1; binding at pending / forking- heartbeat / attested-heartbeat / exiting-tail / zombie-poll / reaped handler tails.
  • tatara-reconciler::controller — 2 sites fed a bare 1 literal at the deletion-preempt requeue and the signal- consumed requeue (both semantically “re-poll immediately”).

Post-lift each callsite reads tatara_process::requeue::tick() and the intent → second-count → requeue chain lives at ONE substrate owner. Peer to the short_retry and heartbeat helpers on the “named requeue intent” axis; sibling to the raw- second-count after_secs on the “typed requeue constructor” axis (the semantic helpers here compose through it).

A future normalization on the tick intent alone (e.g. a millisecond-precision path for tight controller inner loops, bounded by a workspace-wide floor) lands at THIS ONE substrate primitive and every downstream tick site inherits the upgrade mechanically. No per-site edit at any of the 12 listed callers or at future consumers (a new phase handler tail, a new signal arm, a new top-level dispatcher).

Theory anchor: THEORY.md §VI.1 (generation over composition — the intent recurred at 12 hand-authored production sites past the PRIME-DIRECTIVE ≥ 2 duplication trigger, and is lifted to ONE owner here). THEORY.md §II.1 invariant 5 (composition preserves proofs — the intent → second-count mapping lives at ONE typed algebra projection; a regression that drifted the second-count would fail at the byte-shape pin below rather than as silent operator-visible cadence skew across the 12 downstream requeue sites).