Commit Graph

946 Commits

Author SHA1 Message Date
Steve Yegge
78c9d744cb Add edge case tests for getMultiRepoJSONLPaths()
- Test empty path handling (returns nil for single-repo mode)
- Test duplicate paths (documents non-deduping behavior)
- Test paths with spaces (handles correctly)
- Test relative paths (not normalized, used as-is)
- Test tilde expansion (not expanded, used literally)

Closes bd-kdoh

Amp-Thread-ID: https://ampcode.com/threads/T-ac07d8fd-51a3-4511-a477-d7041b950ea8
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:54:59 -08:00
Steve Yegge
b9607e1814 Update JSONL after closing bd-4b6u
Amp-Thread-ID: https://ampcode.com/threads/T-645ccbf4-a5b6-44a1-bbd9-913447e17b49
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:54:00 -08:00
Steve Yegge
6960feb93d Update beads.jsonl (bd-bc2c6191 closed) 2025-11-06 19:51:31 -08:00
Steve Yegge
b15d4c7340 Update bd JSONL 2025-11-06 19:42:48 -08:00
Steve Yegge
99acd03e32 Update beads.jsonl (close bd-iov0, bd-aec5439f, bd-fd8753d9)
Amp-Thread-ID: https://ampcode.com/threads/T-71887707-4d93-4070-869e-b46b32ab8b6a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:42:27 -08:00
Steve Yegge
20eafa103a Merge branch 'main' of github.com:steveyegge/beads
# Conflicts:
#	.beads/beads.jsonl
2025-11-06 19:41:52 -08:00
Steve Yegge
5c1f441c2a Fix bd-ng56: add raw string equality short-circuit before jsonEquals
Optimization to avoid JSON unmarshalling when strings match exactly (common case).
Simple 1-line change instead of complex streaming rewrite for P3 issue.
2025-11-06 19:41:27 -08:00
Steve Yegge
581294f98b bd sync: 2025-11-06 19:40:52 2025-11-06 19:40:52 -08:00
Steve Yegge
244367c351 Update bd JSONL 2025-11-06 19:37:54 -08:00
Steve Yegge
729ab60ef5 Update beads.jsonl - close bd-2997 2025-11-06 19:36:32 -08:00
Steve Yegge
621ffdb594 Update beads.jsonl (close bd-irq6)
Amp-Thread-ID: https://ampcode.com/threads/T-71887707-4d93-4070-869e-b46b32ab8b6a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:36:06 -08:00
Steve Yegge
7672473bbd Update bd JSONL 2025-11-06 19:25:03 -08:00
Steve Yegge
fb17b4286d Update issue metadata for bd-rb75 and bd-6ku3 closures 2025-11-06 19:23:45 -08:00
Steve Yegge
6e182fa32f Update bd JSONL 2025-11-06 19:21:17 -08:00
Steve Yegge
7726d6207e Update beads database after closing bd-1fkr
Amp-Thread-ID: https://ampcode.com/threads/T-11b30d1f-1dbf-4bf1-b3ef-866ff6f75662
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:17:21 -08:00
Steve Yegge
f61f8dd2ba bd sync: apply DB changes after import 2025-11-06 19:16:50 -08:00
Steve Yegge
7c124835bf Merge branch 'main' of github.com:steveyegge/beads 2025-11-06 19:16:48 -08:00
Steve Yegge
d6cc42d7b1 bd sync: 2025-11-06 19:16:47 2025-11-06 19:16:47 -08:00
Steve Yegge
ba71874cac Update beads JSONL (timestamp updates from daemon) 2025-11-06 19:15:03 -08:00
Steve Yegge
055f1d9c1e Fix isHashID to handle hash IDs without letters a-f
The previous implementation required hash IDs to contain letters a-f,
but SHA256 hashes can be all digits (probability ~2.4%). This caused
TestMigrateHashIDs to fail when the generated hash ID was all numeric.

Updated isHashID to:
- Strip hierarchical suffixes (.1, .1.2) before checking
- Accept any valid hex string (0-9, a-f)
- Distinguish hash IDs by presence of letters a-f

Fixes bd-6ku3
2025-11-06 19:14:49 -08:00
Steve Yegge
41b1a21206 Fix bd-rb75: Ignore merge artifacts in .beads/.gitignore 2025-11-06 19:14:04 -08:00
Steve Yegge
d2d31766e6 bd sync: 2025-11-06 19:07:35 2025-11-06 19:07:35 -08:00
Steve Yegge
746961efd2 Merge branch 'main' of github.com:steveyegge/beads
# Conflicts:
#	.beads/beads.jsonl
2025-11-06 19:07:31 -08:00
Steve Yegge
d6c2550579 bd sync: 2025-11-06 19:07:19 2025-11-06 19:07:19 -08:00
Steve Yegge
0b0d9a43d1 Improve bd-my64 fix based on oracle review
Oracle identified a critical race condition in the initial fix:
- Pre-push hook checked for changes but didn't flush first
- Pending 5s-debounced flushes could land after the check
- Result: stale JSONL could still be pushed

Improvements:
1. Pre-push now flushes pending changes FIRST (bd sync --flush-only)
2. Uses git status --porcelain to catch ALL change types:
   - Staged, unstaged, untracked, deleted, renamed, conflicts
3. Handles both beads.jsonl and issues.jsonl (backward compat)
4. Works even without bd installed (git-only check)
5. Pre-commit stages both JSONL files (simpler loop)

This completely eliminates the race condition.
2025-11-06 19:01:28 -08:00
Steve Yegge
4460ede3a7 Remove dead issues.jsonl and add bd-1ezg sync investigation issue 2025-11-06 19:01:03 -08:00
Steve Yegge
ff1f25ea63 Update beads JSONL 2025-11-06 18:57:52 -08:00
Steve Yegge
3ba245e6c0 Fix bd-my64: Pre-push hook blocks instead of exports
The original pre-push hook tried to export DB → JSONL during the push,
then run 'git add', but this doesn't work because:

1. The commit is already created when pre-push runs
2. git add in pre-push stages files for a FUTURE commit
3. The current push sends the old commit with stale JSONL
4. Result: dirty git status after push

Fix:
- Pre-push now CHECKS for uncommitted JSONL changes
- If found, it FAILS the push with clear instructions
- User must commit JSONL before pushing
- This prevents stale JSONL from reaching remote

The pre-commit hook already properly flushes changes, so this
catch-all prevents changes made BETWEEN commit and push.

Amp-Thread-ID: https://ampcode.com/threads/T-39a89553-c301-4d4f-b39f-6df9c403d22b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 18:57:34 -08:00
Steve Yegge
2cb97e4d22 Update beads JSONL 2025-11-06 18:53:07 -08:00
Steve Yegge
bae701af13 Add bd-6ku3: Fix TestMigrateHashIDs test failure 2025-11-06 18:53:02 -08:00
Steve Yegge
7eea30acde Update beads JSONL
Amp-Thread-ID: https://ampcode.com/threads/T-65a9b3f9-0552-4587-bb8f-34c2b98781b1
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 18:52:37 -08:00
Steve Yegge
96269763c0 Update beads database with comments 2025-11-06 18:49:46 -08:00
Steve Yegge
e85740167b Sync beads database
Amp-Thread-ID: https://ampcode.com/threads/T-dc29c5ad-ff33-401a-9546-4d5ca1d8421b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 18:49:31 -08:00
Steve Yegge
510934ff19 bd sync: 2025-11-06 18:49:09 2025-11-06 18:49:09 -08:00
Steve Yegge
c731c45f0c Update beads JSONL
Amp-Thread-ID: https://ampcode.com/threads/T-5e744954-8a08-4697-960e-5f2a88d50c54
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 18:48:53 -08:00
Steve Yegge
b7395128a9 bd sync: 2025-11-06 18:47:43 2025-11-06 18:47:43 -08:00
Steve Yegge
fa811300bd Sync beads issues
Amp-Thread-ID: https://ampcode.com/threads/T-932dcf45-76f2-4994-9b5c-a6eb20a86036
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 18:19:31 -08:00
Steve Yegge
70a3361d77 bd sync: 2025-11-06 18:19:21 2025-11-06 18:19:21 -08:00
Steve Yegge
b201eecd55 bd sync: 2025-11-06 17:52:29 2025-11-06 17:52:30 -08:00
Steve Yegge
f9108ff498 bd sync: 2025-11-06 17:31:18 2025-11-06 17:31:18 -08:00
Steve Yegge
5fff4edcb6 bd sync: 2025-11-06 16:14:27 2025-11-06 16:14:27 -08:00
Steve Yegge
6424ebdada Add comprehensive tests for merge driver auto-config in bd init
- Test auto-install in quiet mode (bd init --quiet)
- Test --skip-merge-driver flag
- Test detection of already-installed merge driver (no duplication)
- Test append to existing .gitattributes (preserve content)
- Test non-git repo gracefully skips merge driver
- Test git config has correct merge.beads.driver settings

Fixes: bd-csvy
Amp-Thread-ID: https://ampcode.com/threads/T-b237be26-6dd8-4d4e-9b9d-b460ace8ce72
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 15:57:51 -08:00
Steve Yegge
725e43d49c Sync beads database 2025-11-06 15:52:11 -08:00
Steve Yegge
5f95d05a39 Update beads database: closed bd-kazt 2025-11-06 15:52:01 -08:00
Steve Yegge
f475c13064 bd sync: 2025-11-06 15:41:51 2025-11-06 15:41:51 -08:00
Steve Yegge
4b1e96bd3f Fix linting errors in vendored merge code
- Check error returns from Fprintln and Sync
- Remove unused 'merged' parameter from hasConflict
- Remaining gosec G304 warnings are baseline (file paths from git, not user input)
2025-11-06 15:41:36 -08:00
Steve Yegge
dcb6eb27a8 Vendor beads-merge by @neongreen for native bd merge command
- Vendored beads-merge algorithm into internal/merge/ with full MIT license attribution
- Created bd merge command as native wrapper (no external binary needed)
- Updated bd init to auto-configure git merge driver (both interactive and --quiet)
- Removed obsolete test files that were incompatible with vendored version
- Added merge to noDbCommands list so it can run standalone
- Tested: successful merge and conflict detection work correctly

Closes bd-bzfy

Thanks to @neongreen for permission to vendor!
See: https://github.com/neongreen/mono/issues/240
Original: https://github.com/neongreen/mono/tree/main/beads-merge

Amp-Thread-ID: https://ampcode.com/threads/T-f0fe7c4c-13e7-486b-b073-fc64b81eeb4b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 15:38:48 -08:00
Steve Yegge
d4c97d9f70 bd sync: 2025-11-06 15:30:20 2025-11-06 15:30:20 -08:00
Steve Yegge
c4eddf0de4 bd sync: 2025-11-06 15:00:10 2025-11-06 15:00:10 -08:00
Steve Yegge
5c59a3dfec bd sync: 2025-11-06 13:02:45 2025-11-06 13:02:45 -08:00