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§
- Dedup
Key - Key for the dedup ring: identifies a (rule, event-scope, sequence-position) triple.
- Fired
Event - 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).
- Subscription
Health - Health event emitted by the supervisor itself.
- Supervisor
- Per-rule subscription supervisor.
Enums§
Traits§
- Event
Stream - Non-blocking event stream from a scryer subscription.
- Peer
Registry - Known remote peers in the yubaba mesh.
- Subscription
Source - Source of scryer subscriptions. One implementation per machine (local + one per remote peer).