Skip to content

feat(index): add file watcher for incremental code index updates - #236

Merged
bug-ops merged 2 commits into
mainfrom
feat/233/index-watcher
Feb 14, 2026
Merged

feat(index): add file watcher for incremental code index updates#236
bug-ops merged 2 commits into
mainfrom
feat/233/index-watcher

Conversation

@bug-ops

@bug-ops bug-ops commented Feb 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add IndexWatcher in zeph-index using notify_debouncer_mini with 1s debounce, following SkillWatcher pattern
  • On file change, sends path via mpsc channel to consumer task that calls CodeIndexer::reindex_file()
  • Filters by indexable file extensions, deduplicates events via HashSet
  • New watch: bool config field in [index] section (default true)
  • Watcher lives in outer main scope for full program lifetime

Test plan

  • Existing test suite passes (1278 passed, 9 skipped)
  • start_with_valid_directory — happy path test
  • start_with_nonexistent_directory_fails — error path test
  • clippy clean, fmt pass

Closes #233

IndexWatcher monitors project files via notify with 1s debounce
and triggers reindex_file() on changes. Configurable via [index]
watch field (default true). Respects indexable file extensions.
@github-actions github-actions Bot added enhancement New feature or request documentation Improvements or additions to documentation size/M Medium PR (51-200 lines) rust Rust code changes core zeph-core crate dependencies Dependency updates config Configuration file changes and removed enhancement New feature or request labels Feb 14, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Feb 14, 2026
@bug-ops
bug-ops enabled auto-merge (squash) February 14, 2026 10:05
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.23711% with 57 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/zeph-index/src/watcher.rs 47.36% 40 Missing ⚠️
src/main.rs 0.00% 17 Missing ⚠️

❌ Your patch status has failed because the patch coverage (41.23%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
- Coverage   80.96%   80.87%   -0.10%     
==========================================
  Files          78       79       +1     
  Lines       23137    23232      +95     
==========================================
+ Hits        18734    18789      +55     
- Misses       4403     4443      +40     
Files with missing lines Coverage Δ
crates/zeph-core/src/config.rs 98.92% <100.00%> (+<0.01%) ⬆️
src/main.rs 70.01% <0.00%> (-0.85%) ⬇️
crates/zeph-index/src/watcher.rs 47.36% <47.36%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bug-ops
bug-ops merged commit d1ca10e into main Feb 14, 2026
20 checks passed
@bug-ops
bug-ops deleted the feat/233/index-watcher branch February 14, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add file watcher for incremental code index updates

2 participants