Commit Graph

1633 Commits

Author SHA1 Message Date
Peter Chanthamynavong
5d93aaf722 fix(sync): remove orphaned restoreBeadsDirFromBranch function (#1121)
Remove dead code that was inadvertently orphaned when PR #918 refactored
the sync flow. The function was never called since v0.47.0.

The function caused GH#1100 by running `git checkout HEAD -- .beads/`
which restored the entire .beads/ directory, overwriting uncommitted
config.yaml changes.

Add regression test (TestConfigPreservedDuringSync) to prevent similar
restoration logic from being reintroduced.

Fixes #1100
2026-01-15 19:22:52 -08:00
mayor
d3db8253ff fix(storage): use factory for cross-repo routing to respect backend config
When routing issues to other repos (via contributor routing or --rig flag),
the code was hardcoding sqlite.New instead of using the storage factory.
This meant Dolt-configured repos would fail when receiving routed issues.

Changed two locations:
- Contributor routing (line 357): use factory.NewFromConfig
- createInRig --rig flag (line 789): use factory.NewFromConfig

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 12:44:12 -08:00
beads/crew/dave
fe67e9e232 fix(test): fix TestInitNoDbMode for no-db mode config persistence
Changes:
- Save issue-prefix in config.yaml when using --no-db mode
  (previously only saved in database which doesn't exist in no-db mode)
- Add config.ResetForTesting() to allow reloading config in tests
- Simplify test to verify config values rather than execute subsequent
  commands (cobra's flag caching makes multi-Execute() testing complex)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:37:57 -08:00
beads/crew/dave
81828db6ef fix(test): remove pre-existing issues.jsonl in TestExportOnlySync
setupGitRepo now creates an empty issues.jsonl for RepoContext,
which triggers 'JSONL changed since import' validation in tests
that set up their own .beads/ directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 08:02:20 -08:00
Peter Chanthamynavong
0a48519561 feat(context): centralize RepoContext API for git operations (#1102)
Centralizes repository context resolution via RepoContext API, fixing bugs where git commands run in the wrong repo when BEADS_DIR points elsewhere or in worktree scenarios.
2026-01-15 07:55:08 -08:00
beads/crew/emma
159114563b chore(release): v0.47.2
- Dolt backend (experimental)
- bd show --children flag
- NixOS support improvements
- Fix redirect + sync-branch incompatibility
- Fix doctor project-level settings detection
- Fix contributor routing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:57:28 -08:00
beads/crew/fang
d1722d9204 docs: update daemon CLI syntax from flags to subcommands
Update all documentation to use the new subcommand syntax:
- `bd daemon --start` → `bd daemon start`
- `bd daemon --stop` → `bd daemon stop`
- `bd daemon --status` → `bd daemon status`
- `bd daemon --health` → `bd daemon status --all`
- `--global=false` → `--local`

The old flag syntax is deprecated but still works with warnings.

Closes: bd-734vd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:47:15 -08:00
mayor
669ea40684 feat(storage): add --backend flag for Dolt backend selection
Phase 2 of Dolt integration - enables runtime backend selection:

- Add --backend flag to bd init (sqlite|dolt)
- Create storage factory for backend instantiation
- Update daemon and main.go to use factory with config detection
- Update database discovery to find Dolt backends via metadata.json
- Fix Dolt schema init to split statements for MySQL compatibility
- Add ReadOnly mode to skip schema init for read-only commands

Usage: bd init --backend dolt --prefix myproject

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:42:31 -08:00
Steve Yegge
43ce905896 fix(doctor): detect MCP server in project-level settings (#1104)
Apply same fix as #1091 to isMCPServerInstalled(): check all three
settings locations (user-level, project-level, and project-local).

- Extract checkMCPInSettings() helper function
- Check ~/.claude/settings.json, .claude/settings.json, and
  .claude/settings.local.json
- Add TestIsMCPServerInstalledProjectLevel with positive and negative cases

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:53:51 -08:00
beads/crew/giles
511129693e fix(create): remove unused routedToTarget variable
The variable was declared and set but never actually used for anything,
just assigned to blank identifier. Clean up dead code from PR #1088.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:51:52 -08:00
James MacAulay
12e0caf90e fix(doctor): detect plugin and hooks in project-level settings (#1091)
* fix(doctor): detect beads plugin in project-level settings

isBeadsPluginInstalled() now checks project-level settings files
(.claude/settings.json and .claude/settings.local.json) in addition
to user-level settings (~/.claude/settings.json).

This fixes the contradictory bd doctor output where the plugin check
passes but the integration check warns "Not configured" when the
plugin is enabled at project scope.

Fixes #1090

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

* fix(doctor): detect Claude hooks in project-level settings.json

hasClaudeHooks() was missing .claude/settings.json - it only checked
.claude/settings.local.json for project-level hooks.

Now checks all three locations:
- ~/.claude/settings.json (user-level)
- .claude/settings.json (project-level)
- .claude/settings.local.json (project-level, gitignored)

Also uses filepath.Join consistently for cross-platform compatibility.

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 20:51:16 -08:00
Peter Chanthamynavong
31239495f1 fix(routing): complete bd init --contributor routing (bd-6x6g) (#1088)
Implements the missing contributor routing logic so bd init --contributor actually works. Contributors' issues automatically route to ~/.beads-planning/ while maintainers' issues stay local.
2026-01-14 20:50:56 -08:00
Michael
b9d2799d29 fix(docs): update command syntax from '--' to single argument format for start, stop and status. (#1086) 2026-01-14 20:43:07 -08:00
beads/crew/dave
3298c45e4b fix(sync): handle redirect + sync-branch incompatibility (bd-wayc3)
When a crew worker's .beads/ is redirected to another repo, bd sync
now detects this and skips all git operations (sync-branch worktree
manipulation). Instead, it just exports to JSONL and lets the target
repo's owner handle the git sync.

Changes:
- sync.go: Detect redirect early, skip git operations when active
- beads.go: Update GetRedirectInfo() to check git repo even when
  BEADS_DIR is pre-set (findLocalBdsDirInRepo helper)
- validation.go: Add doctor check for redirect + sync-branch conflict
- doctor.go: Register new check, remove undefined CheckMisclassifiedWisps

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

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-14 20:36:30 -08:00
beads/crew/giles
ff67b88ea9 docs: Add agent warning about interactive bd edit command
The bd edit command opens an interactive editor ($EDITOR) which AI agents
cannot use. Added warnings to AGENTS.md, AGENT_INSTRUCTIONS.md, and
cmd/bd/AGENTS.md directing agents to use bd update with flags instead.

Fixes: bd-3ft33

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:58:07 -08:00
Steve Yegge
e069c04a67 Merge pull request #1077 from Atmosphere-Aviation/fix/bd-sync-redirect-handling
fix(sync): Handle redirected beads directories in gitCommitBeadsDir
2026-01-13 18:36:01 -08:00
Steve Yegge
d544f278a5 Merge pull request #1073 from niklas-wortmann/junie
feat: add Junie agent integration
2026-01-13 13:06:18 -08:00
Steve Yegge
b5fbbb3a09 Merge pull request #1067 from Atmosphere-Aviation/fix/gate-list-closed-section
Fix bd gate list: Separate closed gates into own section
2026-01-13 13:06:15 -08:00
slit
f36c8f6556 fix(sync): Handle redirected beads directories in gitCommitBeadsDir
When beads directory is redirected to a different repository (via bd-arjb),
gitCommitBeadsDir() was running git add from the current working directory's
repo root instead of the beads directory's repo root, causing exit status 128.

This fix adds the same redirect handling already present in gitHasBeadsChanges()
and gitHasUncommittedBeadsChanges() - checking GetRedirectInfo() and using
filepath.Dir(beadsDir) as the repo root when redirected.

Fixes: git add failed: exit status 128 errors during bd sync
2026-01-13 11:51:20 -08:00
grip
cae793b843 fix(bd): show 'no children' message when issue has no children
The --children flag would produce no output for issues without children.
Initialize the map entry in processIssue so the display loop can show
"No children found" message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:42:30 -08:00
Steve Yegge
d28d1f0788 Merge pull request #1071 from pentop/fix/comments-short-id
fix: resolve short IDs in comments add/list daemon mode (#1070)
2026-01-13 11:41:42 -08:00
Julian Knutsen
a2bf15ee48 feat(bd): add --children flag to bd show command (#1069)
Adds a --children flag to the bd show command that displays only the
children of the specified issue. This is useful for quickly viewing
child steps of an epic without the full issue details.

The flag supports:
- Default mode: shows children with full dependency line formatting
- --short mode: shows compact one-liner per child
- --json mode: outputs children in JSON format

Fixes gt-lzf3.5

Co-authored-by: toast <julianknutsen@users.noreply.github>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:41:28 -08:00
Jan-Niklas W
d475e424c2 feat: add Junie agent integration
Add support for JetBrains Junie AI agent:
- Create .junie/guidelines.md with workflow instructions
- Create .junie/mcp/mcp.json for MCP server configuration
- Add 'junie' to BuiltinRecipes in recipes.go
- Add runJunieRecipe() handler in setup.go
- Add website documentation
- Add integrations/junie/README.md

Usage: bd setup junie
2026-01-13 08:41:25 -06:00
Mike
66007ac3ea fix: resolve short IDs in comments add/list daemon mode (#1070)
Add daemonClient.ResolveID() calls before AddComment and ListComments
operations in daemon mode, following the pattern from update.go.

Previously, short IDs (e.g., "5wbm") worked with most bd commands but
failed with `comments add` and `comments list` when using the daemon.
The short ID was passed directly to the RPC server which expected full
IDs (e.g., "prefix-5wbm").

Changes:
- cmd/bd/comments.go: Add ID resolution before daemon RPC calls
- internal/rpc/comments_test.go: Update tests to reflect client-side
  resolution pattern (RPC server expects full IDs, CLI resolves first)

Fixes: https://github.com/steveyegge/beads/issues/1070
2026-01-13 13:28:30 +00:00
Mike
1f84f7cce3 test: add failing tests for short ID support in comments (#1070)
Add tests demonstrating that `bd comments add` and `bd comments list`
don't accept short IDs in daemon mode, while other commands do.

Tests added:
- TestCLI_CommentsAddShortID (cli_fast_test.go)
  - Tests short ID, partial ID, and comment alias in direct mode (passes)

- TestCommentAddWithShortID (internal/rpc/comments_test.go)
  - Tests RPC layer with short ID (FAILS - demonstrates bug)

- TestCommentListWithShortID (internal/rpc/comments_test.go)
  - Tests listing comments with short ID (FAILS - demonstrates bug)

The fix should add daemonClient.ResolveID() before AddComment/ListComments,
following the pattern in update.go and label.go.

Refs: https://github.com/steveyegge/beads/issues/1070
2026-01-13 13:22:19 +00:00
nux
d69bf4faa8 Fix bd gate list: Separate closed gates into own section
Previously, displayGates() always showed 'Open Gates' header even when
closed gates were included via --all flag. Also, closed gates would
appear mixed with open gates under the misleading 'Open Gates' header.

Changes:
- Modified displayGates() to accept showAll parameter
- Separates gates into 'Open Gates' and 'Closed Gates' sections
- Closed gates only shown when --all flag is used
- Fixed handleGateList RPC handler to use ExcludeStatus instead of
  Status filter for consistency with CLI behavior

Fixes gas-town issue go-47m
2026-01-13 00:46:50 -08:00
dennis
c9cc1308d5 fix(test): ignore mtime-only changes in repo beads guard
The test guard was flagging false positives when SQLite shm/wal files
had their mtime updated from read-only operations (config loading, etc.)
without any actual content modification.

Now only reports when file size changes, which indicates actual content
modification rather than just file access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:20:48 -08:00
dennis
f703237c3d fix(ready): prevent wisps from appearing in bd ready
Add multiple layers of defense against misclassified wisps:
- Importer auto-detects -wisp- pattern and sets ephemeral flag
- GetReadyWork excludes -wisp- IDs via SQL LIKE clause
- Doctor check 26d detects misclassified wisps in JSONL

This addresses recurring issue where wisps with missing ephemeral
flag would pollute bd ready output after JSONL import.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:14:12 -08:00
fang
2332e6f5bd fix: update tests for getCurrentBranchOrHEAD and getPIDFileForSocket
- sync_git_test.go: getCurrentBranchOrHEAD now returns 1 value (not 2)
- daemon_basics_test.go: getPIDFileForSocket uses dbPath not socketPath
- daemon_autostart.go: mark unused socketPath param with underscore

These tests were broken by recent refactors that changed function signatures
but didn't update the corresponding test files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:51:56 -08:00
Zach Barahal
7de4b428f3 fix: use dbPath instead of socketPath for beadsDir derivation (#1064)
When using short socket paths (workspaces with paths >103 chars),
filepath.Dir(socketPath) returns /tmp/beads-XXXXX/ instead of the
actual .beads/ directory. This caused TryDaemonLock to look in the
wrong location, always return false, clean up the startlock, and
recurse infinitely causing stack overflow.

Changed 4 occurrences in acquireStartLock, handleStaleLock,
handleExistingSocket, and getPIDFileForSocket to use
filepath.Dir(dbPath) which correctly points to .beads/.

Fixes: gt-qlt

Co-authored-by: furiosa <mayor@gastown.local>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:06:00 -08:00
beads/crew/grip
931187f493 fix: remove unused error return from getCurrentBranchOrHEAD
The function always returns nil for error since it is designed to
return HEAD on detached HEAD state. Simplify signature to just
return string.

Fixes golangci-lint unparam warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:43:44 -08:00
beads/crew/emma
66c5c4d805 feat(doctor): add check for stale .beads/mq/ files (bd-dx2dc)
Add bd doctor check that detects legacy gastown merge queue JSON files
in .beads/mq/. These files are local-only remnants from the old mrqueue
implementation and can safely be deleted since gt done already creates
merge-request wisps in beads.

- CheckStaleMQFiles() detects .beads/mq/*.json files
- FixStaleMQFiles() removes the entire mq directory
- Comprehensive tests for check and fix

This is the first step toward removing the mrqueue side-channel from
gastown. The follow-up convoy will update Refinery/Witness to use
beads exclusively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:42:51 -08:00
beads/crew/emma
3854bb29e9 feat(doctor): add check for last-touched file tracking
Add bd doctor check that warns if .beads/last-touched is tracked by git.
This file is local runtime state that should never be committed, as it
causes spurious diffs in other clones.

- CheckLastTouchedNotTracked() detects if file is git-tracked
- FixLastTouchedTracking() untracks with git rm --cached
- Comprehensive tests for all scenarios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:37:57 -08:00
Steve Yegge
6b9be4595a Merge pull request #1033 from phredrick42/fix-jj-detached-head-upstream-check
fix(daemon): check sync-branch upstream for jj/jujutsu compatibility
2026-01-12 17:30:06 -08:00
Ismar
d931f81427 feat: add prek support as pre-commit alternative (#1040)
prek (https://prek.j178.dev) is a faster Rust-based alternative to
pre-commit that uses the same .pre-commit-config.yaml config files.

Changes:
- Add prek detection pattern in hookManagerPatterns (before pre-commit
  to ensure correct detection since prek hooks may contain 'pre-commit')
- Handle prek in checkManagerBdIntegration using same config parser
- Update init_git_hooks.go to recognize prek-installed hooks
- Rename isPreCommit field to isPreCommitFramework for clarity
- Use regex pattern matching all pre-commit/prek signatures consistently
- Add test cases for prek run and prek hook-impl signatures

Co-authored-by: Ismar Iljazovic <ismar@gmail.com>
2026-01-12 17:29:57 -08:00
Peter Chanthamynavong
215f726be3 test: skip read-only file tests on macOS (#1047)
macOS allows file owners to write to their own read-only (0444) files,
so TestSetupGlobalGitIgnore_ReadOnly cannot exercise the "Unable to write"
code path on this platform.

Skip both test cases on darwin with an explanatory message.
2026-01-12 16:43:22 -08:00
Ismar
dc28efe9d1 fix: isolate TestSetupGlobalGitIgnore_ReadOnly from user's git config (#1045)
The test was failing because it called 'git config --global core.excludesfile'
which returned the real user's gitignore path instead of using the test's
temp directory.

Fix: Set GIT_CONFIG_GLOBAL env var to an empty temp config file, ensuring
the test uses the temp directory's .config/git/ignore path as intended.

Also extracted the isolation logic into a reusable setupIsolatedGitConfig helper.

Co-authored-by: Ismar Iljazovic <ismar@gmail.com>
2026-01-12 16:42:30 -08:00
Ismar
75f03b782f fix: pass hookArgs to runPrePushHook for chained hook support (#1043)
Fixes #1041

The pre-push hook was not passing arguments to chained hooks,
causing them to fail. This change:

1. Changes runPrePushHook() to accept args []string parameter
2. Passes args to runChainedHook() instead of nil
3. Updates call site to pass hookArgs
4. Renames local 'args' to 'statusArgs' to avoid variable shadowing

Co-authored-by: Ismar Iljazovic <ismar@gmail.com>
2026-01-12 16:41:32 -08:00
Eugene Sukhodolin
a157def42d fix(export): remove export from read-only commands to fix dirty issue clearing (#1036)
The export command was incorrectly listed in readOnlyCommands, causing the SQLite database to be opened in read-only mode. This prevented export from clearing dirty issues and updating the JSONL file hash.
2026-01-12 16:40:01 -08:00
Eugene Sukhodolin
7b8c322e68 fix(autoflush): preserve comments during full re-export triggered by hash mismatch (#1039)
Problem:
When a JSONL file hash mismatch was detected (e.g., after git operations
that modify the JSONL without updating export_hashes), the autoflush
system would trigger a full re-export. During this re-export, all issue
comments were silently dropped from the exported JSONL file.

Steps to reproduce:
1. Have a beads database with issues containing comments
2. Create a situation where JSONL hash doesn't match stored hash
   (e.g., clone a repo, or manual JSONL edits)
3. Run any bd command that triggers autoflush (e.g., `bd create foo`)
4. Observe warning: "JSONL file hash mismatch detected"
5. Check .beads/issues.jsonl - all comments are now missing

Root cause:
Two different export code paths existed:
- exportToJSONLWithStore (daemon_sync.go) - correctly populated comments
- fetchAndMergeIssues (autoflush.go) - only fetched dependencies, NOT comments

When hash mismatch triggered a full re-export via the autoflush path,
fetchAndMergeIssues was called but it never populated issue.Comments,
resulting in all comments being lost.

Fix:
Add GetIssueComments call in fetchAndMergeIssues to populate comments
for each issue before export, matching the behavior of exportToJSONLWithStore.

Note: Labels were not affected because GetIssue() already populates them
internally. Comments are stored in a separate table and require explicit
fetching via GetIssueComments().
2026-01-12 16:39:06 -08:00
Tim Visher
6da965587b Ensure daemon autostart lock dir exists (#1037)
Co-authored-by: OpenAI Codex <codex@openai.com>
2026-01-12 16:38:13 -08:00
Phredrick Phool
228b7195b1 fix(sync): handle detached HEAD in bd sync --status
Add getCurrentBranchOrHEAD() which returns "HEAD" when in detached HEAD
state instead of failing. This fixes bd sync --status for jj/jujutsu users.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 07:09:25 -06:00
Phredrick Phool
465f39b366 Merge remote-tracking branch 'origin/main' into fix-jj-detached-head-upstream-check
# Conflicts:
#	cmd/bd/sync_git_test.go
2026-01-12 06:49:51 -06:00
Phredrick Phool
78fec4bc45 fix(daemon): check sync-branch upstream for jj/jujutsu compatibility
When sync-branch is configured, check that branch's upstream instead of
current HEAD's upstream. This fixes --auto-push with jj/jujutsu which
always operates in detached HEAD mode.

Adds gitBranchHasUpstream(branch) to check specific branch's upstream
tracking, independent of current HEAD state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:44:31 -06:00
beads/crew/emma
279192c5fb chore: Bump version to 0.47.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 03:21:12 -08:00
beads/crew/dave
4dae3fa338 feat(list): add --ready flag to show only available work (bd-ihu31)
The --ready flag filters to status=open, excluding hooked, in_progress,
blocked, and deferred issues. This makes it easy to see work that can
actually be picked up.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 02:05:13 -08:00
beads/crew/fang
6dfd7588b3 fix(mol): prevent nil pointer dereference in wisp create
GetIssue returns (nil, nil) when an issue is not found, but the code
assumed a non-nil issue when err was nil. Added nil checks before
accessing issue fields.

Fixes crash when running `bd mol wisp create` with nonexistent proto.

Closes: gt-2uzn2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 01:35:22 -08:00
Nicolas Suzor
7fe824781a fix: use route prefix when creating issues in rigs (#1028)
* fix(create): Use prefix from routes.jsonl when creating issues with --rig

When using `bd create --rig <name>`, the prefix from routes.jsonl was
being discarded. This caused issues to be created with the target
database's default prefix instead of the route's prefix.

This is particularly problematic when using the redirect mechanism to
share a single database across multiple rigs - the redirect correctly
routes to the shared database, but the prefix was not being applied.

The fix:
1. Capture the prefix from routing.ResolveBeadsDirForRig()
2. Temporarily override the target database's issue_prefix config
3. Restore the original prefix after issue creation

Example scenario that now works:
- routes.jsonl: {"prefix": "aops-", "path": "src/academicOps"}
- src/academicOps/.beads/redirect points to ~/writing/.beads
- `bd create --rig aops "Test"` now creates aops-xxx instead of ns-xxx

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

* fix(create): pass prefix via struct field instead of mutating config

The previous approach temporarily mutated the database's issue_prefix
config during cross-rig issue creation, then restored it afterward.
This was fragile in multi-user scenarios where concurrent operations
could see the wrong prefix.

New approach:
- Add PrefixOverride field to types.Issue
- CreateIssue checks PrefixOverride first, uses it if set
- createInRig sets issue.PrefixOverride instead of mutating config

This passes state as a parameter rather than mutating shared state,
making it safe for concurrent multi-user access.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-12 01:20:32 -08:00
emma
1c1dabcfdd fix(duplicates): prefer issues with children/deps when choosing merge target (GH#1022)
The duplicate merge target selection now considers structural relationships:
1. Dependent count (children, blocked-by) - highest priority
2. Text reference count - secondary
3. Lexicographically smallest ID - tiebreaker

This fixes the bug where `bd duplicates --auto-merge` would suggest closing
an epic with 17 children instead of the empty shell duplicate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 00:45:25 -08:00
beads/crew/emma
44c17012e5 fix(doctor): exclude sync_base.jsonl from multiple JSONL files check (#1021)
sync_base.jsonl is an internal sync mechanism file used for 3-way merge,
not a competing issue database. The doctor check now correctly ignores it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 20:44:29 -08:00