You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[x] Replace deterministic `backoff *= 2` with full-jitter: `random(0, min(cap, base * 2^attempt))`
597
+
-[x] Add `max_retry_backoff_ms: u32 = 30_000` cap to `ClientConfig` to prevent unbounded growth
598
+
-[x] Use `std.crypto.random` for jitter (cryptographically secure, no seed needed)
599
+
-[x] Differentiate 429 vs 5xx in retry loop: 429 → `TooManyRequests`, 503 → `ClusterUnavailable`
600
+
-[x] On 429, use `Retry-After` header from response if present (seconds), fall back to jittered backoff
601
+
-[x] Unit tests: verify backoff values are within expected range, verify cap is respected
602
+
603
+
#### Phase 2 — Node Health Recovery (`src/pool.zig`)
604
+
-[x] Add `dead_since: ?i64 = null` field to `Node` — timestamp (ms) when marked unhealthy
605
+
-[x] Add `resurrect_after_ms: u32 = 60_000` to `ClientConfig` — minimum time before retrying a dead node
606
+
-[x] In `markUnhealthy`: set `dead_since = std.time.milliTimestamp()`
607
+
-[x] In `nextNode`: if all nodes are unhealthy, check if any node's `dead_since + resurrect_after_ms < now`; if so, try that node (give it a chance to recover)
608
+
-[x] On successful request to a resurrected node, clear `dead_since` and mark healthy
609
+
-[x] Unit tests: verify dead nodes are skipped, verify resurrection after timeout, verify healthy-on-success
610
+
611
+
#### Phase 3 — Auth Support (`src/pool.zig`, `src/client.zig`)
612
+
-[x] Wire existing `ClientConfig.basic_auth` (`"user:password"`) into pool as `Authorization: Basic <base64>` header
613
+
-[x] Add `api_key: ?[]const u8 = null` to `ClientConfig` — API key auth (`Authorization: ApiKey <key>`)
614
+
-[x]`basic_auth` and `api_key` are mutually exclusive — if both set, `basic_auth` takes precedence
615
+
-[x] Auth header is added via `extra_headers` on every request in `sendRequest`
0 commit comments