Prune directory symlinks from repo watches#13252
Conversation
|
Every PR must be linked to a same-repo issue before Oz can review it. This PR is linked to #13233, but no linked issue is marked See the contribution guidelines for the full readiness model. Powered by Oz |
There was a problem hiding this comment.
Every PR must be linked to a same-repo issue before Oz can review it.
This PR is linked to #13233, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.
See the contribution guidelines for the full readiness model.
Powered by Oz
Description
Fixes a repository watcher/indexing failure mode where force-included project skill directories could cause Warp to recursively watch directory symlinks into large external trees, such as Nix store closures.
The repo tree builder already treats directory symlinks as non-materialized entries. This change makes
should_watch_repo_directorymirror that behavior before applying force-included path matching. Force-included provider directories such as.agents/skillsand.codex/skillsare still watched, and the existing non-recursive symlink-target watcher path remains responsible for standing-query symlink targets.Linked Issue
Fixes #13233
ready-to-specorready-to-implement.No UI screenshots are included because this is a repository watcher/resource-use fix. The issue contains the pre-fix memory screenshot.
Testing
resultdirectory symlink.cargo test -p repo_metadata should_watch_prunes_force_included_directory_symlink --features local_fscargo test -p repo_metadata should_watch --features local_fscargo test -p repo_metadata standing_queries_report_symlinked_skills_without_materializing_symlinked_directories --features local_fscargo test -p repo_metadata --features local_fs(113 passed,2 ignored)bash ./script/format --checkbash ./script/check_no_inline_test_modulesnix develop --command bash -lc 'PATH=/tmp/warp-corepack-bin:$PATH cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings'nix develop --command bash -lc 'PATH=/tmp/warp-corepack-bin:$PATH cargo clippy -p warp_completer --all-targets --tests -- -D warnings'nix build .#warp-terminal-experimental --print-out-paths --print-build-logs./script/runso the test matched the Linux/NixOS failure mode.Manual runtime checks with the fixed binary:
/home/vitalyr/nix-vault: indexed/home/vitalyr/nix-vaultwith585files; 95s sample kept inotify watches flat at5293 -> 5293,/nix/storefds0 -> 0, RSS653572 -> 765752KiB./home/vitalyr/nix-vault/.codex/skills: indexed/home/vitalyr/nix-vaultwith585files; 90s sample kept inotify watches flat at5293 -> 5293,/nix/storefds0 -> 0, RSS716380 -> 985564KiB.81directory symlinks, including40under.agents/skillsand40under.codex/skillspointing into/nix/store: indexed with3files; 91s sample kept inotify watches flat at5311 -> 5311,/nix/storefds0 -> 0..agents/skills: 93s sample kept inotify watches flat at5311 -> 5311,/nix/storefds0 -> 0.For comparison, the pre-fix repro on
/home/vitalyr/nix-vaultgrew from about21.6kto56.9kinotify watches and multiple GiB of RSS while opening fds under/nix/store../script/runScreenshots / Videos
Not applicable; this is a non-UI resource-use fix.
Agent Mode
CHANGELOG-BUG-FIX: Fixed a Linux repository watcher issue where directory symlinks inside project skill directories could cause excessive memory and inotify watch growth.