Repository navigation
fix(codex): synchronize manual account pause across matching main and pool entries - #6624
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (24)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request has been marked Ready for Review. |
Read the main auth file through the bounded reader under the pinned claim path, keep pool-only pause/resume working when the Codex home is absent or holds an API-key-only login, and fail closed on unreadable or malformed main credentials. Sync the six translated management API rows.
Independent security review (lane B5) — bound to head
|
…module Revert the shared auth-collision reader to dev and recognize a valid API-key-only auth.json through the same bounded reader in the pause group, so the change stays off the restricted credential surface.
Independent security review (lane B5) — bound to head
|
|
Maintainer integration (lidge-jun, dev only) — 2026-10-05 bug triage round 2, lane B5.
|
Summary
When the same ChatGPT account and workspace appears as both the native main login (
__main__) and a managed pool entry, manually pausing one entry can leave its duplicate eligible for selection. Fallback routing can then immediately choose that duplicate.This change synchronizes manual pause and resume in the management API across existing entries with a confirmed matching account/workspace identity and normalized email:
affectedAccountIdsfromPUT /api/codex-auth/accounts/pause. Clients can re-read the account list to observe synchronized state.pausedCodexAccountIdsformat and per-entry automatic quota policies; routing performs no additional identity reads.The final patch contains the backend implementation, regression tests, and documentation. It adds no frontend files or presentation changes. Explicit maintainer security review remains pending for the credential identity and management boundary.
Verification
Current base:
0511f458f1(dev). Current head:ff6cec014e. The branch was synchronized withdevusing a merge after removing the presentation changes.bun run typecheck— passed on the current head.bun test tests/codex-integration/codex-linked-account-pause.test.ts tests/codex-integration/codex-auth-api.test.ts tests/codex-integration/codex-routing.test.ts tests/codex-integration/codex-auth-context.test.ts tests/lab/core-lab-boundary.test.ts tests/ci-workflows/file-size-ratchet.test.ts— 649 passed, 1 skipped, 0 failed on the current head. The linked-pause cases cover both main/pool directions, fallback and pin release, persistence, resume, unrelated identities, ownership contention, unreadable main identity, conflicting workspace claims, and selected workspace versus organization membership.bun run structure:check,bun run privacy:scan, andgit diff --check— passed.cd docs-site && bun install --frozen-lockfile && bun run build— passed (561 pages and internal-link validation).git diff origin/dev...HEAD -- gui— empty: there are no presentation changes in the final patch.bun run test:changed— not passed and incomplete. The parsed import graph expanded this 18-file diff to 1,518 of 2,079 test files. The run was explicitly interrupted with SIGTERM (exit 143) after recording 22 failure entries, including Anthropic Fast and provider management validation. Given that broad scope and the already recorded baseline failures, this update uses the documented resource exception inAGENTS.md: the current-head focused backend regression remains mandatory and passed, while broader compatibility coverage and exact-head hosted CI remain pending. Interruption is not a successful test result, and the failures have not all been independently classified.Historical evidence from the previous head
8e8fa7a3e8, based one53c8077e4: the new backend regression failed before the fix; the full local suite recorded 42 failures, with 21 provider management/verbosity failures reproduced on an unchanged baseline. That full run is not evidence for the current head, and no current full-suite pass is claimed. Hosted CI and maintainer review remain pending. Tests use isolated fixtures; no installed service, real-account login, or credentials were modified.Checklist
Review readiness checklist
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Readiness boxes ticked by maintainer @lidge-jun during the 2026-10-05 bug triage round 2 (lane B5). Per owner instruction no tests were run locally; local validation was limited to static checks and tests ran in hosted CI at the exact head.
Maintainer update (lane B5), head
3468db3355c62c2a6d5e6f838758174fa1b17bf1Merged current
dev. Changes:auth.jsonis read through the bounded reader at the claim's pinned path.auth.jsonallows pool-only grouping.codex-linked-account-pause.test.ts.No local tests were run, per owner instruction. Static checks at this head:
bun run typecheck,bun run structure:check,bun run privacy:scan, andbun scripts/file-size-ratchet.tsall exit 0. Behavioral evidence comes from hosted PR CI at this head.Independent security review at this head: PASS (see PR comment).
API-key-only recognition lives in the pause module, so
src/codex/auth-collision.tsis unchanged fromdevand the PR stays off the restricted credential surface.