Repository navigation
Fix macOS CLI symlink permissions - #19881
hbjk1030-cmyk wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe macOS privileged install transaction now creates the launcher symlink under Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The macOS installer now publishes a readable CLI symlink while keeping transaction directories private, with a test covering the resulting mode. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The change fixes the reported 0700 symlink root cause and adds a 755 mode assertion. The provided change summary does not show implementation or test coverage for handling an already-unreadable symlink as stale during status checks or re-registration.
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Scoped umask for the published symlink — wraps the
ln -sthat creates the staged symlink in(umask 022; …)inbuildMacPrivilegedSymlinkTransaction, so the transaction-wideumask 077no longer yields a mode 0700 symlink on macOS (where symlinks honor umask). Transaction and publish directories stay 0700. - Regression assertion — the real macOS transaction test now asserts the published command path resolves via
lstatto permission bits0o755.
The fix is minimal and correct. The subshell preserves the && short-circuit (its exit status is ln's), and the parent shell's umask is unaffected after it exits, so the subsequent /bin/ln -P hard-link and directory cleanup run under the original 077. The final command path inherits the 0755 inode through the hard link. The assertion is meaningful — pre-fix the symlink was 0700 and this test would fail — and it correctly uses lstat (not stat) with a 0o777 mask to drop the file-type bits. Linux and Windows paths are untouched, and the existing toContain('ln -s') assertion still matches the parenthesized command.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Thanks @hbjk1030-cmyk for the focused umask fix and the macOS permissions regression test. The team's fix for #19120 has now merged in #29245, covering new registrations and recovery for existing unreadable links. Closing this PR as superseded. Thank you for contributing! |

ELI5
Registering the Orca CLI on macOS could create a link that only root could inspect. This keeps the private transaction directories locked down while publishing the final /usr/local/bin/orca symlink with normal executable-link permissions.
What Changed
Why
The transaction-wide umask 077 also applied to the symlink itself on macOS, producing mode 0700. Non-root users could then receive EACCES from readlink and the CLI launcher could not resolve the app path.
Linked Issue
Fixes #19120
Visual Proof
N/A — no UI or interaction layout changes; this corrects filesystem permissions for CLI registration.
Testing
The repository-wide Vitest run reports five environment-dependent failures unrelated to this change. All five reproduce on this branch's baseline checkout: one shell recipe cleanup assertion, two installed Claude structured CLI expectations, one Claude trust prompt integration, and one installed Claude path expectation. CI will provide the clean-environment full-suite result.
AI Disclosure
OpenAI Codex (GPT-5) was used to inspect, implement, test, and review the change.
Review
Agent skill upstream boundary
Author
X (Twitter): N/A
Checklist