hack/swagger-check: check routes registered on subrouters #29594
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 298 lines diff across 3 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.341
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #29594"
general
weight: 0.35
mheon
hack/swagger-check only matched routes registered on a router named r, so the
12 routes in register_manifest.go, which uses v3 and v4 subrouters, were never
checked. Corrupting a swagger comment in that file passes today, while the same
corruption in any other register_.go file is caught.
This tracks subrouter prefixes so the full endpoint can be rebuilt, handles PUT,
and lets one swagger comment cover consecutive registrations. Five manifest
operation names cannot be derived from method and path, so they are listed as
explicit exceptions.
Adds hack/swagger-check.t with regression tests for the above, wired into
.check-self-tests alongside the other self-tests. There are no mismatches in the
tree today, so this changes no existing result: I ran the old and new script over
each register_.go separately and the verdicts are identical.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
``
release-note
``None