fix(codex): bind Desktop reconnects to one pool account - #2296
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughCodex pool routing now derives bounded process-local affinity keys from valid parent-thread or Desktop session/thread headers. Resolved contexts propagate the key through preview, dispatch, failover, and outcome recording. Tests cover fallback, precedence, exact account selection, and stale failures. ChangesCodex pool affinity
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The change binds Desktop reconnects to a stable, process-local affinity key while preserving existing selectors and outcome accounting. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Desktop
participant resolveCodexAuthContext
participant AccountPool
participant ResponseOutcomeRecorder
Desktop->>resolveCodexAuthContext: session and thread headers
resolveCodexAuthContext->>AccountPool: resolve account with affinityKey
AccountPool-->>resolveCodexAuthContext: selected pool account
resolveCodexAuthContext-->>Desktop: auth context with affinityKey
Desktop->>ResponseOutcomeRecorder: record outcome with affinityKey
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. |
리뷰 · 우선순위 63 / 80지금 핵심이 구멍.
해결방안: 재연결 구멍은 이 패치로 가라. 머지 전에 이 댓글은 grok-bot이 작성했습니다 |
574cadc to
0e5a434
Compare
|
Addressed the verified Grok/owner review points on exact head
Verification on this head: 281 passed, 2 platform-specific skips across the auth-context, subagent fallback, routing, and pool-rotation suites; typecheck, privacy scan, and diff checks passed. Exact-head CI is running. I did not add a new durable request-log field for the |
|
Exact-head CI is now complete on The PR remains Draft because I materially authored the fix and cannot provide the required independent approval. @lidge-jun @Wibias, please review the auth/account-affinity boundary and the verified Grok follow-up before this is considered for merge. The first Desktop-only exact-K12 denial remains out of scope, so #2046 stays open. |
Summary
x-codex-parent-thread-idas the authoritative Pool affinity keysession-id+thread-idpairScope
This addresses the proven reconnect-rotation defect from #2046. It does not claim to fix the first Desktop-UI workspace denial, does not strip turn metadata, and does not reset threads. That separate same-version App-only boundary remains open for evidence-led diagnosis.
Privacy
Raw Desktop session/thread identifiers are not stored or logged. The fallback key is HMAC-derived under a fresh random process-local key and therefore cannot be correlated across OCX restarts.
Validation
bun test tests/codex-auth-context.test.ts— 57 passbun run typecheckbun run privacy:scangit diff --checkAn earlier full-suite run on this implementation reached 14,066 pass / 15 skip, with failures reproduced on clean
origin/devfrom the host service-token fixture and the installed TypeScript rejecting--ignoreConfig. Exact-head CI is green. The PR is ready for independent auth/security review and remains unmerged until that approval.Review readiness checklist
Summary by CodeRabbit
New Features
Bug Fixes