Skip to content

Reduce overhead in CLI integration tests - #62153

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22
Nov 18, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Reduce overhead in CLI integration tests

Why

SSE-only mocks return 404 on WebSocket upgrades by default, causing
retries before the tests reach the HTTP stream. In parallel runs, each
CLI subprocess can also start a Tokio worker per host CPU.

What changed

  • Share an SSE mock that returns HTTP 426 on WebSocket upgrades to
    trigger immediate HTTP fallback. Reuse it in the fallback test.
  • Set TOKIO_WORKER_THREADS=2 for CLI subprocesses launched by the
    affected test helpers. Run streaming and resume cases that don't need
    the repository checkout in temporary working directories.
  • Test promptless codex exec fork option validation without creating a
    source thread. In the successful promptless fork case, keep stdin
    open and rely on the test runner's timeout to catch a blocked read.

## Why

SSE-only mocks return 404 on WebSocket upgrades by default, causing
retries before the tests reach the HTTP stream. In parallel runs, each
CLI subprocess can also start a Tokio worker per host CPU.

## What changed

- Share an SSE mock that returns HTTP 426 on WebSocket upgrades to
  trigger immediate HTTP fallback. Reuse it in the fallback test.
- Set `TOKIO_WORKER_THREADS=2` for CLI subprocesses launched by the
  affected test helpers. Run streaming and resume cases that don't need
  the repository checkout in temporary working directories.
- Test promptless `codex exec fork` option validation without creating a
  source thread. In the successful promptless fork case, keep stdin
  open and rely on the test runner's timeout to catch a blocked read.

GitOrigin-RevId: 94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22 branch from f1f2066 to 3aaa23a Compare November 18, 2026 01:49
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-18T01:49:09.143845Z f1f2066 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 3aaa23a into main Nov 18, 2026
11 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/94c20d4b2fd7cc65bc0f2a1cd0318ac188f59f22 branch November 18, 2026 01:49
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2026

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants