Files
codex/codex-rs/core/tests
Dylan Hurd 692292695b Fix timing races in core integration tests (#62564)
## Why

Steering can cancel a paused mock HTTP stream, realtime handoff and turn
events can arrive in either order, and streaming tools can run before the
response reports token usage. Tests that assume a fixed sequence can fail
depending on timing.

## What changed

- Pause the hooks test at assistant message completion so both queued prompts
  enter the same batch before the turn resumes.
- Track the handoff and turn events in one pass, waiting for the matching
  turn to complete on the unblocked path.
- Call `get_context_remaining` during the compaction fallback and assert
  zero remaining tokens using the preceding response's usage.

GitOrigin-RevId: ec8a108517c819d7087681e8e2c7b5b57f4b341e
2026-11-19 18:22:41 +00:00
..