Repository navigation
perf: preserve unrelated authorization roots after desktop removal - #26294
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughLocal worktree removal now invalidates authorized-roots cache entries for the affected repository during orphan cleanup and metadata purge. Recovery tests check repository-scoped invalidation, registered-root revisions, and behavior when no registered authorization owner exists. Preflight tests verify that dirty removal paths do not invalidate the caches. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Successful local removals can retain unrelated repositories’ authorization caches without an identified new authorization regression. The change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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 |
ELI5
Removing one local worktree should not make Orca rediscover worktrees in every other repository before it can read a file. Local desktop removal now refreshes only the repository that changed.
What Changed
Both successful registered-local removal paths use the existing repository-scoped authorization invalidation helper. The affected repository loses its old roots and advances its revision; unrelated repositories keep their verified roots. The helper still invalidates everything when ownership cannot be established. Refused removals do not invalidate anything.
Why
The current desktop IPC path clears every repository’s authorization cache after a successful deletion. Reusing the existing scoped helper removes unnecessary Git subprocesses while preserving the existing stale-listing fence and access checks. This is separate from the runtime-backed removal path fixed earlier.
Seven alternating before/after pairs exercised the actual public desktop removal handler, real Git worktree deletion, and the next public filesystem read on macOS. With 24 real repositories, median combined time fell from 66.3 to 37.5 ms; the read portion fell from 32.8 to 5.2 ms. A separate subprocess-count run showed 24 repository listings becoming one. With eight repositories the combined time fell from 44.6 to 37.6 ms. One-repository timing was unchanged at about 36.6 ms.
Linked Issue
Performance audit; no existing issue linked.
Visual Proof
N/A
This changes authorization-cache scope after local deletion; the interface, deletion outcome and error behavior are unchanged.
Testing
Hosted static, Node unit and relay integration checks pass. Linux packaging finished as cancelled after waiting in its package-tool installation step; the application packaging steps did not run. Windows packaging has an unresolved first-attempt failure: the unchanged SysWOW64 installer process-query test timed out after 60 seconds with empty output. Its test, installer macro and process wrapper are byte-identical to both CI merge parents; the log does not establish whether the query started. No all-green claim or speculative source fix.
Native timing was macOS with real local Git; module registration used a test Electron boundary rather than an app window. Connected SSH and folder-success flows were reviewed in source and are outside the changed registered-local module. No Windows/Linux timing or Codex typing-pause claim.
Review
Independent source and evidence review found no blocker. This reuses the existing ownership helper at the same successful-removal points, changes no Git arguments or remote protocol, and preserves the global fallback for uncertain ownership.
Agent skill upstream boundary
Checklist