chore: merge train 260821 — land #2296 (Desktop reconnect pool affinity) - #2324
Conversation
Adversarial review major: the subagent-fallback preview called previewCodexAccountForRequest with an undefined quota scope, mapping the lookup to the legacy affinity slot, while resolveCodexAuthContext binds under codexQuotaScopeForModel(modelId) (shared or a native model scope) — so the preview could never find the Desktop affinity binding and fell back to the active account while the final auth bound elsewhere. Pass the route-model derived scope and pin both directions with an end-to-end postSpawn test plus a legacy-slot divergence assertion.
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughCodex Desktop reconnects now use bounded pool affinity keys. Authentication contexts carry the key through account selection, subagent fallback, and upstream outcome recording. Tests cover derivation, account binding, failure rebinding, and model-specific fallback quota scope. ChangesCodex pool affinity
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Desktop
participant CodexAuthContext
participant SubagentPreview
participant UpstreamOutcomeRecorder
Desktop->>CodexAuthContext: send parent-thread or session/thread headers
CodexAuthContext->>CodexAuthContext: derive bounded affinityKey
CodexAuthContext->>SubagentPreview: resolve account with affinityKey and model quota scope
SubagentPreview-->>Desktop: use bound pool account for fallback
CodexAuthContext->>UpstreamOutcomeRecorder: provide affinityKey
UpstreamOutcomeRecorder-->>CodexAuthContext: record pool outcome
Suggested reviewers: ✨ Finishing Touches📝 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 |
Summary
Third leg of the merge train: lands #2296 — fix(codex): bind Desktop reconnects to one pool account plus an adversarial-review hardening commit.
Review chain:
codexQuotaScopeForModel(modelId), so the preview could never find the Desktop affinity binding and diverged from the authenticating accountVerification
Checklist
Summary by CodeRabbit
Bug Fixes
Documentation