fix(watcher): cap startup wait

This commit is contained in:
2026-05-20 00:09:07 -04:00
parent b7e421483d
commit 62fc80c70f
6 changed files with 34 additions and 158 deletions

View File

@@ -63,6 +63,8 @@ Non-obvious bits:
- **Ignore layering.** Always-ignore baseline (`.git/`, `.DS_Store`) +
root `.gitignore` parsed via the `ignore` package + a small fallback
for non-git workspaces. Nested gitignores aren't supported yet.
- **Startup readiness.** The daemon waits for chokidar's initial scan, capped
at 5s, so first requests don't hang indefinitely on huge workspaces.
- **Debounce.** 50ms quiet period, capped at 500ms max wait so sustained
event streams (branch switches) still flush in bounded time.
- **Watcher and mtime-sync coexist.** When the agent edits a file we'll