-
Notifications
You must be signed in to change notification settings - Fork 355
Fix Codex smoke gateway auth by syncing converted config into writable CODEX_HOME #27418
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
Changes from 7 commits
15f737d
cfc17b1
53ada6b
18d23dc
9b5f377
1c05837
76e2ee4
bfe5f73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,6 +250,19 @@ func TestCodexEngineRenderMCPConfig(t *testing.T) { | |
| "}", | ||
| "}", | ||
| "GH_AW_MCP_CONFIG_NORM_EOF", | ||
| "", | ||
| "# Sync converter output to writable CODEX_HOME for Codex", | ||
| "mkdir -p /tmp/gh-aw/mcp-config", | ||
| "cat > \"/tmp/gh-aw/mcp-config/config.toml\" << GH_AW_CODEX_SHELL_POLICY_NORM_EOF", | ||
| "[shell_environment_policy]", | ||
| "inherit = \"core\"", | ||
| "include_only = [\"CODEX_API_KEY\", \"GITHUB_PERSONAL_ACCESS_TOKEN\", \"HOME\", \"OPENAI_API_KEY\", \"PATH\"]", | ||
| "GH_AW_CODEX_SHELL_POLICY_NORM_EOF", | ||
| "cat \"${RUNNER_TEMP}/gh-aw/mcp-config/config.toml\" >> \"/tmp/gh-aw/mcp-config/config.toml\"", | ||
| "chmod 600 \"/tmp/gh-aw/mcp-config/config.toml\"", | ||
| "mkdir -p \"${CODEX_HOME}\"", | ||
| "cp \"/tmp/gh-aw/mcp-config/config.toml\" \"${CODEX_HOME}/config.toml\"", | ||
| "chmod 600 \"${CODEX_HOME}/config.toml\"", | ||
| }, | ||
| }, | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good addition of test cases for the CODEX_HOME sync logic. The test covers the shell environment policy normalization. It would be helpful to also include a test case where |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactoring of
getShellEnvironmentPolicyVarsto return[]stringis clean and improves testability. Consider adding a brief comment explaining what the returned slice contains (sorted env var names needed by MCP servers) since the comment was moved to the outer function.