Repository navigation
fix(dispatch): diagnose GitHub rate-limited responses - #401
Merged
Merged
Conversation
what changed: Classify rate-limited 403 responses from GitHub headers or message for dispatch and run reads; preserve Retry-After and reset time. why: Rate limits and token permissions both use 403, so diagnostics should identify the actual cause. No alternative design was set aside. what it touched: dispatch library/tests, architecture, changelog and test inventory; no retry policy or public interface. what you verified: verified - red-first 32 passes/1 expected failure, then 33 dispatch tests pass; handoff OK, preflight PASS, doctor READY. Full gate is running. what you got wrong and fixed: nothing to report.
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.
GitHub rate-limit 403 responses were reported as token-permission failures, dropping the reset time. Dispatch and run lookup now recognize primary and secondary rate limits from response headers or the body and return RATE_LIMITED with Retry-After and/or reset-time guidance. Ordinary permission refusals keep the existing FORBIDDEN diagnosis.
Fixes #374
what changed: Added shared 403 rate-limit classification for dispatch and run reads; preserved Retry-After seconds and the UTC x-ratelimit-reset value; tested header-based and body-only secondary-limit cases.
why: GitHub uses 403 for both permission failures and rate limits. Its documented response signals allow the client to explain the actual cause without changing retry policy.
what it touched: dispatch library and tests, dispatch architecture row, changelog and README test inventory. No public option or automatic retry behavior changed.
what you verified: verified - red-first 32 passed and 1 expected failure, then 33 dispatch tests passed; handoff OK, preflight PASS, doctor READY. The required full commit gate accepted b439cf9. GitHub CI passed all seven required jobs (run 38431464324).
what you got wrong and fixed: nothing to report.