Commit Graph

1 Commits

Author SHA1 Message Date
Levi Neuwirth bfa1e77d1b
docs: frame D3 --- the file-watch polling cost (issue #233)
Framing and lane update at the branch's first commit, portable during
review. Revision 1 is a DRAFT and no implementation may start from it.

The remainder of issue #233 after #234: the watcher is correct and
still walks everything. The framing re-verifies the cost model at
add0ba1 and adds two facts the issue does not carry:

- On this checkout .git alone is 177 of 220 directories --- over 80%
  of every walk --- and the machine does not even have an in-tree
  target/ (external CARGO_TARGET_DIR). The issue's 187/46 numbers were
  measured with one.
- The string-form base is NONDETERMINISTIC: resolve_watcher takes the
  directory of whichever attachment pairs() yields first, so which
  tree a bare-string watcher can see depends on table hash order. #234
  made matching correct per base; which base is still accidental.

Design space A-E with the trade-offs stated: coalesce per (server,
base); a Rust walk_tree primitive (one job per scan instead of one per
directory --- no new crate, no wire change); an ignore list, with the
target/ staleness hazard named (rust-analyzer's **/*.rs covers
OUT_DIR outputs, so an aggressive default trades churn for staleness
in exactly the server the issue is about); idle backoff; and kernel
notification, deliberately staged separately because A-D are pure wins
it does not obsolete and a new-crate decision deserves its own
framing.

Proposed Stage 1: walk_tree + coalescing + backoff, VCS-only skip
default, project-root base preference. At rest on this repo: from
~1,100 jobs per scan-bound tick to one job every four seconds, named
for its root.

Four rulings block implementation (Q#D3-1..4): the acceptance bar
(one attributable blip at idle, not silence --- silence is Stage 2),
the skip-list default and where it lives (a list-valued setting is
not expressible in today's ConfigValue), the string-form base change,
and knobs vs constants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 10:03:57 +02:00