Skip to content

Serialize legacy Windows PowerShell sandbox tests#19453

Merged
dylan-hurd-oai merged 2 commits into
mainfrom
codex/fix-windows-powershell-tests
Apr 24, 2026
Merged

Serialize legacy Windows PowerShell sandbox tests#19453
dylan-hurd-oai merged 2 commits into
mainfrom
codex/fix-windows-powershell-tests

Conversation

@dylan-hurd-oai

@dylan-hurd-oai dylan-hurd-oai commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Why

Recent main CI had repeated Windows timeouts in the legacy sandbox process tests:

These failures were 30s timeouts on Windows x64 and/or arm64 rather than assertion failures.

Root Cause

The active legacy Windows sandbox process tests all exercise host-level resources: sandbox setup, ACL/user state, private desktop process launch, stdio capture, and PowerShell/cmd child cleanup. Running several of these tests concurrently can leave them competing for the same Windows sandbox setup path and process/session resources, which makes command startup or output collection hang under CI load.

What Changed

  • Added a shared in-process mutex for the active legacy Windows sandbox process tests.
  • Held that guard across each legacy cmd/PowerShell process test so those host-resource-heavy cases run one at a time.
  • Kept the skipped legacy cmd TTY tests unchanged.

Why This Should Be Reliable

The tests still use unique homes and run the real legacy sandbox process path, but they no longer overlap the fragile host-level setup and process/session lifecycle. Serializing just this small group removes the concurrency race without reducing the behavioral coverage of each test.

Verification

  • cargo test -p codex-windows-sandbox
  • GitHub Windows CI is the primary validation signal for the affected tests; on this PR, Windows clippy, Windows release, and Windows local Bazel passed after the serialization fix.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc8f32f421

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/windows-sandbox-rs/src/unified_exec/tests.rs Outdated
@dylan-hurd-oai dylan-hurd-oai merged commit 32aad7b into main Apr 24, 2026
35 of 36 checks passed
@dylan-hurd-oai dylan-hurd-oai deleted the codex/fix-windows-powershell-tests branch April 24, 2026 23:18
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
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.

2 participants