-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix: add integration tests for codex-exec-mcp-server with execpolicy #7617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+516
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8eae627 to
73c4d19
Compare
zhao-oai
approved these changes
Dec 5, 2025
28c11b6 to
ce279a3
Compare
11082c5 to
b54a7c5
Compare
bolinfest
added a commit
that referenced
this pull request
Dec 5, 2025
When trying to introduce an integration test for the `codex-shell-tool-mcp` in #7617, macOS CI hit serde decode errors in the escalation pipe when huge env vars inflated the `EscalateRequest` payload past the stream frame, corrupting JSON. (I'm pretty sure `$GITHUB_EVENT` was the offending env var.) This PR updates `exec-server` to filter out oversized env entries and skip reserved vars before serialization. It also updates the code to avoid attaching empty `SCM_RIGHTS` control messages so frames stay lean when no FDs are sent.
bolinfest
added a commit
that referenced
this pull request
Dec 5, 2025
When trying to introduce an integration test for the `codex-shell-tool-mcp` in #7617, macOS CI hit serde decode errors in the escalation pipe when huge env vars inflated the `EscalateRequest` payload past the stream frame, corrupting JSON. (I'm pretty sure `$GITHUB_EVENT` was the offending env var.) This PR updates `exec-server` to filter out oversized env entries and skip reserved vars before serialization. It also updates the code to avoid attaching empty `SCM_RIGHTS` control messages so frames stay lean when no FDs are sent.
e0cdb7a to
657d5e0
Compare
bolinfest
added a commit
that referenced
this pull request
Dec 7, 2025
When I put up #7617 for review, initially I started seeing failures on the `ubuntu-24.04` runner used for Rust test runs for the `x86_64-unknown-linux-gnu` architecture. Chat suggested a number of things that could be removed to save space, which seems to help.
bolinfest
added a commit
that referenced
this pull request
Dec 7, 2025
…ixes (#7680) As noted in the code comment, we introduced a key fix for `brew` in Homebrew/brew#21157 that Codex needs, but it has not hit stable yet, so we update our CI job to use latest `brew` from `origin/main`. This is necessary for the new integration tests introduced in #7617.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces integration tests that run codex-shell-tool-mcp as a user would. Note that this requires running our fork of Bash, so we introduce a DotSlash file for
bashso that we can run the integration tests on multiple platforms without having to check the binaries into the repository. (As noted in the DotSlash file, it is slightly more heavyweight than necessary, which may be worth addressing as disk space in CI is limited: #7678.)To start, this PR adds two tests:
list_tools()makes thelist_toolsrequest to the MCP server and verifies we get the expected responseaccept_elicitation_for_prompt_rule()defines aprefix_rule()withdecision="prompt"and verifies the elicitation flow works as expectedThough the
accept_elicitation_for_prompt_rule()test only works on Linux, as this PR reveals that there are currently issues when running the Bash fork in a read-only sandbox on Linux. This will have to be fixed in a follow-up PR.Incidentally, getting this test run to correctly on macOS also requires a recent fix we made to
brewthat hasn't hit a mainline release yet, so getting CI green in this PR required #7680.