beads/internal
Steve Yegge 6b78b3fceb fix: bd sync fails to copy local changes TO beads-sync worktree (#810)
The bug: In a bare repo + worktrees setup, jsonlRelPath was calculated
relative to the project root (containing all worktrees), resulting in
paths like "main/.beads/issues.jsonl". But the sync branch worktree uses
sparse checkout for .beads/*, so files are at ".beads/issues.jsonl".

This caused SyncJSONLToWorktreeWithOptions to write to the wrong location
(e.g., worktree/main/.beads/ instead of worktree/.beads/), so changes
made locally never reached the sync branch worktree.

#785 fixed the reverse direction (worktree → local) by adding
normalizeBeadsRelPath(), but the local → worktree direction was missed.

Fix:
- Export NormalizeBeadsRelPath() (uppercase) for cross-package use
- Apply normalization in SyncJSONLToWorktreeWithOptions for dstPath
- Apply normalization in daemon_sync_branch.go for worktreeJSONLPath
  in both commit and pull paths
- Add unit tests for the normalization function

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:49:50 -08:00
..
audit feat(audit): add append-only agent audit trail (.beads/interactions.jsonl) 2025-12-20 03:24:51 -08:00
autoimport fix: NixOS symlink compatibility for mtime and permission checks (#459) 2025-12-05 13:22:09 -08:00
beads refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
compact test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
config test: fix config test environment pollution 2025-12-29 16:08:43 -08:00
configfile feat: change deletions TTL default from 7 to 3 days 2025-12-03 22:44:59 -08:00
daemon chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
debug test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
export test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
formula refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
git fix: bd sync fails to copy local changes TO beads-sync worktree (#810) 2025-12-30 16:49:50 -08:00
hooks refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
idgen fix(idgen): correct test vectors in hash_test.go 2025-12-19 18:13:56 -08:00
importer chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
linear test(linear): add comprehensive tests for mapping and client functions 2025-12-19 18:30:03 -08:00
lockfile test(lockfile): improve coverage from 42% to 98% 2025-12-14 15:21:29 -08:00
merge Add debug logging for tombstone resurrection events 2025-12-30 15:59:51 -08:00
molecules refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
routing refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
rpc Add type: event for state transitions (bd-ecmd) 2025-12-30 16:27:59 -08:00
storage fix: read operations no longer modify database file (GH#804) 2025-12-30 16:47:38 -08:00
syncbranch fix: prevent sync.branch from being set to main/master (#807) 2025-12-30 16:45:51 -08:00
testutil Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
types feat: add type: event for operational state changes (bd-ecmd) 2025-12-30 15:54:51 -08:00
ui Add BD_AGENT_MODE for ultra-compact output 2025-12-30 16:04:39 -08:00
util Extract normalizeLabels to internal/util/strings.go 2025-11-06 20:00:08 -08:00
utils test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
validation Centralize validation patterns with composable validators (bd-jbqx) 2025-12-30 16:00:22 -08:00