Skip to main content

Module supervisor

Module supervisor 

Source
Expand description

Subscription supervisor: per-rule scryer subscriptions, dedup, rate limiting.

For each enabled TowerRule, the supervisor opens one subscription to the local scryer and (when the rule’s federation policy requests it) one per remote peer in the yubaba mesh. Events flow through the compiled ScryerFilter, a dedup ring keyed by (rule_id, scope_id, seq), and an optional sliding- window rate gate before being surfaced as FiredEvents.

The supervisor is driven by polling (poll()). The P2 runtime wraps this in an async task; the test harness calls poll() synchronously from a single thread.

Architecture: .yah/docs/architecture/A052-yah-tower.md

Structs§

DedupKey
Key for the dedup ring: identifies a (rule, event-scope, sequence-position) triple.
FiredEvent
An event that has passed filter, dedup, and rate checks for a rule.
NoPeers
No-op registry for local-only camps (the common case in tower-1).
SubscriptionHealth
Health event emitted by the supervisor itself.
Supervisor
Per-rule subscription supervisor.

Enums§

SubscriptionHealthKind

Traits§

EventStream
Non-blocking event stream from a scryer subscription.
PeerRegistry
Known remote peers in the yubaba mesh.
SubscriptionSource
Source of scryer subscriptions. One implementation per machine (local + one per remote peer).