Files
codex/codex-rs/app-server-transport
jif 0ef50c9f66 Prevent invalidated wakeups from starting a turn (#51427)
## Why

An interrupt or turn replacement can invalidate a pending-work wakeup while its turn context is being constructed. Task startup could then recreate a turn whose reservation was no longer active.

## What changed

- Recheck that the wakeup still owns the active turn reservation immediately before calling `start_task`, and return if it does not.
- Allow the remote-control re-enrollment test up to 45 seconds for the connection following reconnect backoff.

## Testing

Add a regression test that pauses wakeup context construction, processes an interrupt, and then resumes construction. It verifies that no additional turn starts and only the initial model request is sent.

GitOrigin-RevId: c857fdd9f0fac3790d35a95a1f21a6d41977bb29
2026-10-06 17:26:19 +00:00
..