omnigraph/crates/omnigraph-server/src
Ragnor Comerford c745dd69ae
server: emit Retry-After header on 429 / 503 responses
Closes the doc-vs-code gap at api.rs:343 and lib.rs:344-355: the
documentation claims `Retry-After` is set on TooManyRequests /
ServiceUnavailable responses, but `IntoResponse for ApiError`
emitted only `(StatusCode, Json(ErrorOutput))` — no header.

Wires a constant `RETRY_AFTER_SECONDS = "60"` for both 429 and 503
codes. Plumbing per-RejectReason durations through is a follow-up;
the admission rejects we surface today recover bounded by request
handler duration rather than calendar wait, so a constant suffices.

Pinned by `ingest_per_actor_admission_cap_returns_429`. Test now
fully green: 1+ of 8 concurrent /ingest under cap=1 receives 429
with Retry-After: 60.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 16:58:47 +02:00
..
api.rs server: flip AppState to Arc<Omnigraph>, wire admission on /change (PR 2 Step F) 2026-05-07 17:08:26 +02:00
auth.rs Add aws feature + SecretsManagerTokenSource backend 2026-04-18 03:48:51 +03:00
config.rs Rename config targets to graphs 2026-04-14 04:12:14 +03:00
lib.rs server: emit Retry-After header on 429 / 503 responses 2026-05-08 16:58:47 +02:00
main.rs Initial public Omnigraph repository 2026-04-10 20:49:41 +03:00
policy.rs MR-771: demote Run to direct-publish via expected_table_versions CAS 2026-04-30 08:52:50 +02:00
workload.rs server: add WorkloadController for per-actor admission (PR 2 Step E) 2026-05-07 16:59:45 +02:00