Files
beads/internal/syncbranch
Steve Yegge f503a5ae43 test: improve syncbranch coverage from 27% to 67% (bd-io8c)
Add comprehensive tests for internal/syncbranch package:

syncbranch.go:
- TestGetFromYAML: env var and default behavior
- TestIsConfigured: env var presence detection
- TestIsConfiguredWithDB: database and env var checks
- TestGetConfigFromDB: direct DB value retrieval

worktree.go helper functions:
- TestIsNonFastForwardError: git push error detection
- TestHasChangesInWorktree: dirty state detection
- TestCommitInWorktree: worktree commit flow
- TestCopyJSONLToMainRepo: file sync between worktrees
- TestGetRemoteForBranch: remote name resolution
- TestGetRepoRoot: repo root detection including worktrees
- TestHasGitRemote: remote existence check
- TestGetCurrentBranch: branch name detection
- TestFormatVanishedIssues: forensic logging

worktree.go main functions:
- TestCommitToSyncBranch: basic commit flow
- TestPullFromSyncBranch: pull and fast-forward scenarios
- TestResetToRemote: remote reset error handling
- TestPushSyncBranch: push with worktree recreation
- TestPreemptiveFetchAndFastForward: pre-fetch behavior
- TestFetchAndRebaseInWorktree: rebase error handling
- TestRunCmdWithTimeoutMessage: command execution

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:48:40 -08:00
..