Skip to content

exec-server: use virtual time in Noise relay test - #31344

Merged
bolinfest merged 1 commit into
mainfrom
pr31344
Jul 7, 2026
Merged

exec-server: use virtual time in Noise relay test#31344
bolinfest merged 1 commit into
mainfrom
pr31344

Conversation

@bolinfest

@bolinfest bolinfest commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Why

fragmented_writes_yield_to_keepalive_and_queued_pong deliberately blocks WebSocket writes while exercising keepalive and queued-Pong scheduling. It previously advanced those states with wall-clock sleeps. Under a sufficiently delayed CI worker, those sleeps and scheduling gaps could consume the test-only 100 ms Pong-watchdog budget, causing the relay to exit and the next write-permit send to fail with TrySendError::Disconnected.

The failure was therefore a timing flake in the harness test, not evidence that the production relay mishandled a Pong.

What changed

  • Run this test with Tokio time paused.
  • Advance the virtual clock through its two keepalive transitions instead of sleeping in wall-clock time.
  • Enable Tokio's test-util feature only for codex-exec-server dev dependencies.

No production code or timeout values change.

Review guide

The behavioral change is confined to noise_relay/harness_tests.rs; the Cargo.toml change only exposes Tokio's paused-clock test APIs.

Validation

  • just test -p codex-exec-server fragmented_writes_yield_to_keepalive_and_queued_pong
  • just fix -p codex-exec-server
  • just bazel-lock-update (no lockfile changes)
@bolinfest
bolinfest marked this pull request as ready for review July 7, 2026 03:14
@bolinfest
bolinfest requested a review from richardopenai July 7, 2026 03:14
@bolinfest
bolinfest merged commit 9365b08 into main Jul 7, 2026
35 checks passed
@bolinfest
bolinfest deleted the pr31344 branch July 7, 2026 03:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants