Repository navigation
test(config): canonicalize the owner-registry ACL test root (macOS) - #6411
Conversation
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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe ACL registration test setup now resolves its temporary directory to a real path before assigning ChangesACL test setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The ACL test now uses the same canonical path as the writer, and cleanup still targets that directory. No actionable merge-blocking risk remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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. |
|
Maintainer integration record (MAINTAINERS.md, dev-only)
|
Summary
Since #6375 (
6e5101115c),devfails on macOS intests/config/owner-registry-acl.test.ts:72, "registry publication requires the owner-only Windows directory ACL before writing an entry".readOwnerRegistry().homesis[]where[home]is expected. The test fails inmacos 2/2andmacos control, for example job 110434978022.The cause is in the test.
atomicWriteFileNoFollownames its temp file fromresolveWriteTarget(dirname(path)), which callsrealpathSync. The test enables simulated Windows hardening, so the writer runs the mocked icacls on that temp path, and the runner assertsargs[0].startsWith(root + sep). On macOStmpdir()is under/var, a symlink to/private/var. The canonical temp path fails that assertion, the required entry hardening throws,registerOwnerRegistryHomeswallows the error, and no entry is written. Linux passes because its temp directory is not a symlink. Production is unaffected because the real icacls has no prefix check.The fix canonicalizes the test root with
realpathSync, the same function the writer uses. The runtime code and the owner-only, no-follow guarantees from #6375 are unchanged.The Windows
tests/cli/sibling-home-client-sync.test.tsfailures seen at the same time ("timed out waiting for secondary runtime record") are not a #6375 regression. They came from a slow runner: in job 110434332429 every test in that file that starts a child ran about 3× slower. Two laterlane=allruns on the samedevbase, which includes #6375, passed all four of those tests in 4.5–8.7 s:windows 3/9110435440871 andwindows 3/9110446096011. Pre-#6375 timings were 4.6–7.0 s. Registration also cannot delay the record the test waits for, becausewriteRuntimePortwritesruntime-port.jsonbefore it callsregisterOwnHome(). With real icacls on the runner, "publishing a runtime record registers the home for cross-home discovery" passed in 137–166 ms.Verification
lane=allrun that covers the macOS and Windows legs.git diff --checkpasses. The test file is not in the file-size baseline.Checklist
Summary by CodeRabbit