node: do not retry a provider that does not attest the required labels #954
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 217 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.322
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #954"
general
weight: 0.35
aojea
Same reasoning as #722, for the label check: when a provider's credential does not attest a label the caller requires, or one of the egress floor,
CallMCPToolno longer retries the call.connectMCPSessionWithRetrystops onErrAuthRejectedandErrProviderNotGranted, but a failed label check incheckProvidercarried neither, so it was retried as if the peer could not be reached. The provider presents the same credential on every attempt, so the call ran three handshakes, waited 1s and 2s, and returnedfailed after 3 retries: provider ... does not attest every label of ....This adds
ErrLabelsNotSatisfied, whichcheckProviderwraps around a failed label check, and the retry loop stops on it. An authorizer that stopped at a run limit is not wrapped, so a timeout is still retried and the facts and iterations limits keep their own handling from #842.Measured in Docker (
golang:1.26):| Test, refused call | Before | After |
|---|---|---|
|
TestCallMCPTool_LabelEnforcement(caller requiresregion=na-us) | 3.40s,failed after 3 retries| 0.38s, one refusal ||
TestCallMCPTool_EgressFloorEnforcement(floorjurisdiction=eu) | 3.42s,failed after 3 retries| 0.36s, one refusal |Both tests now check
errors.Is(err, ErrLabelsNotSatisfied)and that the call was not retried. They fail without the change, and still fail with only themcp.goline reverted.Not changed: the HTTP label gate (
VerifyProvider) still answers 403, and its messages are unchanged.Tested in Docker (
golang:1.26):go test ./internal/node/...,go test -race -count=5on theTestCallMCPTool_,TestCheckPeerLabels,TestLabelGateandTestVerifyPeerLabelstests,go vet, andgolangci-lintv2.14.0.