mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
The empty event-stream mock added in #597 races with the summarize-success path: consumeEventStream sees the empty stream end immediately and emits a "stream ended before terminal event" turn_failed which gets buffered before session.run has assigned its local turnId. The buffered event replays after startTurn returns, marks settled = true, and rejects completion — but session.run skips await completion because settled is true, leaving the rejection unhandled and tripping vitest. Yield session.idle so the stream resolves the turn the same way real OpenCode SSE does.