Repository navigation
test(windows): resolve the atomic-write fixture root before matching cleanup paths - #7945
Conversation
…cleanup paths The writer resolves the destination's real parent, and macOS tmpdir() is a symlink, so the unlink fixture never matched and the residual case failed on macOS (dev batch 40819570452).
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolve the temporary test root tests/windows/windows-atomic-write-acl-rearm.test.ts:65-67 |
The setup resolves the created temporary directory with realpathSync before assigning it to root. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Possibly related PRs
- lidge-jun/opencodex#7891: This PR adds the Windows ACL timeout re-arm test that this change updates.
- lidge-jun/opencodex#7943: This PR registers the same test in the test-layout mapping.
- lidge-jun/opencodex#7843: This PR adds atomic-writer ACL timeout re-arm behavior and a related regression test.
Suggested reviewers: ingwannu
Merge Risk: 
Minimal · up to 82017
-
The fixture change is appropriately scoped and introduces no identified merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "test(windows): resolve the atomic-write fixture root before matching cleanup paths" matches the main change. The raw summary says the test setup now resolves the temporary root to its real path, and the PR objectives confirm the fixture uses realpathSync(mkdtempSync(...)) to match the writer's resolved destination path. The title is short, single-sentence, specific, and states the primary change. It does not cover the test-result details, but that is expected. No search was needed, since the check depends only on the supplied PR context.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
Summary
The dev
lane=allbatch 40819570452 fails on macOS (job 123269441240) intests/windows/windows-atomic-write-acl-rearm.test.ts, added by #7891. Thecleanup leaves an empty residual without spending the recovery attemptcase throws a plainETIMEDOUTinstead ofAtomicWriteResidualTempError.The cause is in the fixture. The test refuses
unlinkSynconly for paths underjoin(root, "secret.json.ocx."), whererootcame frommkdtempSync(tmpdir()).atomicWriteFileresolves the destination's real parent (src/config/atomic-write.ts:40), and macOStmpdir()is a symlink (/var->/private/var). The cleanup therefore unlinks/private/var/.../secret.json.ocx.*, the fixture's prefix check misses, the unlink succeeds, and no residual is left. The writer behaves correctly; the fixture watched the wrong path.This sets
roottorealpathSync(mkdtempSync(...)), so the fixture matches the path the writer actually uses. No assertion, timeout or product code changes.Verification
All on Windows x64 with
OCX_TEST_NO_QUEUE=1,bun test tests/windows/windows-atomic-write-acl-rearm.test.ts:TEMP/TMPpointed at a directory junction (the same shape as the macOS symlink): 17 pass / 6 fail (the cleanup case for the sync, streamed and async writers, plus the threesequential retries retain one ACL childcases).devcheck.Checklist
Summary by CodeRabbit