Steve Yegge
86c645603e
Fix all gosec, misspell, and unparam linter errors
...
- Add #nosec directives with explanations for all gosec warnings in worktree operations
- Tighten directory permissions from 0755 to 0750 for better security
- Fix misspellings: archaeological -> archeological, cancelled -> canceled
- Remove unused jsonlPath parameter from syncBranchCommitAndPush
- Change branchExists to return bool instead of (bool, error) - error was never used
All changes maintain backward compatibility and improve code quality.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-02 20:06:05 -08:00
Steve Yegge
c5b2fbbc9d
Add comprehensive sync-branch test coverage (bd-0e74)
...
Added 4 new integration tests to ensure sync-branch workflow is robust:
1. TestSyncBranchConfigChange - Validates changing sync.branch config
after worktrees exist. Tests smooth transition between branches.
2. TestSyncBranchMultipleConcurrentClones - Tests 3-way clone sync
workflow. Simulates real multi-agent collaboration scenario.
3. TestSyncBranchPerformance - Validates commit overhead < 150ms.
Current performance: avg 77ms (well within target).
4. TestSyncBranchNetworkFailure - Tests graceful handling of network
errors during push. Ensures local commits succeed even when remote
is unreachable.
All tests pass:
- cmd/bd (sync branch): PASS (5.361s)
- internal/git: PASS (1.071s)
- internal/syncbranch: PASS (0.312s)
Test coverage now includes: config change handling, multiple concurrent
clones, network failure recovery, performance validation, fresh setup,
issue operations, error handling, sparse checkout.
Closes bd-0e74
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-02 18:30:38 -08:00
Steve Yegge
712fb772fe
Complete sync branch daemon tests (bd-7bd2, bd-502e)
...
- Add daemon_sync_branch.go with syncBranchCommitAndPush/Pull functions
- Add daemon_sync_branch_test.go with 7 comprehensive tests
- All tests passing: NotConfigured, Success, NoChanges, WorktreeHealthCheck, Pull, EndToEnd
- Key fix: initMainBranch must run BEFORE creating issues/JSONL
- Close bd-7bd2 and bd-502e
Amp-Thread-ID: https://ampcode.com/threads/T-e3d7ba22-99d1-4210-a6db-1dcc3bdd622b
Co-authored-by: Amp <amp@ampcode.com >
2025-11-02 16:40:21 -08:00