acme/api · issue #1212
Add rate-limit headers
This is a failed-checks example. Overview, Chat and Changes open an earlier sample stage, before this run.
acme/api · issue
Add rate-limit headers
Checks failed backend 91%
This is a failed-checks example. Overview, Chat and Changes open an earlier sample stage, before this run.
Checks for backendAttempt 1 · recorded in this sample
Contract tests API reviewer · Contract tests v3 · 2 of 24 failed
- GET /v1/orders sends X-RateLimit-Remaining
- header missing
- 429 response sends Retry-After in seconds
- sent a date instead
- 22 other contract tests passed
$ pnpm test:contract --filter rate-limit
PASS contract/rate-limit/limits.spec.ts (22)
FAIL contract/rate-limit/headers.spec.ts
✕ GET /v1/orders sends X-RateLimit-Remaining (41 ms)
Expected header "x-ratelimit-remaining" to be present
Received: content-type, x-ratelimit-limit, x-request-id
at contract/rate-limit/headers.spec.ts:18:31
✕ 429 response sends Retry-After in seconds (37 ms)
Expected: /^\d+$/ Received: "2026-09-27T11:40:12Z"
at contract/rate-limit/headers.spec.ts:44:29
Tests: 2 failed, 22 passed, 24 total
FailedSample
Review API reviewer · Claude Code · 1 note, not blocking
PassedSample
Codex red team T3 adds it. Starts after contract tests pass.
Not run yet
Checks for backendRecorded in this sample
Contract testsContract tests v3 · 2 of 24 failed
FailedSample
- GET /v1/orders sends X-RateLimit-Remaining
- 429 response sends Retry-After in seconds
✕ X-RateLimit-Remaining :18
header missing
✕ Retry-After in seconds :44
got "2026-09-27T11:40:12Z"
Tests: 2 failed, 22 passed, 24 total
Review passed · Claude Code · 1 note. Codex red team not run yet; T3 adds it after contract tests pass.
Likely cause
api/middleware/rateLimit.ts sets the limit header but not the remaining one, and writes Retry-After as a date.
Not available in this sample. Nothing runs here.