Fix native main token refresh and replay - #2497
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
|
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
리뷰 · 우선순위 63 / 80설명: 이 풀 리퀘스트는 네이티브 메인 계정, 곧 Codex CLI 가 쓰는 지금 HEAD 의 src/codex/main-account.ts 는 68줄이다. PR 이 넣는 길은 세 덩어리다. 첫째, src/codex/main-account.ts 에 테스트는 크다. tests/codex-main-account-refresh.test.ts 가 784줄이다. 리프레시만 있는 auth.json, 바깥 작가 채택, 최종 게시 경쟁을 본다. tests/responses-native-main-refresh.test.ts 와 tests/responses-compact-native-main-refresh.test.ts 가 401 재전송을 본다. 작성자는 관련 묶음 313 통과와 typecheck 통과를 적었다. 전체 스위트는 통과라고 주장하지 않는다. Bun 1.4.0 isolate 자식이 십 분 넘게 CPU 만 썼다고 적었다. 리뷰 준비 체크리스트는 로컬 CI 전체, 코더래빗 정리, 리뷰 준비가 비어 있다. 보안 민감 변경이라 드래프트로 두고 maintainer-sponsored 가 필요하다고 본문이 말한다. 그 말은 맞다. 자격 증명을 디스크에 다시 쓰는 변경이다. 이 구멍이 사용자에게 보이는 이유는 메인이 풀과 같이 돌아가기 때문이다. 풀은 고치고 메인은 고치지 않으면, 메인이 고를 때마다 401 이 난다. 우선순위 63 은 그 때문이다. 요청이 바로 502 로 죽는 전송 구멍은 아니다. 2473 이 막아 둔 웹소켓 큰 프레임 구멍과도 다르다. 지금은 자격 증명이 낡은 채로 업스트림을 치는 문제다. 그래도 머지하지 말 것. 드래프트다. 윈도우에서 하드 링크 교체가 실패할 수 있고, 같은 거절 토큰으로 리프레시 비행에 다시 들어가는 재귀가 있다. Direct kind src/codex/main-account.ts 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
20a4e72 to
86a49e8
Compare
|
Ran the credential-boundary security review Not merging yet. Three blockers, two of which are ownership decisions rather than defects I should resolve inside your PR. 1. Publication is not atomic ( 2. The same-account fallback adopts a different grant ( 3. "Exactly one replay" is one logical replay, not one physical send ( 4. Your new suites are red at this head — Non-blocking: persistence preserves the old The review is recorded in |
Audited against the goal objective's exact lists rather than a running tally: all 15 named lidge-jun issues CLOSED, 15 of 16 named bug PRs terminal. #2497 is the single open item and it is a decision, not a task - the credential boundary AGENTS.md places under security review, with three hand-verified blockers, one of which is an ownership question about cross-grant adoption. Records the four remaining items and the specific input each is blocked on, so the next person does not re-derive why they are open.
Summary
__main__auth.jsoncredentials before upstream use, including refresh-only auth files./v1/responses/compactpaths.auth.jsonfirst with snapshot checks, no-replace replacement, external-writer adoption, and then converges matching pool credentials.Closes #2221.
Current head
86a49e852(86a49e852581835253a06e40ebb7012215820757).devatfaaa78dc0(faaa78dc05489625e5c9bf450050a46a7fa91d1f).MarcTCruz <58499846+MarcTCruz@users.noreply.github.com>.Verification
Post-rewrite head
86a49e852:git diff --check origin/dev...HEAD: pass.bun run typecheck: pass.bun run test tests/codex-main-account-refresh.test.ts tests/responses-native-main-refresh.test.ts tests/responses-compact-native-main-refresh.test.ts tests/codex-auth-context.test.ts tests/codex-account-store.test.ts tests/codex-model-entitlements.test.ts tests/chatgpt-oauth.test.ts tests/chatgpt-token-expiry.test.ts tests/config.test.ts tests/routing-analytics.test.ts: 313 pass, 0 fail.bun run privacy:scan: pass.Full
bun run prepush/ full-suite local CI is not claimed here.Checklist
Security review
This changes authentication and credential persistence. Keep this PR Draft until maintainer security review is complete and a maintainer applies
maintainer-sponsored.Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met: