Files
codex/codex-rs
jif ebd5c2fddc Make unified exec output closure race-safe (#63664)
## Why

The output collector could miss a closure notification while starting its
post-exit wait. It could also see an empty buffer just before the producer
appended its final chunk and closed the stream.

## What changed

Use a dedicated `CancellationToken` to signal when the output producer is
done. The collector samples closure before draining the buffer so that
closure during the drain wakes it for another pass. The streaming watcher
flushes queued chunks when it observes closure, and sandbox denial checks
can proceed immediately when output is already closed.

## Testing

Update the bounded collection test to verify that closure alone wakes
the post-exit collector and that the final bytes survive repeated drains.

GitOrigin-RevId: 4b94a018d784664031f326ec360d27fcf166bbda
2026-11-24 15:53:55 +00:00
..
…
…
…