Repository navigation
fix(filesystem-auth): allow worktree access through macOS /var canonical alias - #1589
Merged
Merged
Conversation
…cal alias #1524 stopped realpath'ing every worktree root during background refreshes to avoid TCC prompts, which broke File Explorer for worktrees registered under /var/folders when realpath canonicalizes them to /private/var/folders. Lazily canonicalize the registered root only when the user actively touches it: pass the pre-realpath source path through resolveAuthorizedPath so isPathAllowedIncludingRegisteredWorktrees can match the canonical target against the source's registered ancestor and cache the canonical root for future lookups. Co-authored-by: Orca <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…cal alias (stablyai#1589) stablyai#1524 stopped realpath'ing every worktree root during background refreshes to avoid TCC prompts, which broke File Explorer for worktrees registered under /var/folders when realpath canonicalizes them to /private/var/folders. Lazily canonicalize the registered root only when the user actively touches it: pass the pre-realpath source path through resolveAuthorizedPath so isPathAllowedIncludingRegisteredWorktrees can match the canonical target against the source's registered ancestor and cache the canonical root for future lookups. Co-authored-by: Orca <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/var/folders/...paths were inaccessible after fix: avoid repeated macOS privacy prompts #1524 stopped realpath'ing roots during background refreshes — file handlers canonicalize to/private/var/folders/...which never matches the textual root cache.resolveAuthorizedPathand lazily canonicalize the matching registered ancestor only when the user actively touches it. The canonical root gets cached for subsequent lookups, so we still avoid macOS TCC probes on background refreshes.Test plan
pnpm vitest run src/main/ipc/filesystem.test.ts— 35 passed (including 3 new cases: allow readDir alias, allow deletePath alias, reject symlink escape)pnpm typecheckpnpm lint src/main/ipc/filesystem-auth.ts src/main/ipc/filesystem.test.tsMade with Orca 🐋