Files
codex/codex-rs/core/src/unified_exec
jif 4d517cce4a Preserve process state across concurrent unified exec updates (#62557)
## Why

Process lifecycle handlers could overwrite each other's updates by reading
and replacing the entire state. For example, a rejected stdin write could
restore an older snapshot after the output collector recorded an exit code.

## What changed

Apply lifecycle transitions in place under the watch channel's write lock.
Rejected stdin writes and confirmed termination only mark the process as
exited, preserving any exit code already reported by the executor.

## Testing

Regression tests cover both closed stdin and unknown-process responses.
They verify that subsequent lifecycle updates preserve the exit code and
sandbox denial recovered from the final read, and that repeated calls to
`fail_and_terminate` preserve the first failure message.

GitOrigin-RevId: f090c0860c86b6e668c31d122d986ea4f4a119b6
2026-11-19 17:33:26 +00:00
..