Commit Graph

927 Commits

Author SHA1 Message Date
Steve Yegge
c9247312df Fix bd-6ku3: Update isHashID to recognize Base36 hash IDs
- Changed pattern from [a-f] (hex) to [a-z] (Base36)
- Added length check: 5+ chars = hash ID (sequential IDs rarely exceed 4 digits)
- Fixes test failure where all-digit Base36 IDs were incorrectly identified as sequential
2025-11-06 19:22:12 -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
Steve Yegge
cee9cbaba7 Clean up test binary 2025-11-06 13:02:35 -08:00
Steve Yegge
4f0da2cd9d bd sync: 2025-11-06 13:02:14 2025-11-06 13:02:14 -08:00
Steve Yegge
2ea2a0f010 Update beads issues 2025-11-06 10:53:55 -08:00
Steve Yegge
22b3e95c02 bd sync: 2025-11-05 23:29:07 2025-11-05 23:29:09 -08:00
Steve Yegge
a1c3494c43 bd sync: 2025-11-05 20:40:10 2025-11-05 20:40:10 -08:00
Steve Yegge
5a22327d67 Merge beads metadata 2025-11-05 20:39:59 -08:00
Steve Yegge
155ec6aeeb bd sync: 2025-11-05 20:39:52 2025-11-05 20:39:52 -08:00
Steve Yegge
df1c74ef1e bd sync: 2025-11-05 2025-11-05 20:00:30 -08:00
Steve Yegge
a67142f714 bd sync: 2025-11-05 19:33:07 2025-11-05 19:33:07 -08:00
Steve Yegge
75dcb0da1c bd sync: 2025-11-05 19:27:33 2025-11-05 19:27:33 -08:00
Steve Yegge
91bad1585d bd sync: 2025-11-05 19:22:12 2025-11-05 19:22:12 -08:00
Steve Yegge
5fdb555cd3 bd sync: 2025-11-05 19:17:14 2025-11-05 19:17:14 -08:00
Steve Yegge
7b60fa0ba9 bd sync: 2025-11-05 19:12:54 2025-11-05 19:12:54 -08:00
Steve Yegge
8bf6f20387 File bd-5ots: SearchIssues N+1 query bug 2025-11-05 19:12:08 -08:00
Steve Yegge
235f4e7cfa chore: Final beads sync 2025-11-05 19:04:39 -08:00
Steve Yegge
236d4e56b6 chore: Update beads issue tracker
Amp-Thread-ID: https://ampcode.com/threads/T-b4d124a2-447e-47d1-8124-d7c5dab9a97b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 19:04:31 -08:00
Steve Yegge
c20aabe263 bd sync: 2025-11-05 19:03:47 2025-11-05 19:04:14 -08:00
Steve Yegge
a1583a1b24 bd sync: 2025-11-05 18:43:51 2025-11-05 18:43:51 -08:00
Steve Yegge
fa38a69fcb bd sync: 2025-11-05 18:28:45 2025-11-05 18:28:45 -08:00