test(updater): treat GitHub 429 secondary rate limits as skip, not failure - #36
Merged
Merged
Conversation
…ilure
TestRealVerify_EndToEnd_v1_12_5 calls the live GitHub attestations API
unauthenticated. isRateLimited() only matched "returned 403" and
"rate limit", but GitHub answers secondary/abuse throttling with 429 and
a body that says "abuse detection mechanism" — and spells the phrase
hyphenated ("abuse-rate-limits") in the docs URL. Neither pattern
matched, so throttling hard-failed the suite instead of skipping.
Widen the match to cover 429, the hyphenated spelling, and the abuse
detection wording. Test-only change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Problem
TestRealVerify_EndToEnd_v1_12_5failed onmain:The test calls the live GitHub attestations API unauthenticated and already intends to skip when throttled. But
isRateLimited()matched only"returned 403"and"rate limit". GitHub answers secondary throttling with 429, and that body says"abuse detection mechanism"— spelling the phrase hyphenated (abuse-rate-limits) only in the docs URL. Neither pattern matched, so throttling hard-failed the build.Re-running got a 403 instead and correctly skipped, confirming the failure is environmental, not a verification regression.
Fix
Widen the match to
returned 429,rate-limit, andabuse detection. Test-only.Verification
go test -count=1 ./...— passes (test skips when throttled, as designed).🤖 Generated with Claude Code