fix: avoid watching directory symlink targets#13943
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates repository watcher directory filtering so recursive watch registration prunes directory symlinks and their descendants, preventing symlinked paths such as Nix result links from causing traversal of large external trees. It preserves explicitly force-included project-skill paths and adds focused Unix coverage for symlink pruning, force-included symlinked skills, and the .git allowlist behavior.
Concerns
No blocking correctness, security, or spec-alignment concerns found. The attached spec context states that no approved or repository spec context exists for this PR.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
Avoid recursively watching directory symlinks from repository watchers. On Linux/NixOS, paths such as
result -> /nix/store/...can otherwise cause the watcher to traverse very large dependency trees and consume excessive memory.The watcher now prunes symlinks and their descendants while preserving explicitly force-included project-skill paths.
Linked Issue
ready-to-implement.Fixes #13233
Testing
cargo fmt --allcargo nextest run -p repo_metadata --no-fail-fastcargo clippy -p repo_metadata --lib --tests -- -D warningsgit diff --checkManual GUI testing is not applicable; this is a repository watcher change with automated coverage.
Agent Mode
CHANGELOG-BUG-FIX: Prevent repository watchers from following directory symlinks into large external trees.