Repository navigation
fix(mcp): wire Claude OAuth prod deploy contract (PR6a) - #9256
Conversation
There was a problem hiding this comment.
1 issue found across 9 files
Confidence score: 3/5
- In
backend/deploy/runtime_env.yaml,backend-listennow gets bothMCP_OAUTH_CLIENTS_JSONand the per-client Claude OAuth vars, which can create conflicting sources of truth for OAuth client config and lead to production auth misconfiguration (for example wrong client metadata or redirect behavior); decide on one canonical config path (or define explicit precedence) and validatebackend-listenstartup/runtime behavior before merging.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/deploy/runtime_env.yaml">
<violation number="1" location="backend/deploy/runtime_env.yaml:306">
P2: The prod `backend-listen` environment now receives both the aggregate `MCP_OAUTH_CLIENTS_JSON` and the individual `MCP_OAUTH_CLAUDE_CLIENT_ID`, `MCP_OAUTH_CLAUDE_CLIENT_NAME`, and `MCP_OAUTH_CLAUDE_REDIRECT_URIS` secrets. In `database/mcp_oauth.py`, `get_client()` looks up the client first in the JSON and only falls back to the per-client env vars, so diverging values can silently change runtime behavior. The deploy-check script only validates presence, not consistency. Consider cross-validating the JSON against the per-client secrets (or removing the duplication) so drift is caught before deploy.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 241d179b4e
ℹ️ 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".
Related #9149 #8537 — add MCP_OAUTH_CLAUDE_* and MCP_OAUTH_CLIENTS_JSON to prod Helm/runtime_env, extend smoke authorize checks, pre-deploy gate, and remove stale desktop oauth_client_id fallback. Verification: python3 backend/scripts/check_mcp_oauth_deploy_contract.py cd backend && python3 -m pytest tests/unit/test_mcp_oauth.py -k claude -v cd backend && python3 -m pytest tests/unit/test_mcp_oauth_deploy_contract.py -v Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
241d179 to
bb5b39f
Compare
|
Monitor follow-up for PR #9256:
Verification passed:
|
kodjima33
left a comment
There was a problem hiding this comment.
MCP Claude OAuth deploy contract wiring — approve; deploy/secret-config sensitive, leaving merge to a human deploy
Merge order & dependencies
Summary
MCP_OAUTH_CLIENTS_JSON/MCP_OAUTH_CLAUDE_*intoruntime_env.yaml, Helm secrets, and prod backend-listen values.smoke_mcp_chatgpt_review.pyauthorize checks, addcheck_mcp_oauth_deploy_contract.py, and gatepre-deploy-check.sh.("oauth_client_id", "omi")automation fallback inMemoryExportService.swift.Deploy follow-up (PR6b): run backend-listen prod deploy +
smoke_mcpafter merge (requires deploy credentials; not done in this PR).Test plan
Merge with a regular merge (no squash).
Closes #9149
Closes #8537
Made with Cursor