Skip to content

fix(config): pin nil-key case in process overrides (#2031 item 7) - #2038

Merged
Dumbris merged 2 commits into
mainfrom
claude/fix-2031-item7-nil-key-pin-c11a9b
Nov 25, 2026
Merged

Dumbris merged 2 commits into
mainfrom
claude/fix-2031-item7-nil-key-pin-c11a9b

Conversation

@Dumbris

@Dumbris Dumbris commented Nov 25, 2026

Copy link
Copy Markdown
Member

Item 7 of #2031 ("nil-key case in internal/config/process_overrides.go, around the OAuth key override") does not match current code: process_overrides.go has no OAuth key override (oauth_token_encryption_key is resolved by ResolveOAuthTokenKey and pinned by runtime/restart_gated.go). No defect found; this PR adds test-only pins for the nil cases that are reachable:

  • ResolveOAuthTokenKey(nil): no panic, nil key when no source is selected, env key resolves without a config.
  • Key file via MCPPROXY_OAUTH_TOKEN_ENCRYPTION_KEY_FILE resolves with secret_file_dirs nil, empty, or pointing elsewhere (stays ungated).
  • OverrideForProcess with a nil value on a config with no security block does not create the block, and PersistableConfig does not panic or add it.

No production code changed, so test-api-e2e.sh was not run. go test -race ./internal/config/... passes. golangci-lint (bare and --build-tags server) reports only an existing reflect.Ptr finding in zero_value_preservation_test.go.

refs #2031

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

@Dumbris
Dumbris enabled auto-merge (squash) November 25, 2026 11:46
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/fix-2031-item7-nil-key-pin-c11a9b

Available Artifacts

  • archive-darwin-amd64 (33 MB)
  • archive-darwin-arm64 (30 MB)
  • archive-linux-amd64 (21 MB)
  • archive-linux-arm64 (19 MB)
  • archive-windows-amd64 (33 MB)
  • archive-windows-arm64 (29 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (29 MB)
  • installer-dmg-darwin-arm64 (27 MB)
  • smart-mcp-proxymcpproxy-goQ4A6AC.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 45597005581 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit 7f0d65b into main Nov 25, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants