Skip to main content

Module throttle

Module throttle 

Source
Expand description

Anti-nag throttle for the human-facing nudge surface (Phase 18 #9, S0d).

A fired signal still has to clear the throttle before it actually surfaces, so the engine doesn’t repeat the same nudge every turn. Two ways to clear it (D8 / SPINE-PLAN “throttle”):

  1. Cooldown elapsed — at least cooldown_secs(level) since this signal last surfaced. Higher aggressiveness = shorter cooldown; off never surfaces (it is already silenced upstream, but the cooldown is None here too as a belt-and-braces guard).
  2. Material increase — even inside the cooldown, a signal whose metric has grown by at least step(level, base) since it last surfaced re-arms (a genuinely worse backlog shouldn’t wait out the timer).

Cadence is wall-clock here (the SPINE-PLAN’s “edit-window” notion is approximated by minutes — simpler and robust against missing SessionStart events; the per-signal record carries the last-fired epoch + last metric). The Agent-audience surface (authoring debt) is NOT throttled here — it is same-turn only and cheap; this module governs the consolidated human nudge.

Functions§

cooldown_secs
Seconds a human signal must wait between surfacings, by aggressiveness. None = never surface (off).
may_surface
Whether a fired signal may surface now: cooldown elapsed OR a material increase since it last surfaced. A signal that never surfaced always may.
rearm_step
The metric increase that re-arms a signal inside its cooldown. Scales with the signal’s base (so a count-signal needs ~a few more, a fraction-signal a bit more fraction) and shrinks at higher aggressiveness (re-arms sooner). Floored at 1.0 so a count signal always needs at least one more.
record_after_surface
The record to store after a signal surfaces.