fix(codex): fence refresh failures across bulk routing resets - #4695
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe refresh-failure fencing model now combines per-account and global routing generations. Bulk resets invalidate stale in-flight refreshes. Tests verify that stale failures are ignored and current failures still apply cooldown. ChangesRefresh failure fencing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change invalidates stale refresh failures after bulk resets while preserving cooldown handling for current failures, with no unresolved merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 unsupported.)
✨ 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. |
리뷰 · 우선순위 76 / 80이 PR은 이미 코드 경로는 좁다. 테스트 릴리스 맥락도 같이 봐야 한다. 2.56.0 제품 트리는 여전히
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Full isolated-suite result at |
a20a4aa to
26201d4
Compare
|
Rebased onto current |
Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com>
26201d4 to
2853fdc
Compare
Summary
Why this follow-up is required
PR #4690 correctly fenced a late refresh failure after an individual credential replacement, but
clearAllCodexPoolRefreshFailures()only cleared the backoff map. A refresh flight that started before a whole routing-roster reset could therefore fail afterward with the still-current fence and re-open cooldown for the replacement roster.This is especially easy to miss for a first failure: that in-flight account has no backoff entry to iterate. The fix uses a global generation in addition to the existing per-account generation, so the bulk reset invalidates unknown in-flight work in O(1).
Decision Log
global:accountas the opaque flight fence and advance the global component on bulk reset.Validation
Exact head:
a20a4aa46bun test tests/codex-integration/codex-pool-refresh-backoff.test.ts --timeout 30000— 13 pass, 0 failbun run typecheck— passbun run structure:check— passbun run privacy:scan— passAll local validation used temporary
HOME,OPENCODEX_HOME,CODEX_HOME, andPASEO_HOME; credential environment variables were removed. The five protected runtime files remained byte-identical.@lidge-jun This is an urgent narrow follow-up to the blocker identified on the already-merged #4690. Please review the auth-state fence and exact-head CI before merge. I will not self-approve or self-merge it.
Summary by CodeRabbit