Commit Graph

1322 Commits

Author SHA1 Message Date
Steve Yegge
dfcbb7d3af Optimize sync_test.go: eliminate redundant git init calls
- Add setupGitRepo(), setupGitRepoWithBranch(), and setupMinimalGitRepo() helpers
- Refactor 19 test functions to use shared git repo setup
- Reduces duplicate git initialization boilerplate by ~300 lines
- All tests pass with improved maintainability

Related to bd-ktng
2025-11-23 22:54:05 -08:00
Steve Yegge
f5e96f9a7b Update bd JSONL after rebase 2025-11-23 22:39:58 -08:00
Steve Yegge
e7dfe284b5 bd sync: 2025-11-23 22:38:58 2025-11-23 22:38:58 -08:00
Steve Yegge
f5cc3ff85a bd sync: apply DB changes after import 2025-11-23 22:33:05 -08:00
Steve Yegge
fee336e4ff Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 22:33:05 -08:00
Steve Yegge
839292657a bd sync: 2025-11-23 22:33:04 2025-11-23 22:33:04 -08:00
Steve Yegge
133c30d0d5 bd sync: apply DB changes after import 2025-11-23 22:32:42 -08:00
Steve Yegge
e594596835 bd sync: 2025-11-23 22:32:29 2025-11-23 22:32:29 -08:00
Steve Yegge
3192c26709 bd sync: apply DB changes after import 2025-11-23 22:32:13 -08:00
Steve Yegge
26615721e9 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 22:32:12 -08:00
Steve Yegge
ca46d550a4 bd sync: 2025-11-23 22:32:11 2025-11-23 22:32:11 -08:00
Steve Yegge
ed11a13f1b bd sync: 2025-11-23 22:28:15 2025-11-23 22:28:15 -08:00
Steve Yegge
3009b42e06 bd sync: 2025-11-23 22:27:52 2025-11-23 22:27:52 -08:00
Steve Yegge
8b530ff809 bd sync: 2025-11-23 22:26:56 2025-11-23 22:26:57 -08:00
Steve Yegge
94c3471d42 bd sync: apply DB changes after import 2025-11-23 22:26:02 -08:00
Steve Yegge
8f465df351 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 22:26:01 -08:00
Steve Yegge
ed9b46d163 bd sync: 2025-11-23 22:26:00 2025-11-23 22:26:00 -08:00
Steve Yegge
1f27256525 bd sync: 2025-11-23 22:09:36 2025-11-23 22:13:24 -08:00
Steve Yegge
5703f38858 bd sync: 2025-11-23 22:12:49 2025-11-23 22:12:49 -08:00
Steve Yegge
07e2e89657 bd sync: 2025-11-23 22:12:32 2025-11-23 22:12:32 -08:00
Steve Yegge
8bc8611918 bd sync: 2025-11-23 22:06:45 2025-11-23 22:06:45 -08:00
Steve Yegge
31d9de0ac4 bd sync: 2025-11-23 22:04:05 2025-11-23 22:04:05 -08:00
Steve Yegge
ebf6e36b31 bd sync: apply DB changes after import 2025-11-23 21:59:16 -08:00
Steve Yegge
82b64e205c bd sync: 2025-11-23 21:54:01 2025-11-23 21:54:01 -08:00
Steve Yegge
bddc4a3d21 bd sync: apply DB changes after import 2025-11-23 21:52:14 -08:00
Steve Yegge
9e6a1b8af8 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:51:58 -08:00
Steve Yegge
4c483ae112 bd sync: 2025-11-23 21:51:52 2025-11-23 21:51:52 -08:00
Steve Yegge
7da626ca94 bd sync: apply DB changes after import 2025-11-23 21:49:07 -08:00
Steve Yegge
3804aa616f Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:49:07 -08:00
Steve Yegge
bcf7650c2c bd sync: 2025-11-23 21:49:06 2025-11-23 21:49:06 -08:00
Steve Yegge
3ef55ffc28 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:48:58 -08:00
Steve Yegge
3afafeff6f bd sync: 2025-11-23 21:48:58 2025-11-23 21:48:58 -08:00
Steve Yegge
1c715bc61c Fix bd-fwul: Add executable bit validation for git hooks
Added validation to hooksInstalled() to check if hook files have the
executable bit set. Previously we only checked for file existence and
marker strings, which meant hooks could appear installed but fail
silently if they weren't executable.

The fix adds Mode().Perm() & 0111 checks for both pre-commit and
post-merge hooks after verifying their content.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:48:54 -08:00
Steve Yegge
cf84eb85e1 removed artifact 2025-11-23 21:46:38 -08:00
Steve Yegge
5c7b1fa2d8 bd sync: apply DB changes after import 2025-11-23 21:46:22 -08:00
Steve Yegge
0711cd2aab Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:46:22 -08:00
Steve Yegge
d1c4c857a1 bd sync: 2025-11-23 21:46:21 2025-11-23 21:46:21 -08:00
Steve Yegge
344a3542e3 Merge remote changes
Resolved .beads/beads.jsonl conflict

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:43:24 -08:00
Steve Yegge
3369997a11 bd sync: apply DB changes after import 2025-11-23 21:42:50 -08:00
Steve Yegge
f77dc46e76 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:42:49 -08:00
Steve Yegge
d4f9a05bb2 Fix bd-pq5k: merge conflicts now prefer closed>open and deletion>modification
CHANGES:
1. Merge logic (internal/merge/merge.go):
   - Added mergeStatus() enforcing closed ALWAYS wins over open
   - Fixed closed_at handling: only set when status='closed'
   - Changed deletion handling: deletion ALWAYS wins over modification

2. Deletion tracking (cmd/bd/snapshot_manager.go):
   - Updated ComputeAcceptedDeletions to accept all merge deletions
   - Removed "unchanged locally" check (deletion wins regardless)

3. FK constraint helper (internal/storage/sqlite/util.go):
   - Added IsForeignKeyConstraintError() for bd-koab
   - Detects FK violations for graceful import handling

TESTS UPDATED:
- TestMergeStatus: comprehensive status merge tests
- TestIsForeignKeyConstraintError: FK constraint detection
- bd-pq5k test: validates no invalid state (status=open with closed_at)
- Deletion tests: reflect new deletion-wins behavior
- All tests pass ✓

This ensures issues never get stuck in invalid states and prevents
the insane situation where issues never die!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:42:43 -08:00
Steve Yegge
60daea911d bd sync: 2025-11-23 21:42:36 2025-11-23 21:42:36 -08:00
Steve Yegge
64b54ce2bb Remove empty issues.jsonl file
Only beads.jsonl is used in this repo. The empty issues.jsonl was
causing doctor warnings.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:39:50 -08:00
Steve Yegge
d82cf0549a bd sync: apply DB changes after import 2025-11-23 21:38:39 -08:00
Steve Yegge
23f5c8f117 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:38:38 -08:00
Steve Yegge
39ce09172d bd sync: 2025-11-23 21:38:37 2025-11-23 21:38:37 -08:00
Steve Yegge
42430ea32e bd sync: 2025-11-23 21:37:58 2025-11-23 21:37:58 -08:00
Steve Yegge
0836575d9a Export clean JSONL after conflict resolution 2025-11-23 21:37:54 -08:00
Steve Yegge
9e9f9bc338 bd sync: 2025-11-23 21:37:19 2025-11-23 21:37:41 -08:00
Steve Yegge
278d90bc97 bd sync: apply DB changes after import 2025-11-23 21:31:18 -08:00