Commit Graph

3 Commits

Author SHA1 Message Date
Charles P. Cross
eaec440358 Fix integration test compilation errors in cmd/bd
The integration tests were failing to compile due to several issues
introduced by API changes that weren't reflected in the test files:

1. daemon_test.go:
   - getPIDFilePath() signature changed: removed boolean parameter
   - getLogFilePath() signature changed: removed boolean parameter
   - Removed duplicate windowsOS constant (already in test_helpers_test.go)

2. daemon_parent_test.go:
   - Removed duplicate runGitCmd() function (already in git_sync_test.go
     with more functionality including date env vars)
   - Removed unused os/exec import

These fixes allow `go test -tags integration ./cmd/bd` to compile
successfully. The test suite can now be run to verify daemon and
sync branch functionality.

No behavioral changes - only fixing test compilation issues.
2025-12-11 07:11:15 -05:00
Steve Yegge
82902432f5 test: Tag 16 slow integration tests with build tags
Identified and tagged obviously-slow integration tests with
`//go:build integration` to exclude them from default test runs.

This is step 1 of fixing test performance. The real fix is in
bd-1rh: refactoring tests to use shared DB setup instead of
creating 279 separate databases.

Tagged files:
- cmd/bd: 8 files (CLI tests, git ops, performance benchmarks)
- internal: 8 files (integration tests, E2E tests)

Issues:
- bd-1rh: Main issue tracking test performance
- bd-c49: Audit all tests and create grouping plan (next step)
- bd-y6d: POC refactor of create_test.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 14:40:22 -05:00
Steve Yegge
7fa0c93195 Fix daemon orphaning: track parent PID and exit when parent dies
- 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
2025-11-07 18:57:43 -08:00