Files
pakrym-oai f5ffa46959 Preserve queued output for observers during code-mode termination (#48207)
## Why

Yield signals and queued runtime events can detach an observer during termination, before the remaining output has been drained.

## What changed

Track the active yield signal separately from the observer so termination can disable yielding while keeping the observer attached. Ignore `Started`, `Pending`, and `YieldRequested` events during termination, allowing queued output to reach the observer in `CellEvent::Terminated`.

## Testing

Extend the termination regression test with an immediate yield timeout, a canceled yield signal, and queued start, yield, output, and completion events. Assert that both the termination caller and the initial observer receive the queued output in the terminated event.

GitOrigin-RevId: 1c08bdec06838123aaa102268da2f50b63ddea3f
2026-09-25 20:34:52 +00:00
..