Skip to content

fix: avoid watching directory symlink targets#13943

Open
KRRT7 wants to merge 1 commit into
warpdotdev:masterfrom
KRRT7:fix-nix-store-watcher-memory
Open

fix: avoid watching directory symlink targets#13943
KRRT7 wants to merge 1 commit into
warpdotdev:masterfrom
KRRT7:fix-nix-store-watcher-memory

Conversation

@KRRT7

@KRRT7 KRRT7 commented Jul 18, 2026

Copy link
Copy Markdown

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

  • The linked issue is labeled ready-to-implement.

Fixes #13233

Testing

  • cargo fmt --all
  • cargo nextest run -p repo_metadata --no-fail-fast
  • cargo clippy -p repo_metadata --lib --tests -- -D warnings
  • git diff --check

Manual GUI testing is not applicable; this is a repository watcher change with automated coverage.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Prevent repository watchers from following directory symlinks into large external trees.

@cla-bot cla-bot Bot added the cla-signed label Jul 18, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jul 18, 2026
@oz-for-oss

oz-for-oss Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@KRRT7

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: @acarl005.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@oz-for-oss
oz-for-oss Bot requested a review from acarl005 July 18, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux/NixOS: Warp grows to ~20 GiB RSS while repository watchers/indexing touch /nix/store paths

1 participant