Degrade transient optional list failures in Modern enumeration - #6348
Open
lorenzozanee wants to merge 1 commit into
Open
Degrade transient optional list failures in Modern enumeration#6348lorenzozanee wants to merge 1 commit into
lorenzozanee wants to merge 1 commit into
Conversation
A rate-limited Modern backend that answers an optional capability enumeration (resources/list, resources/templates/list or prompts/list) with a transient HTTP 429 was misclassified as ErrBackendUnavailable, flipping a reachable backend to unhealthy/degraded and aggregate Ready=false even though initialize and tools/list succeeded. Degrade a transient failure on an optional list to an empty result instead of failing the whole enumeration. tools/list stays fatal; the -32601 not-implemented degradation is unchanged. Fixes stacklok#6347 Signed-off-by: lorenzozanee <wyz0707@proton.me>
lorenzozanee
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
jerm-dro,
jhrozek and
tgrunnagle
as code owners
August 16, 2026 05:19
reyortiz3
approved these changes
Aug 17, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6348 +/- ##
==========================================
+ Coverage 72.96% 73.01% +0.05%
==========================================
Files 742 742
Lines 78236 78250 +14
==========================================
+ Hits 57085 57138 +53
+ Misses 17172 17117 -55
- Partials 3979 3995 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
A reachable Modern backend can be marked unavailable when an optional capability enumeration (resources/templates/list, resources/list or prompts/list) returns a transient HTTP 429. The 429 is classified as transient in the Modern layer, but the enumeration treated every error other than -32601 as fatal, so the transient failure surfaced as ErrBackendUnavailable and flipped the backend to unhealthy/degraded even though initialize and tools/list had succeeded. With several VirtualMCPServers probing the same rate-limited backend, aggregate Ready flips to False (BackendsDegraded).
A transient failure on an optional list now degrades to an empty result (with a WARN) instead of failing the whole enumeration. tools/list stays fatal: a backend that cannot list its tools is genuinely unavailable. The existing -32601 not-implemented degradation is unchanged.
Fixes #6347
Type of change
Test plan
task test)task test-e2e)task lint-fix)The regression tests fail on the base commit with the exact error from the report ("backend unavailable: failed to list resource templates ... modern backend returned a transient error: HTTP 429") and pass with the fix; the affected vmcp packages are green.
Special notes for reviewers
This fix targets the Modern path reported in #6347. The Legacy path still treats a 429 on optional enumeration as fatal; detecting the transient class there would require reaching into go-sdk internals and is left for a follow-up. This is orthogonal to #6246 (partialFailureMode wiring), which does not touch error classification.