# fs: Improve filesystem rescan diagnostics \(\#64253\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f092e5e9af23e128396be129ee8dedbe23561784)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f092e5e9af23e128396be129ee8dedbe23561784

Requested commit: f092e5e9af23e128396be129ee8dedbe23561784

Commit: f092e5e9af23e128396be129ee8dedbe23561784

Tree: f1c6f92854f99e0a7ba1a7c289f2928c856c2c41

Author: Conrad Irwin

Committer: GitHub

## Message

```
fs: Improve filesystem rescan diagnostics (#64253)

## Summary

Replace the broken rescan-warning rate limiter, which repeatedly emitted
“not logging more” without advancing its counter.

- Keep the last 10 queued path occurrences per watcher backend,
preserving full paths.
- Build and write rescan reports in the existing background dispatch
task, keeping blocking log I/O off the native watcher reader.
- Emit one error line per dispatched rescan after coalescing duplicate
pathless rescans and before registration fan-out, containing the
backend-provided reason, affected paths, and preceding paths.
- Remove the redundant rescan warnings and rate-limit bookkeeping
without changing rescan scheduling.
- Add one focused test for the path history and report contents.

## Verification

- `corgi test -p fs --lib` — 23 tests passed.
- `corgi test -p fs --features test-support --test integration` — 24
tests passed.
- `corgi fmt -p fs -- --check`
- `git diff --check`

Release Notes:

- Improved filesystem watcher rescan diagnostics and removed repetitive
“not logging more” warnings.
```

## Parents

- [a0f8fa7bdbbf0269aaf5d5ebfac3ad9adfb576dd](https://git.cafe/gitcafe/zed/commit/a0f8fa7bdbbf0269aaf5d5ebfac3ad9adfb576dd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f092e5e9af23e128396be129ee8dedbe23561784?format=markdown)
