pub struct SelfSignalDeclaration {
pub name: String,
pub kind: SelfSignalKind,
pub effect: SelfSignalEffect,
pub anchored_to: SignalAnchor,
pub cadence: Option<SignalCadence>,
pub domain: Option<String>,
pub note: Option<String>,
}Expand description
A declared periodic or event-driven behavior that shapes an external surface.
Fields§
§name: StringStable identifier for this declared behavior, such as codex_keepalive.
kind: SelfSignalKindSignal classification. Busy participates in drain quiescence; the
remaining kinds are descriptive for operators and analysts.
§A Busy GAUGE COUNTS WORK THE DRAIN CAN AFFECT, AND NOTHING ELSE
The daemon waits for every declared Busy gauge to reach zero before
tearing a module down, up to the drain ceiling. That wait is only worth
anything for work whose RESULT WOULD BE DELIVERED if it finished during
the drain.
The test: if this request completed one millisecond before the
teardown, would anyone receive its answer? If no, it does not belong
in a Busy gauge, and counting it makes the daemon wait out its whole
ceiling for something that cannot usefully complete.
The case that names the rule (CEREB, 2026-09-19): cerebellum’s
management requests can park for up to 300 s awaiting a HUMAN’s consent
decision. Those were counted as in-flight, so a drain begun while a
prompt was open waited on a person until the 30 s ceiling expired –
and the pending answer dies with the process either way, so the wait
bought nothing. The fix splits the accounting: executing counts toward
Busy, awaiting_consent is reported as its own informational gauge.
The same shape exists anywhere a request blocks on an external party the
restart invalidates – a human, a peer seat, a vendor call whose reply
has nowhere to land. Those are legitimately IN FLIGHT and are not
legitimately Busy.
effect: SelfSignalEffectWhether the signal only observes the surface or changes it.
anchored_to: SignalAnchorThe cadence, event, or health gauges that anchor this signal.
cadence: Option<SignalCadence>The effective cadence in force at HELLO time.
Use SignalCadence::Literal when a compile-time constant is the
effective value. Use SignalCadence::Derived when configuration or
another runtime input resolves the effective value, naming the source so
the declaration cannot silently drift from that resolution.
domain: Option<String>The external surface this behavior shapes, such as provider-usage.
note: Option<String>Trait Implementations§
Source§impl Clone for SelfSignalDeclaration
impl Clone for SelfSignalDeclaration
Source§fn clone(&self) -> SelfSignalDeclaration
fn clone(&self) -> SelfSignalDeclaration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more