feat(forge): surface rate-limit retry hint on the forge error channel (RIG-2255) - #750
Merged
Merged
Conversation
|
Compass engineering docs preview: https://compass-forge-rig-2255-retry-j22p.compass-eng-docs.pages.dev Deployed from |
… (RIG-2255) Implements the frozen retry-after design (#653). A forge budget skip now carries how long until the fail-fast gate re-opens, so callers get a truthful `ForgeCallError.retry_after_ms` instead of a constant 0. - forge.RateLimitError: a typed skip carrying RetryAfter, unwrapping to ErrBudgetExhausted so every existing errors.Is skip-contract site keeps matching while errors.As recovers the hint at the mapForgeError chokepoint. - GitHub + Linear: gateBlocked() now returns the remaining wait alongside the armed flag; every fail-fast site and both live 429/RATELIMITED classifiers emit *RateLimitError (reset instant computed once; 0 hint when no usable header, gate still self-arms with the bounded default skip). - server.mapForgeError: the budget-exhausted arm recovers *RateLimitError via errors.As and clamps RetryAfter to [0, math.MaxUint32] ms before the uint32 cast (negative -> 0, oversized -> saturates); proto/doc comments rewritten from the stale always-0 note to the widened fail-fast-reset semantics. - Regression pins on both reconcile sweep abort branches prove the typed error still takes the ErrBudgetExhausted path. Refs RIG-2255 Co-authored-by: Matt Wilkinson <matt@rigel.build>
…2255) Address review lows on PR #750: - add a table case proving an oversized RateLimitError hint saturates at math.MaxUint32 (exercises the forge.go clamp upper arm) - rename the table field wantRetryMsID -> wantRetryMs (the ID suffix was a copy-paste artifact; the value is a ms count, not an identifier) Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-forge/rig-2255-retry-after
branch
from
August 30, 2026 21:00
b582fd3 to
2c0fa41
Compare
rigel-mintaka
marked this pull request as ready for review
August 30, 2026 21:12
mattwilkinsonn
approved these changes
Aug 30, 2026
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.
Implements the frozen retry-after design (#653). A forge budget skip now
carries how long until the fail-fast gate re-opens, so callers get a truthful
ForgeCallError.retry_after_msinstead of a constant 0.ErrBudgetExhausted so every existing errors.Is skip-contract site keeps
matching while errors.As recovers the hint at the mapForgeError chokepoint.
armed flag; every fail-fast site and both live 429/RATELIMITED classifiers
emit *RateLimitError (reset instant computed once; 0 hint when no usable
header, gate still self-arms with the bounded default skip).
errors.As and clamps RetryAfter to [0, math.MaxUint32] ms before the uint32
cast (negative -> 0, oversized -> saturates); proto/doc comments rewritten
from the stale always-0 note to the widened fail-fast-reset semantics.
still takes the ErrBudgetExhausted path.
Refs RIG-2255
Co-authored-by: Matt Wilkinson matt@rigel.build