Skip to content

feat: add adaptive filesystem watch#30

Merged
forhappy merged 3 commits into
agent/scoped-compass-initfrom
agent/adaptive-compass-watch
Jul 25, 2026
Merged

feat: add adaptive filesystem watch#30
forhappy merged 3 commits into
agent/scoped-compass-initfrom
agent/adaptive-compass-watch

Conversation

@forhappy

Copy link
Copy Markdown
Contributor

Summary

  • make native filesystem events the default for compass watch, with a 150 ms quiet debounce and bounded maximum coalescing window
  • keep collecting changes while a single build runs, then schedule one follow-up build for queued paths
  • add content-aware polling fallback, periodic reconciliation, bounded retry backoff, and clearer terminal/non-terminal status output
  • preserve the existing Graphify-compatible watch behavior behind its compatibility path
  • document the adaptive watcher behavior and operational controls

Why

The previous continuous-build loop traded responsiveness for correctness by polling and rebuilding broadly. Native events make routine edits visible immediately, while reconciliation and polling fallback retain correctness when event delivery is incomplete or unavailable.

User impact

compass watch now performs an initial synchronization, reacts quickly to save bursts, avoids concurrent builds, reports degraded/retry states clearly, and finishes an active build cleanly on shutdown. --poll remains available as an explicit fallback.

Dependency

This is a stacked PR based on agent/scoped-compass-init and depends on #29. After #29 merges, this PR can be retargeted to main.

Validation

  • cargo test --workspace
  • cargo fmt --all -- --check
  • cargo clippy -p compass-core -p compass-cli --all-targets --no-deps -- -D warnings
  • bash -n completions/compass.bash
  • zsh -n completions/_compass
  • git diff --check agent/scoped-compass-init...HEAD

@forhappy
forhappy marked this pull request as ready for review July 25, 2026 03:21
@forhappy
forhappy merged commit b115506 into agent/scoped-compass-init Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant