Implement bd daemon command with production-ready improvements

- Add bd daemon command for background git sync (bd-273)
- Implement PID file management with atomic creation (O_EXCL)
- Add session detachment (Setsid) to survive terminal closure
- Implement graceful shutdown with SIGTERM/SIGINT/SIGHUP handling
- Add context cancellation and per-sync timeouts (2min)
- Use secure file permissions (0600 for PID/log, 0700 for .beads)
- Add startup confirmation before reporting success
- Implement interval validation and comprehensive error handling
- Add full test coverage for daemon lifecycle
- Update README.md with daemon documentation

All oracle review recommendations implemented.
This commit is contained in:
Steve Yegge
2025-10-16 13:09:55 -07:00
parent a0b2110629
commit 2b934913bb

File diff suppressed because one or more lines are too long