{{ message }}
fix(proxy): passthrough /rate_limit for CLI proxy liveness probe#7187
Merged
Conversation
The gh CLI liveness probe calls GET /rate_limit to verify connectivity. The DIFC proxy blocked this as an unrecognized endpoint (HTTP 403), causing the cli-proxy sidecar to fail fast. Add /rate_limit to the passthrough list alongside /meta. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DIFC proxy to allow the gh CLI’s initialization/liveness checks to succeed by explicitly passing through the GET /rate_limit metadata endpoint (similar to the existing /meta passthrough), preventing a fail-closed 403 on an otherwise safe read-only call.
Changes:
- Add
GET /rate_limitto the proxy passthrough allowlist alongsideGET /meta. - Add a unit test verifying
/api/v3/rate_limitis forwarded upstream as/rate_limitand returns successfully.
Show a summary per file
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

The gh CLI liveness probe calls
GET /rate_limitto verify connectivity. The DIFC proxy was blocking this as an unrecognized endpoint (HTTP 403), causing the cli-proxy sidecar to fail fast and prevent agent startup.Root cause:
/rate_limitis a GET request that enters the "read operation" path, butMatchRoute()returns nil for it, triggering the fail-closed "access denied: unrecognized endpoint" response.Fix: Add
/rate_limitto the passthrough list alongside/meta— both are safe read-only metadata endpoints used byghCLI for initialization.Affected: Any workflow using
features.cli-proxy: trueorfeatures.difc-proxy: truewith mcpg >= v0.3.23.Reported via: https://github.com/github/gh-aw/actions/runs/27112965256/job/80016366723?pr=37708