Skip to content

docs(api): update rate-limits page to the new POLS wire (TRA-879)#199

Merged
mikestankavich merged 1 commit into
mainfrom
docs/tra-879-rate-limits-pols-wire
May 29, 2026
Merged

docs(api): update rate-limits page to the new POLS wire (TRA-879)#199
mikestankavich merged 1 commit into
mainfrom
docs/tra-879-rate-limits-pols-wire

Conversation

@mikestankavich
Copy link
Copy Markdown
Contributor

Brings /docs/api/rate-limits in line with the rate-limit header rework from TRA-878 / PR #438 (merged + live on preview, build +438). The page documented the old wire and now contradicts the live API; this rewrites it to the new contract. (TRA-879 was originally filed as "add a page" — it was the wrong slug; the page already existed, so this is an update.)

What changed (old → new wire)

  • X-RateLimit-Limit — now the burst ceiling 120 (was documented as steady-state 60).
  • X-RateLimit-Remaining — now decrements 1:1 from Limit0 and is a valid pacing signal. Removed the old "don't pace on this header" warning and the observability-not-pacing framing.
  • RateLimit-Policynew header, 60;w=60 (quota;w=window-seconds) carries the sustained rate; this is where "60/min" now lives.
  • X-RateLimit-Reset — seconds until the bucket refills to the ceiling.
  • Added a verified "what you'll observe" example (fresh bucket: req1 Remaining 119 → req120 0 → req121 429 Retry-After 1) and reframed client guidance to: pace burst off X-RateLimit-Remaining, sustained off RateLimit-Policy, back off on 429 + Retry-After.
  • 429 contract: type: rate_limited, Retry-After delta-seconds floored at 1, request_id mirrored in X-Request-Id.

Verification

  • Live wire confirmed on app.preview.trakrf.id: x-ratelimit-limit: 120, ratelimit-policy: 60;w=60, x-ratelimit-remaining decrementing, and the header set rides a 401.
  • Header descriptions mirror the merged OpenAPI spec component wording (RateLimitPolicy, XRateLimitLimit, XRateLimitRemaining, XRateLimitReset).
  • pnpm build passes (links/anchors resolve).
  • Final visual check on docs.preview.trakrf.id once the preview deploy lands.

Closes TRA-879.

🤖 Generated with Claude Code

TRA-878 / PR #438 reworked the rate-limit headers (merged + live on
preview, build +438); the existing /docs/api/rate-limits page documented
the OLD wire and now contradicts the live API. Bring it in line, verified
against the live preview headers and the merged OpenAPI spec descriptions:

- X-RateLimit-Limit is now the BURST CEILING (120), not the steady-state
  (was documented as 60).
- X-RateLimit-Remaining now decrements 1:1 from Limit->0 and IS a valid
  pacing signal — removed the old "don't pace on this header" guidance.
- RateLimit-Policy (NEW header) carries the sustained rate as 60;w=60;
  this is where "60/min" now lives.
- X-RateLimit-Reset = seconds until the bucket refills to the ceiling.
- Added a verified "what you'll observe" example (fresh bucket: req1
  Remaining 119 -> req120 0 -> req121 429 Retry-After 1) and reframed the
  client-behavior guidance to "pace burst off Remaining, sustained off
  RateLimit-Policy, back off on 429 + Retry-After."

Live wire confirmed on app.preview.trakrf.id: x-ratelimit-limit: 120,
ratelimit-policy: 60;w=60, x-ratelimit-remaining decrementing, headers ride
a 401. Header wording mirrors the spec's component descriptions.
@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://docs.preview.trakrf.id

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 29, 2026

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9eba79
Status: ✅  Deploy successful!
Preview URL: https://f06709e0.docs-4n7.pages.dev
Branch Preview URL: https://docs-tra-879-rate-limits-pol.docs-4n7.pages.dev

View logs

@mikestankavich mikestankavich merged commit 6486582 into main May 29, 2026
2 checks passed
@mikestankavich mikestankavich deleted the docs/tra-879-rate-limits-pols-wire branch May 29, 2026 20:20
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.

1 participant