Files
beads/cmd/bd
Steve Yegge 176dc0d601 Fix bd-66: Add robust polling fallback for file watcher
- Detect fsnotify.NewWatcher() errors and auto-fallback to polling mode
- Add BEADS_WATCHER_FALLBACK env var to control behavior (default: enabled)
- Poll every 5 seconds with comprehensive change detection:
  - Track file existence, size, and mtime to catch all changes
  - Handle file disappearance/reappearance correctly
  - Trigger on file recreation even with older timestamps
- Fix goroutine leak: Close() now stops background goroutines via cancel context
- Tighten git refs filtering to only trigger for events under .git/refs/heads
- Trigger after successful JSONL rewatch on rename/remove events
- Improve logging to show actual poll interval in warnings

All tests passing.

Amp-Thread-ID: https://ampcode.com/threads/T-8f5edc23-4b78-4b80-b8f3-66050f45eb61
Co-authored-by: Amp <amp@ampcode.com>
2025-10-28 19:27:56 -07:00
..
2025-10-27 20:08:50 -07:00
2025-10-27 20:08:50 -07:00
2025-10-25 18:13:49 -07:00
2025-10-25 18:13:49 -07:00
2025-10-27 20:08:50 -07:00
2025-10-25 18:13:49 -07:00
2025-10-27 20:08:50 -07:00
2025-10-27 20:08:50 -07:00
2025-10-27 20:08:50 -07:00
2025-10-25 18:13:49 -07:00
2025-10-27 20:08:50 -07:00
2025-10-27 20:08:50 -07:00
2025-10-28 17:19:28 -07:00
2025-10-27 20:08:50 -07:00
2025-10-26 23:30:37 -07:00