fix(codex): preserve disk state when account deletion is uncertain - #3687
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 |
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 74 / 80이 PR은 Codex 계정 삭제가 실패한 뒤 오래된 스냅샷으로 디스크를 되돌리던 경로를 없앱니다. 지금 HEAD의 테스트가 보안 리뷰 수준입니다. pre-write 실패, post-write 후 디스크 유지, 동시 외부 편집 바이트 보존, invalid-UTF8 별칭, missing/unreadable config, 에러 메시지에서 경로·토큰 제거, transient(설정 파일 없음)는 여전히 credential cleanup. 성공 삭제·post-commit cleanup 계약은 유지한다고 본문에 적혀 있습니다. management route의 second-save는 이번 레이어 밖입니다. 계정 삭제는 credential·quota·websocket·config가 한 트랜잭션처럼 보여야 하는 경계입니다. “실패했는데 디스크는 다른 사람 글이고 credential은 지워짐”이 가장 나쁜 결과인데, 이 PR은 그 반대(디스크 존중·cleanup 중단·런타임 복구)를 고릅니다. C 레인에서 Windows 우선순위 다음 층에 둔 것도, 서비스 안정성 다음에 계정 내구성이라는 읽기 순서와 맞습니다. 경로/심볼 경로 경로 테스트 concurrent external edit - 외부 port 변경 바이트가 그대로 남고, 런타임은 복구되며 credential은 아직 안 지웁니다. 경로 테스트 unreadable - 사용자 메시지는 고정 sanitize 문장, cause/경로/시크릿 없음, cleanup spy 미호출. 경로 의존 경로 원본 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Owner explicitly authorized admin merging the C-lane stack. Independent security/code review: PASS at |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
If saving an account deletion fails after another writer changed the config file, restoring an old snapshot would overwrite that writer's bytes. Keep the previous runtime state, preserve the actual disk bytes, and stop before credential/runtime cleanup when persistence cannot be verified. Missing or unreadable files also remain untouched.
Carries #3536, retaining SB Yoon's two commits and their source provenance. Existing successful-deletion and post-commit cleanup semantics remain intact; the separate management route's second-save contract is outside this layer.
Stack layer 2/5. Depends on #3682 (
codex/c-lane-3638-d778); review only this account-persistence delta. Child #3688 carries OAuth configuration on this branch. Merge bottom-up intodev.Verification
macmini-cf, Bun 1.4.0, exact head21f3eb212181f65aed4265c7f46f2b5846316e92: six account/config/auth test files — 314 pass, 0 fail. Source SHA256 verified before execution.Checklist
Co-authored-by: SB Yoon 44089734+yansigit@users.noreply.github.com