Expand description
Dispatch engine: capture event payload, render trigger, record tower.dispatch audit trail.
When the supervisor (F3) surfaces a FiredEvent, the dispatch engine:
- Snapshots the context ring (recent matching events for the rule) and
inserts the current event, bounding context to
context_windowentries. - Records a dispatch intent into scryer before invoking the trigger —
idempotency: a mid-fire crash leaves a
Dispatchedrecord without a corresponding action; operator reconciles manually. - Calls the
TriggerHandler(F5 implementations) to render and fire the trigger. - On handler failure, records a
Failedaudit event with the structured cause. The matched event is NOT consumed; the supervisor can re-fire after the rule is fixed.
Architecture: .yah/docs/architecture/A052-yah-tower.md
Structs§
- Dispatch
Audit Event - Structured audit record written into scryer’s
tower.dispatchscope. - Dispatch
Context - Context handed to a
TriggerHandlerwhen a rule fires. - Dispatch
Engine - Dispatch engine: accepts
FiredEvents from the supervisor and orchestrates context capture, audit recording, and trigger invocation. - Noop
Trigger Handler - No-op trigger handler: accepts all dispatches without taking action.
Enums§
- Dispatch
Error - Error returned by a
TriggerHandler. - Dispatch
Outcome - Whether the dispatch succeeded or failed.
- Trigger
Kind - Which of the three trigger families is being dispatched.
Traits§
- Dispatch
Recorder - Writes
DispatchAuditEvents into scryer’stower.dispatchscope. - Trigger
Handler - Renders and fires a trigger. Implemented per trigger family (F5).