- Fix existing tests to work with new installHooks signature
- Add TestInstallHooksShared to verify shared hooks functionality
- Update git-hooks README with comprehensive --shared documentation
- Document benefits, use cases, and workflow for shared hooks
Implements support for installing git hooks to a versioned directory
(.beads-hooks/) that can be committed to the repository and shared with
team members. This solves the team collaboration issue where hooks need
to be installed in pre-built containers.
Changes:
- Add --shared flag to 'bd hooks install' command
- Install hooks to .beads-hooks/ when --shared is used
- Automatically configure git config core.hooksPath
- Update help text to explain shared mode
Fixes#229
The test was failing on Windows CI because of insufficient time resolution
between creating an issue and adding a comment. Both operations could
complete within the same time unit, causing identical timestamps.
Added a 2ms sleep between operations to ensure updated_at is strictly
after the original timestamp, even on systems with lower time resolution.
Fixes: bd-pi7u
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes status filter bug, adds multi-select priority filter, find-as-you-type search, and interactive stats cards. Includes visual improvements for hover effects and alignment.
Co-authored-by: maphew <matt.wilkie@yukon.ca>
Fixes daemon and bd sync to honor BEADS_SYNC_BRANCH environment variable
as documented in PROTECTED_BRANCHES.md for CI/CD temporary overrides.
Changes:
- Updated internal/syncbranch.Get() to prioritize env var over DB config
- Both daemon sync and bd sync CLI now use syncbranch.Get()
- Added comprehensive tests for env var override behavior
- Validates branch names using git-style rules
This enables CI/CD workflows to override sync branch per-job without
mutating database config.
Based on PR #364 by Charles P. Cross <cpdata@users.noreply.github.com>
Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
Fixes#359
The daemon's sync branch logic was hardcoding the JSONL path to .beads/beads.jsonl, ignoring the dynamic discovery logic used elsewhere. This caused sync failures in repositories where the JSONL file has a different name (e.g., beads.base.jsonl, issues.jsonl).
Changes:
- Updated cmd/bd/daemon_sync_branch.go to use findJSONLPath() instead of hardcoded path
- Implemented relative path calculation for correct worktree placement
- Applied fix to both push (sync to worktree) and pull (sync from worktree) operations
This works together with PR #360 to fix team/protected branch sync issues.
Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
Fixes#358
The daemon was ignoring daemon.auto_commit and daemon.auto_push configuration values stored in the database unless the corresponding CLI flags were explicitly provided. This prevented bd init --team configuration from working as expected.
Changes:
- Modified cmd/bd/daemon.go to check database config when flags are not explicitly set
- Uses beads.FindDatabasePath() to locate the database and sqlite.New() to read config
- Only applies when starting daemon (skips for --stop, --status, --health, etc.)
Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
Fixes#362
The test TestCleanupMergeArtifacts_CommandInjectionPrevention was failing on Windows because it checks for /etc/passwd, which is a Unix-specific file that doesn't exist on Windows.
Added runtime.GOOS check to skip the /etc/passwd verification on Windows while maintaining the security check on Unix systems.
Windows test fixes (bd-web8):
- Add sanitizeMetadataKey() to replace colons with underscores
- Windows absolute paths (e.g., C:\...) contain colons that conflict with
metadata key separator ':'
- Update tests to use sanitized keys when checking metadata
- Tests now pass on Windows by auto-sanitizing path-based keys
Nix flake fixes (bd-8y1a):
- Update vendorHash in default.nix to match current Go module dependencies
- Hash mismatch was causing Nix build failures in CI
Test improvements:
- Rename TestUpdateExportMetadataInvalidKeySuffix to reflect new behavior
- Test now verifies sanitization instead of rejection
- All tests pass locally
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This repo explicitly configures beads.jsonl in metadata.json due to git
history reasons. The issues.jsonl file was stale (102 issues vs 622 in
beads.jsonl) and not being used.
bd doctor correctly detected this as a problem - having multiple JSONL
files can cause sync and merge conflicts.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Previously bd doctor warned about using beads.jsonl vs issues.jsonl, but
users should be free to configure any name they want. The real problems are:
1. Having multiple JSONL files (sync/merge conflicts)
2. Configuration not matching reality
Changes:
- Rewrote CheckLegacyJSONLFilename to scan for ALL .jsonl files
- Now filters out merge artifacts (backup, .orig, .bak, etc.)
- Warns only when multiple real JSONL files exist
- Added CheckDatabaseConfig to detect when configured paths do not match
what actually exists on disk
- Updated tests to verify backup files are ignored
- Added test cases for custom JSONL filenames
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
The canonical beads database name is issues.jsonl. Tens of thousands of users
have issues.jsonl, and beads.jsonl was only used by the Beads project itself
due to git history pollution.
Changes:
- Updated bd doctor to warn about beads.jsonl instead of issues.jsonl
- Changed default config from beads.jsonl to issues.jsonl
- Reversed precedence in checkGitForIssues to prefer issues.jsonl
- Updated git merge driver config to use issues.jsonl
- Updated all tests to expect issues.jsonl as the default
issues.jsonl is now the canonical default; beads.jsonl is legacy
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Failure Type: Real
Root Cause: Test was not initializing the global rootCtx variable that getAssignedStatus depends on, causing it to return nil
Fix Applied: Added rootCtx initialization with proper cleanup using defer, matching the pattern used in other tests
Verification: All tests now pass (go test ./...)
Fixes bd-9f86-baseline-test
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Problem:
- TestFallbackToDirectModeEnablesFlush hung with database deadlock
- TestIdempotentImportNoTimestampChurn and TestImportMultipleUnchangedIssues also hung
- All three tests call flushToJSONL() or autoImportIfNewer() which require rootCtx
Solution:
Applied the same rootCtx initialization pattern from v0.24.1 (commit 822baa0)
to the remaining hanging tests:
- TestFallbackToDirectModeEnablesFlush in direct_mode_test.go
- TestIdempotentImportNoTimestampChurn in import_idempotent_test.go
- TestImportMultipleUnchangedIssues in import_idempotent_test.go
Results:
- Before: Tests hung for 5+ minutes with database deadlock
- After: All tests pass in ~0.1s each
Fixes#355🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updates test and documentation to reflect the intentional change from
issues.jsonl to beads.jsonl (commit 7b865eb from Nov 20, 2025).
Fixes GH #356🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds missing date range and priority filtering to bd search for feature
parity with bd list. Part of command standardization epic (bd-au0).
Changes:
- Add date range flags: --created-after/before, --updated-after/before,
--closed-after/before
- Add priority range flags: --priority-min, --priority-max
- Support multiple date formats (RFC3339, YYYY-MM-DD, etc.)
- Apply filters in both direct mode and daemon RPC mode
- Add comprehensive tests for new filters
Examples:
bd search "security" --priority-min 0 --priority-max 2
bd search "bug" --created-after 2025-01-01
bd search "refactor" --updated-after 2025-01-01 --priority-min 1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Overview: Added comprehensive test infrastructure to handle the large
test suite (41K LOC, 313 tests in cmd/bd alone) with automatic skipping
of known broken tests.
Changes:
- .test-skip: List of broken tests to skip (with GH issue references)
- scripts/test.sh: Smart test runner that auto-skips broken tests
- docs/TESTING.md: Comprehensive testing guide
- .claude/test-strategy.md: Quick reference for AI agents
- Updated Makefile to use new test script
Known Issues Filed:
- GH #355: TestFallbackToDirectModeEnablesFlush (database deadlock)
- GH #356: TestFindJSONLPathDefault (wrong JSONL filename)
Performance: 3min total (180s compilation, 3.8s execution)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements bd-au0.2, completing all P0 tasks in the command standardization epic.
Changes:
- Add --add-label, --remove-label, --set-labels flags to bd update
- Support multiple labels via repeatable flags
- Implement in both daemon and direct modes
- Add comprehensive tests for all label operations
The bd update command now supports:
bd update <id> --add-label <label> # Add one or more labels
bd update <id> --remove-label <label> # Remove one or more labels
bd update <id> --set-labels <labels> # Replace all labels
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements bd-au0.4: Standardize priority flag parsing across all commands.
Changes:
- Use registerPriorityFlag() for main priority flag (was IntP)
- Change priority-min/max from Int to String flags
- Add validation import and use ValidatePriority() for all priority parsing
- Update both direct mode and daemon RPC code paths
Now supports both formats consistently:
- Numeric: --priority 0, --priority-min 1, --priority-max 2
- P-format: --priority P0, --priority-min P1, --priority-max P2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Git merge drivers only support three placeholders:
- %O (ancestor/base)
- %A (current version)
- %B (other branch's version)
The code was incorrectly using %L and %R, which don't exist in git,
causing them to be passed through literally and breaking JSONL merges.
Changes:
- Fixed merge driver config in init.go, merge.go, README.md, docs
- Added detection in bd doctor with clear error messages
- Added auto-fix in bd doctor --fix
- Added proactive warning in bd sync before git pull
- Added reactive error detection after merge failures
- Updated all tests to use correct placeholders
Now users get helpful guidance at every step:
1. bd doctor detects the issue
2. bd doctor --fix auto-corrects it
3. bd sync warns before pulling if misconfigured
4. Error messages suggest bd doctor --fix when merge fails
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Relocate documentation files to centralize all .md files in docs/ directory
(except those with historical precedent in specific locations like commands/,
examples/, integrations/, etc.).
Files moved:
- cmd/bd/doctor/claude.md -> docs/CLAUDE_INTEGRATION.md
- cmd/bd/MAIN_TEST_REFACTOR_NOTES.md -> docs/MAIN_TEST_REFACTOR_NOTES.md
- cmd/bd/TEST_SUITE_AUDIT.md -> docs/TEST_SUITE_AUDIT.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>