Skip to content

refactor: let Pacing absorb the token bookkeeping - #56

Merged
Skeyelab merged 1 commit into
refactor/dashboard-treefrom
refactor/pacer
Sep 29, 2026
Merged

Skeyelab merged 1 commit into
refactor/dashboard-treefrom
refactor/pacer

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

ratelimit held only the Interval formula while ~120 lines of per-token
state (tokenPace, fetchCost, due, repriceTokens, Throttles) lived in the
poller, beside a second 403 backoff keyed by Org. ratelimit.Pacer now
owns all of it, keyed by token only: Due, LimitedUntil, Observe,
Failed, EndCycle, Throttles, with an injected clock.

A 403 now holds the token rather than the Org, so Orgs sharing a
token back off together instead of each collecting its own 403.

Closes #51


Stack created with GitHub Stacks CLI • Give Feedback 💬

ratelimit held only the Interval formula while ~120 lines of per-token
state (tokenPace, fetchCost, due, repriceTokens, Throttles) lived in the
poller, beside a second 403 backoff keyed by Org. ratelimit.Pacer now
owns all of it, keyed by token only: Due, LimitedUntil, Observe,
Failed, EndCycle, Throttles, with an injected clock.

A 403 now holds the token rather than the Org, so Orgs sharing a
token back off together instead of each collecting its own 403.

Closes #51
@Skeyelab
Skeyelab added this pull request to stack #59 September 29, 2026 03:19
@Skeyelab
Skeyelab merged commit 0a624db into main Sep 29, 2026
3 checks passed
@Skeyelab
Skeyelab deleted the refactor/pacer branch September 29, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: let Pacing absorb the token bookkeeping

1 participant