match_trigger

Function match_trigger 

Source
fn match_trigger(event: &Event) -> Option<Box<dyn Saga>>
Expand description

Inspect a bus event for “should this start a fresh saga?” Returns the constructed saga (boxed) on a hit; None otherwise.

Triggers wired to date:

  • F.5: Event::PoolWindowPromotedpool_respawn::PoolRespawn
  • F.6: Event::WindowClosedwindow_cleanup::WindowCleanupCascade

Future sagas extend this match.

CPD-4 — the coordinator no longer evicts same-kind in-flight sagas before spawn_saga; per-saga event correlation (Saga::on_event filters by ctx.saga_id) lets concurrent same-kind sagas coexist cleanly. The pre-CPD-4 evict-and-replace gate (PR #634 round 3) is removed in run_coordinator.