#809 INVESTIGATE: durable event-wait can hang (approval wake missed under load) (#agentic)
Description
EditEvidence: in the full harness, a run stayed 'sleeping' 301s after its approval was rejected by the sweeper at ~12s (emit_event fired). Patched with a wait-force (timeout_at=now()) but NOT root-caused. jumper.emit_event DOES durably re-queue (UPDATE r_<queue> SET state='pending' WHERE run_id IN affected AND state='sleeping'), so it's not a pure NOTIFY-miss. Hypotheses: (H1) tenant mismatch in emit_event scoping (w.tenant_id=$4 or $4='default'); (H2) lost-wakeup race - emit deletes wait + re-queues only if state='sleeping'; if the run re-parks (replay) around the emit, or wait_for_event doesn't peek an already-emitted event before parking, the wake is lost; NULL-timeout waits then have NO safety net (SleepingTaskWakeupService only sweeps timeout_at IS NOT NULL). Investigating emit_event tenant default, wait_for_event park/peek logic, and the wait-register SQL. Signal-wake + call_agent joins share this path.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...