fix(codex): repair desktop restart membership and POSIX-only cases on Windows - #4564
fix(codex): repair desktop restart membership and POSIX-only cases on Windows#4564luvs01 wants to merge 1 commit into
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 (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change makes ChangesRoot membership validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The cross-platform membership fix and test updates are reported passing, with no unresolved merge-blocking issue identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
e469627 to
e696a22
Compare
리뷰 · 우선순위 67 / 80이 PR은 Windows CI에서 고치는 방식은 두 갈래입니다. 첫째, 현재 라인 119-125 - 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Hosted cross-platform CI result for the published head The change does what it claims. Five of the six Windows shards are green: One Windows shard still fails, So the Windows shard needs both changes to go green. This one clears the For context on why this matters beyond CI: the |
e696a22 to
f79c147
Compare
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. |
Ingwannu
left a comment
There was a problem hiding this comment.
Requesting changes on exact head f79c14730986a9e63f2e51cdeeea099d13ec4ea3.
The new boundary-character check fixes C:/root/file against C:/root, but it does not fix mixed Windows spellings. isUnderRoot() still runs executable.startsWith(root) before looking at the separator. Therefore C:/Program Files/OpenAI.Codex/chatgpt.exe versus C:\Program Files\OpenAI.Codex (and the reverse) still returns false even though Windows names the same tree. The rationale explicitly says a probe can return either separator, but the regression uses / on both operands.
Please normalize both slash forms in the existing Windows-only toHostMembershipPath() seam before calling the shared boundary helper, and add both mixed-direction cases plus the OpenAI.Codex-evil control. Keeping that normalization Windows-local preserves the correct POSIX rule that backslash is an ordinary filename character; the shared helper can then remain a lexical boundary check over one normalized spelling.
The exact-head ordinary CI and the tested same-spelling cases are green, but they do not exercise this remaining Windows failure. The POSIX-only skips themselves are reasonable and are not the blocker.
Current ordinary-gate verification
All ordinary jobs in CI 34812947370 passed on published head
f79c14730986a9e63f2e51cdeeea099d13ec4ea3: four Linux shards, two normal macOS shards, static/storage/API gates, three-platform keyring, Docker and packaging. The supplemental macOS control suite and aggregate have also completed successfully. The full Windows diagnostic suite was intentionally skipped, which is not Windows test proof. Author readiness uses this complete ordinary graph together with 27 passing focused local tests (10 platform skips, 69 assertions); it does not claim a successful full local command. This current status supersedes pending-CI prose below; earlier command failures and coverage limitations remain recorded. Required merge checks and new review findings remain independently enforced.Current author follow-up
Published head
f79c14730986a9e63f2e51cdeeea099d13ec4ea3is based on the fixeddevsnapshot43f4450a538d729f353144c029aa97de1c4f2483. This supersedes older head/behind/CI status statements below; older verification remains historical evidence. Required conflicts were resolved without dropping upstream contracts. No repeated tip chasing was performed.bun run typecheck: passed.bun run structure:check: passed.bun run privacy:scan: passed.git diff --check: passed.bun test tests/clients/desktop-app-restart-posix.test.ts tests/clients/desktop-app-restart.test.ts: passed (27 pass; 10 skip; 0 fail; 69 expect() calls).Exact-head CI 34812947370 is pending. The existing
macos-controlmanual lane retains ordinary Linux/macOS/static/storage/API/keyring/packaging checks and the macOS control suite; it intentionally skips the supplemental full Windows matrix. A skipped job is not a Windows pass. Current full-suite readiness remains pending until its result is reviewed.Maintainer sponsorship, where required, remains a separate hold. Existing resolved review findings were not reopened.
Summary
Every Windows CI shard that picks up
tests/clients/desktop-app-restart-posix.test.tscurrently fails, so contributor PRs based on recentdevcannot go green. Nine cases fail for two separate reasons, and only one of them is a test-only concern.isUnderRootbuilds its boundary frompath.sepalone, so on Windows a member path written with forward slashes is read as outside the install root. Windows accepts/wherever it accepts\, and a probe can return either, so the restart the user asked for could silently become a no-op while still looking fail-closed. Accept/as a separator on every host and keep\a separator only where the host says so, because\is an ordinary filename character on POSIX and admitting it there would reopen the sibling-prefix hole the function exists to close.The remaining cases drive the macOS and Linux adapters, which scope enumeration to the current user through
process.getuid(). A Windows host does not provide it, so the probe correctly reports that it could not run and the assertions cannot hold there at all. Those two describes now skip on Windows with that reason recorded; the Ubuntu and macOS shards, where the adapters actually run, still cover them.Verification
tests/clients/desktop-app-restart-posix.test.tsandtests/clients/desktop-app-restart.test.tstogether report 27 pass, 10 skip, 0 fail, 69 assertions.bun run typecheck,bun run structure:check,bun run privacy:scan, andgit diff --checkpass.sepof/, the new boundary admits exactly the strings the previous prefix comparison admitted. The Windows-only skips were verified as skipped rather than silently passing.Checklist
Review readiness evidence
Rebased onto
devat15fbd49f3and pushed; the branch was 0 commits behind at push time. Published head ise696a223e.Local verification on that head, on Windows, which is the platform this fixes:
bun test tests/clients/desktop-app-restart-posix.test.tsreports 8 pass / 10 skip / 0 fail, where the skips are the two uid-dependent describes this PR marks POSIX-only.bun run typecheck,bun run structure:check,bun run privacy:scanandgit diff --checkall pass.Hosted cross-platform CI on the previous head
e4696273a, run 34792398505: 24 jobs green with no failures, includingwindows 1/6throughwindows 5/6. The remainingwindows 6/6job was cancelled by the rebase push that produced the current head, not failed. A fresh full run one696a223e, run 34793832912, is queued; its result will be posted here.Review readiness checklist
Summary by CodeRabbit
Bug Fixes
Tests