5526 Commits

Author SHA1 Message Date
dependabot[bot]
f827086b27 chore(deps): bump golang.org/x/term from 0.38.0 to 0.39.0 (#1059)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.38.0 to 0.39.0.
- [Commits](https://github.com/golang/term/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 19:30:07 -08:00
dependabot[bot]
b9a1ef6128 chore(deps): bump fastmcp in /integrations/beads-mcp (#1060)
chore(deps): bump fastmcp from 2.14.1 to 2.14.3 in /integrations/beads-mcp

Bug fixes in this release:
- Fix HTTP transport timeout defaulting to 5 seconds
- OAuth token storage TTL fix
- Redis key prefix for ACL isolation
- ContextVar propagation for ASGI-mounted servers
2026-01-12 19:30:02 -08:00
beads/crew/dave
ec1a32b9a8 fix(storage): add reconnectMu RLock protection to prevent race condition (#1054)
Add missing reconnectMu.RLock() protection to storage methods that were
vulnerable to the same race condition fixed in GH#607. The FreshnessChecker
can trigger reconnect() which closes s.db while queries are in flight,
causing "database is closed" errors during daemon export operations.

Protected methods:
- labels.go: GetLabelsForIssues (GetLabels intentionally unprotected - called from GetIssue which holds lock)
- comments.go: GetIssueComments, GetCommentsForIssues
- dependencies.go: GetDependencyCounts, GetDependencyRecords, GetAllDependencyRecords, GetDependencyTree, loadDependencyGraph
- config.go: SetConfig, GetConfig, GetAllConfig, DeleteConfig, SetMetadata, GetMetadata
- dirty.go: MarkIssueDirty, GetDirtyIssues, GetDirtyIssueHash, GetDirtyIssueCount
- events.go: GetEvents, GetStatistics, GetMoleculeProgress
- hash.go: All hash methods
- hash_ids.go: GetNextChildID, ensureChildCounterUpdated (getNextChildNumber unprotected - called internally)

Internal helpers called from already-locked contexts intentionally omit
RLock to avoid deadlock (Go's RWMutex doesn't support recursive locking).

Fixes: bd-vx7fp

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

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-12 18:29:42 -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
Conall O'Brien
a8f7c21a74 Add jira-beads-sync CLI+Claude plugin to COMMUNITY_TOOLS.md (#1052) 2026-01-12 17:28:11 -08:00
beads/refinery
c706e0ac0f sync: patrol cycle complete, queue empty 2026-01-12 16:46:12 -08:00
wolf
b171ab083c sync: closed bd-u1mcn (PR #1045 merged) 2026-01-12 16:44:15 -08:00
grip
24e0afc0f3 sync: closed bd-d7kdn 2026-01-12 16:43:42 -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
grip
4a50cadba0 sync: update issues.jsonl 2026-01-12 16:43:14 -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
grip
1a849120e0 sync: update issues.jsonl 2026-01-12 16:42:29 -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
beads/refinery
fb0a9816d8 bd daemon sync: 2026-01-12 16:41:23 2026-01-12 16:41:23 -08:00
beads/refinery
388ec7573b bd daemon sync: 2026-01-12 16:40:18 2026-01-12 16:40:18 -08:00
beads/refinery
9e2b8bea18 bd daemon sync: 2026-01-12 16:40:12 2026-01-12 16:40:12 -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
dave
f64290e2a5 sync: beads/crew/dave
Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-12 16:39:52 -08:00
beads/refinery
b11f8056a7 bd daemon sync: 2026-01-12 16:39:09 2026-01-12 16:39:09 -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
beads/refinery
d8e3bf1c82 bd daemon sync: 2026-01-12 16:38:48 2026-01-12 16:38:48 -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
beads/refinery
216ea80f18 bd daemon sync: 2026-01-12 16:38:06 2026-01-12 16:38:06 -08:00
beads/refinery
df526638f5 bd daemon sync: 2026-01-12 16:37:03 2026-01-12 16:37:03 -08:00
beads/refinery
1770f75715 bd daemon sync: 2026-01-12 16:36:01 2026-01-12 16:36:01 -08:00
beads/refinery
f1d9bf65c6 bd daemon sync: 2026-01-12 16:35:32 2026-01-12 16:35:32 -08:00
beads/refinery
b4d305d9e8 bd daemon sync: 2026-01-12 16:35:30 2026-01-12 16:35:30 -08:00
beads/refinery
175b891413 bd daemon sync: 2026-01-12 16:35:28 2026-01-12 16:35:28 -08:00
beads/refinery
e9eef8d09a bd daemon sync: 2026-01-12 16:34:51 2026-01-12 16:34:51 -08:00
fang
7eab16715f docs: update Jujutsu integration to use bd merge (GH#906)
- Remove standalone beads-merge binary section (no longer maintained)
- Update Jujutsu config to use `bd merge` instead of `beads-merge`
- Fix config path to standard `~/.config/jj/config.toml`
- Add note that tool only works for .beads/issues.jsonl

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 16:34:31 -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/refinery
29c765c4a3 bd daemon sync: 2026-01-12 03:22:17 2026-01-12 03:22:17 -08: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/refinery
42079fba5b bd daemon sync: 2026-01-12 03:15:38 2026-01-12 03:15:38 -08:00
beads/refinery
080eb77ea8 bd daemon sync: 2026-01-12 03:11:01 2026-01-12 03:11:01 -08:00
beads/refinery
22cd96bf70 bd daemon sync: 2026-01-12 03:04:17 2026-01-12 03:04:17 -08:00
beads/refinery
da072fbf68 bd daemon sync: 2026-01-12 02:45:45 2026-01-12 02:45:45 -08:00
beads/refinery
53cc3ff7fe bd daemon sync: 2026-01-12 02:45:39 2026-01-12 02:45:39 -08:00
beads/refinery
b1b07c8af6 bd daemon sync: 2026-01-12 02:43:42 2026-01-12 02:43:42 -08:00
beads/refinery
47c19515f3 bd daemon sync: 2026-01-12 02:40:28 2026-01-12 02:40:28 -08:00
beads/refinery
615dd751ef bd daemon sync: 2026-01-12 02:33:45 2026-01-12 02:33:45 -08:00
beads/refinery
95de986bf3 bd daemon sync: 2026-01-12 02:33:14 2026-01-12 02:33:14 -08:00
beads/refinery
6df98e78dc bd daemon sync: 2026-01-12 02:32:13 2026-01-12 02:32:13 -08:00
beads/refinery
453400433b bd daemon sync: 2026-01-12 02:29:22 2026-01-12 02:29:22 -08:00
beads/refinery
6bf6f469dc bd daemon sync: 2026-01-12 02:27:11 2026-01-12 02:27:11 -08:00
beads/refinery
a6779e0799 bd daemon sync: 2026-01-12 02:25:55 2026-01-12 02:25:55 -08:00
beads/refinery
a3b4f0423d bd daemon sync: 2026-01-12 02:17:47 2026-01-12 02:17:47 -08:00