Repository navigation
cli: make the codex-subagent end-to-end test pass the wrapper check - #314
Merged
Merged
Conversation
TestCodexSubagentMCP drove the server with a #!/bin/sh fake codex, but refuseWrapper (fdedc37) rejects every executable whose first bytes are "#!": a script can prepend --dangerously-bypass-approvals-and-sandbox, and that flag does not conflict with the -s the server passes, so the child would run unsandboxed. The server therefore exited before initialize and the one test that speaks MCP to the binary could never pass. The fixture is now a compiled Go helper built by the test, which is what the check accepts. refuseWrapper is unchanged and TestRefuseWrapper still covers the script, --yolo and bypass-flag cases. The README's environment-variables table was also behind the code. KLAUDIA_CODEXSUB_DEPTH, which this server reads and sets, had no row, and neither did six older variables the same test reports. Documenting them turns TestREADMEDocumentsEveryEnvVar green. Verified: make check (exit 0), including go test ./internal/codexsub/, ./internal/cli/ and ./cmd/klaudia/. Co-Authored-By: Klaudia <noreply@greenthread.ai>
Contributor
Author
|
no blockers (6aa52ac) Reviewed against origin/main 7c45a7f.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
TestCodexSubagentMCPdroveklaudia mcp codex-subagentwith a#!/bin/shfake codex, so it could never pass:refuseWrapper(fdedc37) rejects every executable whose first bytes are#!, because a script can prepend--dangerously-bypass-approvals-and-sandboxand that flag does not conflict with the-sthe server passes. The fixture is now a compiled Go helper the test builds itself (cmd/klaudia/testdata/fakecodex).refuseWrapperis unchanged, andTestRefuseWrapperstill covers the script,--yoloand bypass-flag cases.KLAUDIA_CODEXSUB_DEPTH(read and set by the codex-subagent server) and six older variables the same test reported:ANTHROPIC_BASE_URL,KLAUDIA_CURSOR_BLINK,KLAUDIA_DUMP_FAILED_REQUEST,KLAUDIA_MCP_CONNECT_TIMEOUT,KLAUDIA_MCP_TOOL_TIMEOUT,KLAUDIA_PROC_TAG.TestREADMEDocumentsEveryEnvVaris green.Closes the two gaps in the WI-1138 close-out review. No promotion to the native core (WI-1134): the item says to do that only if the MCP tool proves insufficient.
Verification
make checkexits 0, includinggo test ./internal/codexsub/,./internal/cli/and./cmd/klaudia/.