Repository navigation
fix: prevent read-only watcher events from causing overflow loops - #152
Conversation
Ignore read-only notifications before the bounded watcher queue while preserving native rescan signals and overflow recovery for real changes. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The concurrency-sensitive, platform-dependent watcher recovery changes warrant final human review despite strong targeted coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Prevents read-only watcher events from overflowing the bounded queue while preserving recovery signals and real filesystem changes.
Changes:
- Filters non-index-changing events before queueing.
- Preserves concurrent overflow and native rescan recovery requests.
- Adds regression tests, documentation, and version 1.0.7 updates.
| File | Description |
|---|---|
tgrep-cli/src/serve.rs |
Implements watcher filtering and recovery handling. |
tgrep-cli/src/serve/poll_tests.rs |
Tests overflow during reconciliation. |
tgrep-cli/tests/watcher_watch_registration.rs |
Adds Linux overflow regression coverage. |
README.md |
Documents queue filtering behavior. |
Cargo.toml |
Bumps workspace version. |
Cargo.lock |
Updates workspace package versions. |
fuzz/Cargo.lock |
Updates the fuzz dependency version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Reviewed, and ran it on the tree from #151. Thanks for the quick turnaround. Empirical check — v1.0.7 on the original repro tree (25,360 files, 5,709 watched directories, watch budget 8192), with
Code — the placement looks right. Two things I checked specifically:
Sharing One residual item, not a blocker: notify 7.0.0 hardcodes |
Summary
Fixes #151.
Validation
tgrep 1.0.7.