Expand description
Pool-related reducer handlers. Extracted from reducer/mod.rs in task #182 PR-B for navigability.
Functionsยง
- handle_
report_ ๐host_ pool_ count - Phase B.4 follow-up โ pool-only drift check. Called from
spawn_pool_windowwhere the windows dimension is mid-flight (close path hasnโt completed). Compares only the pool dimension; emitsDriftDetected { kind: Pool, ... }on mismatch. - handle_
report_ ๐pool_ drain_ decision - Phase F.6 โ host-emitted signal carrying the result of the
post-close drain-pool-if-last decision. Maps
was_lastdirectly to the corresponding terminal event for Step 2 of the window-cleanup-cascade saga: - handle_
report_ ๐pool_ window_ added - Phase B.4 follow-up โ record pool inventory growth. Idempotent on duplicate labels (HashSet semantics) but the event still fires so subscribers can track add-attempts even if redundant.
- handle_
report_ ๐pool_ window_ promoted - Phase F.5 โ host-emitted promote signal. The reducer doesnโt mutate
state for this command (the windows/pool transitions are carried by
the surrounding
ReportPoolWindowRemoved+ReportWindowOpenedpair); it just translates the wire command into the corresponding typed event so subscribers โ most importantly the launcher saga coordinator โ can react. - handle_
report_ ๐pool_ window_ removed - Phase B.4 follow-up โ record pool inventory shrink (promote or
destroy). Strictly paired with
ReportPoolWindowAdded: an unknown-label remove is a silent no-op so subscribers can rely on add/remove pairing in the broadcast stream. Same gate ashandle_report_window_closed. (reagent P2 PR #577 round-3 โ the original โidempotentโ comment referenced behavior that was already removed forReportWindowClosed; pool semantics now match.)