Commit Graph

1599 Commits

Author SHA1 Message Date
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
11fa142539 Optimize test suite with testing.Short() guards
- Add Short() guards to slow CLI tests (2-4s each)
- Add Short() guards to slow API/integration tests (3-11s)
- Add Short() guard to hanging daemon discovery test (29s timeout)
- Short test suite now runs in ~6s (down from 5+ minutes)

Run 'go test -short ./...' for fast iteration
Run 'go test ./...' for full coverage

Closes: bd-iov0
2025-11-06 17:31:15 -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
14b2d3431f Add comprehensive tests for 3-way merge functionality
- Added merge_test.go with 797 lines of test coverage
- Tests for field merging, dependency merging, timestamp handling
- Tests for deletion detection and conflict generation
- Integration tests for merge driver auto-config in bd init
- Test helpers for git repository setup

Closes bd-kazt

All tests pass: go test ./internal/merge/... -v

Amp-Thread-ID: https://ampcode.com/threads/T-f0fe7c4c-13e7-486b-b073-fc64b81eeb4b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 15:51:40 -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
aca631a1c4 Update CHANGELOG for git hook version detection 2025-11-06 15:02:38 -08:00
Steve Yegge
991c6248ca Add git hooks support and refactor info command 2025-11-06 15:00:15 -08:00
Steve Yegge
c4eddf0de4 bd sync: 2025-11-06 15:00:10 2025-11-06 15:00:10 -08:00
Steve Yegge
8f676a4850 Add public API for external extensions
Created root-level beads.go that re-exports types and functions from
internal packages. This allows external projects (like VC) to import
from github.com/steveyegge/beads without violating Go's internal
package restrictions.

Exports:
- Storage interface and NewSQLiteStorage()
- Core types (Issue, Dependency, Label, etc.)
- Filter types (IssueFilter, WorkFilter)
- All relevant constants (Status, IssueType, DependencyType, etc.)

This matches the usage shown in docs/EXTENDING.md.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 13:30:04 -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
9d45cb47f0 Merge remote beads issues 2025-11-06 13:02:10 -08:00
Steve Yegge
e6de031627 bd sync: 2025-11-06 13:01:54 2025-11-06 13:01:54 -08:00
Steve Yegge
9de98cf1cb Add --clear-duplicate-external-refs flag to bd import
Fixes GH-234 by providing automatic resolution for duplicate external_ref
values instead of forcing manual JSONL editing.

Changes:
- Add ClearDuplicateExternalRefs option to importer.Options
- Modify validateNoDuplicateExternalRefs to clear duplicates when enabled
- Keep first occurrence, clear rest when flag is set
- Enhanced error message to suggest the flag
- Add comprehensive tests for the new behavior

Usage: bd import -i issues.jsonl --clear-duplicate-external-refs
Amp-Thread-ID: https://ampcode.com/threads/T-932dcf45-76f2-4994-9b5c-a6eb20a86036
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 13:01:44 -08:00
Steve Yegge
2ea2a0f010 Update beads issues 2025-11-06 10:53:55 -08:00
Ben Lovell
b5e2ef4a59 Add script to automate Nix vendorHash updates (#235)
* Add script to automate Nix vendorHash updates

- Create update-nix-hash.sh to automate vendorHash calculation
- Update vendorHash (to be usedafter recent Go dependency changes)
- Script uses ed for OS agnostic in-place editing and extracts hash from nix output

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Test Nix Flake CI job

* Revert CI change - bd outputs help by default without 'help' arg

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steve Yegge <stevey@sourcegraph.com>
2025-11-06 10:30:19 -08:00
Steve Yegge
c47f40b03e fix: Extract linux checksums properly in Homebrew workflow
Fixes #238 - The workflow was using a shell command
instead of extracting the linux checksums like it does for macOS.
Now extracts all platform hashes and uses them in the formula.
2025-11-06 10:20:12 -08:00
Steve Yegge
22b3e95c02 bd sync: 2025-11-05 23:29:07 2025-11-05 23:29:09 -08:00
Steve Yegge
138f24c3ff Merge branch 'main' of github.com:steveyegge/beads 2025-11-05 21:04:28 -08:00
Steve Yegge
584c266684 Reorganize project structure: move Go files to internal/beads, docs to docs/
Amp-Thread-ID: https://ampcode.com/threads/T-7a71671d-dd5c-4c7c-b557-fa427fceb04f
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 21:04:00 -08:00
Steve Yegge
563c12ba2f feat: Add manual trigger to Homebrew workflow for testing 2025-11-05 20:51:46 -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
0f4b03e262 Optimize test suite: split integration tests, add -short support
- Split slow importer integration tests into separate file
- Add t.Short() guards to 10 slow daemon tests
- Document test organization in TEST_OPTIMIZATION.md
- Fast tests now run in ~50s vs 3+ minutes
- Use 'go test -short ./...' for fast feedback

Amp-Thread-ID: https://ampcode.com/threads/T-29ae21ac-749d-43d7-bf0c-2c5f7a06ae76
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 20:39:47 -08:00
Steve Yegge
739786e949 feat: Separate Homebrew update workflow with PAT support 2025-11-05 20:38:47 -08:00
Steve Yegge
34ff0a1200 fix: Disable ARM64 builds for Linux/Windows (CGO cross-compile issues) 2025-11-05 20:25:00 -08:00
Steve Yegge
df1c74ef1e bd sync: 2025-11-05 2025-11-05 20:00:30 -08:00
Steve Yegge
e294fc0f4d docs: Add CHANGELOG entry for v0.22.0 2025-11-05 19:59:48 -08:00
Steve Yegge
433fd4ad11 chore: Bump version to 0.22.0
Updated all component versions:
- bd CLI: 0.21.9 → 0.22.0
- Plugin: 0.21.9 → 0.22.0
- MCP server: 0.21.9 → 0.22.0
- npm package: 0.21.9 → 0.22.0
- Documentation: 0.21.9 → 0.22.0

Generated by scripts/bump-version.sh
2025-11-05 19:44:24 -08:00
Steve Yegge
38489106c6 Add git cleanup step to 'land the plane' protocol
Amp-Thread-ID: https://ampcode.com/threads/T-c2d2b083-5566-4eea-9f8a-c4880a79e888
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 19:43:27 -08:00
Steve Yegge
d13a445557 Fix: Clarify bd merge uses beads-merge algorithm (vendored)
The standalone beads-merge binary is the same algorithm, not an alternative.
Both run identical code - just different packaging.
2025-11-05 19:35:02 -08:00
Steve Yegge
2d69817341 Update documentation for merge driver auto-configuration
- Add merge driver to bd init workflow in README.md
- Update AGENTS.md with auto-config details
- Document --skip-merge-driver flag
- Provide manual setup instructions
- Clarify beads-merge as alternative external tool

Completes bd-ggbc
2025-11-05 19:33:20 -08:00
Steve Yegge
a67142f714 bd sync: 2025-11-05 19:33:07 2025-11-05 19:33:07 -08:00
Steve Yegge
999ad0264d Add merge driver auto-config to bd init 2025-11-05 19:27:41 -08:00
Steve Yegge
75dcb0da1c bd sync: 2025-11-05 19:27:33 2025-11-05 19:27:33 -08:00
Steve Yegge
fceecaf329 Merge branch 'main' of github.com:steveyegge/beads
Amp-Thread-ID: https://ampcode.com/threads/T-62a3b45b-f924-4017-ba5a-b5f64a1f31cb
Co-authored-by: Amp <amp@ampcode.com>

# Conflicts:
#	.beads/beads.jsonl
2025-11-05 19:27:33 -08:00
Steve Yegge
9820e788a4 bd sync: 2025-11-05 19:27:24 2025-11-05 19:27:24 -08:00
Steve Yegge
91bad1585d bd sync: 2025-11-05 19:22:12 2025-11-05 19:22:12 -08:00
Steve Yegge
e90e485e5b Fix bd-5ots: Eliminate N+1 query in scanIssues with batch label loading 2025-11-05 19:22:03 -08:00
Steve Yegge
5fdb555cd3 bd sync: 2025-11-05 19:17:14 2025-11-05 19:17:14 -08:00
Steve Yegge
fc9aa9bdae Merge remote-tracking branch 'origin/main'
Amp-Thread-ID: https://ampcode.com/threads/T-810952b1-e2a2-4913-97cb-90b12287ff40
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 19:17:07 -08:00