Updated TODO comments with proper beads issue IDs:
- bd-hdt: Implement auto-merge functionality
- bd-gqo: Implement daemon health checks
- bd-r46: Support --reason flag in daemon mode for reopen
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add ParentPID field to DaemonLockInfo struct
- Daemon monitors parent process every 10 seconds
- Gracefully exits when parent process dies
- Prevents accumulation of orphaned daemons from dead sessions
- Fixes race conditions from multiple daemons on same database
Closes bd-zpnq
Three critical fixes to make event-driven mode production-ready:
1. Skip redundant imports: Check JSONL mtime vs DB mtime to avoid
self-triggered import loops after export writes JSONL
2. Add server.Stop() in serverErrChan case: Ensures clean RPC
server shutdown on errors
3. Fallback ticker (60s): When file watcher unavailable (e.g., network
filesystems), fall back to periodic polling to detect remote changes
These minimal fixes address Oracle's concerns without over-engineering.
Event-driven mode is now safe for default.
Amp-Thread-ID: https://ampcode.com/threads/T-a9a67394-37ca-4b79-aa23-c5c011f9c0cd
Co-authored-by: Amp <amp@ampcode.com>
- Add mutation events for label/dep/comment operations
- Create separate export-only and import-only functions
- Add dropped events counter with safety net export
- Complete bd-80 mutation channel implementation
Event-driven mode now:
- Emits mutation events for ALL write operations (not just create/update/close)
- Uses createExportFunc() for mutations (export+commit/push only, no pull)
- Uses createAutoImportFunc() for file changes (pull+import only, no export)
- Tracks dropped events and triggers safety export every 60s if any dropped
- Achieves <500ms latency target by avoiding full sync on each trigger
Behind BEADS_DAEMON_MODE=events flag (poll is still default)