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
{{ message }}
Repository navigation
Commit 35d28a0
Browse filesBrowse the repository at this point in the historyBrowse files
Continue Patch 5 from `/Users/jun/Developer/new/700_projects/opencodex/devlog/280_codex-multi-auth-security-patch-plan/00_patch_plan.md` by replacing the current "every non-2xx is an account failure" behavior with a small explicit outcome taxonomy.
10
+
11
+
This phase is intentionally narrow:
12
+
13
+
- caller/model 4xx responses do not penalize the selected Codex account;
14
+
- credential failures immediately quarantine the selected Codex account;
15
+
- 5xx and provider-connect failures count toward transient failover;
16
+
- passthrough connect failures are recorded before returning the local 502, with a server-level integration test;
RFC 9110 separates HTTP status classes by semantics: 4xx is client error, 5xx is server error, 401 is authentication-specific, and Retry-After can accompany temporary unavailability or rate limiting. That means account health must not treat ordinary caller/model 400/404/422 responses as equivalent to provider outage or credential failure.
-`recordCodexUpstreamOutcome(config, accountId, 400 | 404 | 422)` does not increment upstream health and does not trigger account failover.
30
+
-`recordCodexUpstreamOutcome(config, accountId, 401)` marks the account as needing reauth and immediately makes future new threads pick another usable pool account when one exists.
31
+
-`recordCodexUpstreamOutcome(config, accountId, 403)` is treated as credential-specific for now and also quarantines the account.
32
+
-`recordCodexUpstreamOutcome(config, accountId, 500 | 502 | 503 | 504)` increments transient health and still honors `upstreamFailoverThreshold`.
- Passthrough upstream fetch failures in `src/server.ts` record a connect failure for the selected pool account before returning the local `502`.
35
+
- The server catch behavior is verified through `startServer(0)` and a loopback `POST /v1/responses` request against an unreachable passthrough base URL.
36
+
- Existing 2xx reset behavior remains unchanged.
37
+
- The public request log still uses safe provider labels only; no local account IDs or emails are introduced.
Updatetheoldtestnamed`three consecutive non-200 responses fail over future new threads`to`three consecutive transient failures fail over future new threads`.
0 commit comments