Commit graph

8,875 commits

Author SHA1 Message Date
dependabot[bot]
9cdb62868e
chore(deps): bump github.com/dolthub/driver from 1.86.4 to 1.88.1 (#3830)
Bumps github.com/dolthub/driver from 1.86.4 to 1.88.1 and includes CI repair for the Nix vendor hash plus generated CLI docs.\n\n_codex-gpt-5-medium on behalf of CI Bot_
2026-05-11 15:08:03 -07:00
Dustin Brown
8931d69913
Merge pull request #3892 from gastownhall/revert-3891-revert-3862-fix/gh3860-dolt-cli-dir
Revert "Revert "revert: remove external server CLI dir override""
2026-05-11 14:48:48 -07:00
Dustin Brown
0fdaa27ed0
Revert "Revert "Revert external server CLI dir override" (#3891)"
This reverts commit 410cff40b9.
2026-05-11 14:48:20 -07:00
matt wilkie
410cff40b9
Revert "Revert external server CLI dir override" (#3891)
This reverts commit 9b0cf9e600. Reverts #3862 . Clean up after rogue agent merged before Dolt-related PR was cleared by @coffeegoddd
2026-05-11 14:39:03 -07:00
matt wilkie
87963b4ce9
Revert "Add external server CLI dir override (bd-fn9) (#3498)" (#3890)
This reverts commit 0fffa44a23.
2026-05-11 14:34:22 -07:00
matt wilkie
e7fb5793a4
Revert "Revert external server CLI dir override" (#3888)
This reverts commit 9b0cf9e600.
2026-05-11 14:30:44 -07:00
matt wilkie
9b0cf9e600
Revert external server CLI dir override
Reverts PR #3498 / commit 0fffa44a2302a496dfa4ffa838843b3bbf0ee122.\n\nPR #3498 added BEADS_DOLT_CLI_DIR routing without a confirmed reproduction and introduced an external-server push/pull regression. Remove that override and its docs/tests so main no longer requires a local CLI database directory in external-server mode.\n\n_codex-gpt-5- on behalf of CI Bot_
2026-05-11 13:00:02 -07:00
Dustin Brown
8ab102fa78
Merge pull request #3871 from coffeegoddd/db/schema
Db/schema
2026-05-10 21:36:08 -07:00
coffeegoddd☕️✨
c190250c29 /internal/storage/schema/migrations: remove add and commit calls in schema 2026-05-10 19:29:03 -07:00
coffeegoddd☕️✨
5a98cb7c78 /internal/storage/schema/migrations: fix index creation if not exists 2026-05-10 18:52:59 -07:00
coffeegoddd☕️✨
693bd32810 /internal/storage/schema/branch_migrate.go: fix branch migrate 2026-05-10 18:34:18 -07:00
coffeegoddd☕️✨
d3145a3152 /internal/storage: use branch migrate 2026-05-10 17:22:17 -07:00
coffeegoddd☕️✨
48fe1d6a47 /internal/storage/uow/doltserver_provider.go: fix provider 2026-05-10 17:03:24 -07:00
coffeegoddd☕️✨
b0a7ae4d2a /internal/storage/schema: more fixes 2026-05-10 16:53:12 -07:00
coffeegoddd☕️✨
173288d61d /internal/storage: remove backward compat stuff 2026-05-10 15:46:41 -07:00
matt wilkie
cb9d7aad5a
test: make embedded init hook path windows-safe (#3864) 2026-05-10 10:32:37 -07:00
coffeegoddd☕️✨
247e719112 /internal/storage: wip, removing backfill stuff 2026-05-10 09:56:28 -07:00
Dustin Brown
6859958387
Merge pull request #3863 from coffeegoddd/db/proxy-2
Db/proxy 2
2026-05-10 07:38:24 -07:00
coffeegoddd☕️✨
e4f0f9b196 /{docs,website}: gen docs 2026-05-10 07:20:21 -07:00
matt wilkie
2b4339dacb
deps: update vulnerable Go modules (#3855)
* deps: update vulnerable Go modules

* nix: update vendor hash for go deps
2026-05-10 07:19:44 -07:00
coffeegoddd☕️✨
23e11ff132 /cmd/bd/store_factory_nocgo.go: fix build 2026-05-10 07:14:56 -07:00
coffeegoddd☕️✨
c7aa60dcb4 /{cmd,internal}: tweaks before merge 2026-05-10 07:09:32 -07:00
coffeegoddd☕️✨
b01ddb6ffd /internal/storage/domain: wip 2026-05-10 06:57:43 -07:00
coffeegoddd☕️✨
cb04e03fdb /cmd/bd: get compiling again 2026-05-10 06:57:43 -07:00
coffeegoddd☕️✨
3d7173c3c1 /{internal,cmd,.gitignore}: wip, proxy server fixes and uow impl 2026-05-10 06:57:41 -07:00
Dustin Brown
5d087a6862
Merge pull request #3833 from coffeegoddd/db/proxy
Db/proxy
2026-05-10 06:52:03 -07:00
matt wilkie
dec53a2750
deps: update website npm dependencies (#3857) 2026-05-10 06:37:50 -07:00
matt wilkie
c4c3a83e65
deps: update MCP Python dependencies (#3856) 2026-05-10 06:37:26 -07:00
matt wilkie
a499c2bfe4
test(regression): make workspace cleanup robust (#3854) 2026-05-10 06:33:26 -07:00
matt wilkie
c62f012d8a
test(cmd/bd): use t.Chdir in drift tests to fix chdir race (#3747)
* test(cmd/bd): use t.Chdir in drift tests to fix chdir race (GH#3729-followup)

The TestCheckHooksDrift/Server/Remote tests in config_drift_test.go were
using the manual os.Chdir + defer os.Chdir(origDir) pattern, which is
not race-safe when other tests in the same package call t.Parallel and
share the process cwd.

t.Chdir (Go 1.24+) restores cwd via t.Cleanup and refuses to run if the
test (or any ancestor) is parallel — both eliminating the race window
and surfacing future misuse loudly.

Fixes flaky TestCheckHooksDriftNotGitRepo identified as a pre-existing
chdir race during PR #3716 review (mybd-j2s).

Verified: go test -count=20 -run '^TestCheckHooksDriftNotGitRepo$' passes.
Amp-Thread-ID: https://ampcode.com/threads/T-019dfe19-17ae-713e-bc3a-d7c9da6a117d
Co-authored-by: Amp <amp@ampcode.com>

* test(cmd/bd): accept embedded Dolt lock output

---------

Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: upgrade-test <test@beads.test>
2026-05-09 21:47:51 -07:00
Scott Hamilton
1cf8337340
fix(auto-import): restore empty-DB guard regressed by #3630, plus a test repair (#3691)
* fix(auto-import): restore top-level emptiness guard in maybeAutoImportJSONL (#2)

* fix(auto-import): restore top-level emptiness guard in maybeAutoImportJSONL

PR #3630 introduced jsonlImporter as a single-transaction fast-path for embedded mode and moved the TotalIssues>0 emptiness check inside that path. Stores that don't implement jsonlImporter (server-mode dolt store) fall through to the fallback multi-call path — which has no emptiness guard, so every bd command unconditionally runs importFromLocalJSONLFull on a non-empty Dolt.

importFromLocalJSONLFull's underlying ON DUPLICATE KEY UPDATE semantics in InsertIssueIntoTable then re-impose the (often stale) JSONL field values on top of live Dolt rows. Combined with the auto-export's debounce/commit-watermark gating in export_auto.go, partial-field bd updates (e.g. --append-notes alone, --priority=N alone) get clobbered: the next command's auto-import overwrites the just-written field with whatever the JSONL last had.

Restore the top-level GetStatistics+TotalIssues>0 guard that v1.0.3 had, before the path-fork. The embedded jsonlImporter retains its own atomic in-tx check (defense in depth against concurrent-writer races, which was the legitimate intent of #3630). The fallback path is now once again a true upgrade-recovery path: it only fires when the database is actually empty.

Reproducer (server mode):
1. bd update X --priority=2 --notes="X"
2. bd update X --append-notes "; appended"
3. bd update X --priority=3

Pre-fix: step 3 leaves notes='X' (the '; appended' is silently lost) and step 2 may revert priority to JSONL's stale value.
Post-fix: each single-field update preserves the unspecified fields from Dolt.

Test coverage gap: existing auto_import_upgrade_test.go is //go:build cgo and only exercises the embedded path. A non-CGO server-mode integration test would prevent reintroduction; left as a follow-up.

* test(auto-import): add server-mode fallback regression test for empty-DB guard

Adds two unit tests covering the server-mode fallback path of maybeAutoImportJSONL. Existing tests in auto_import_upgrade_test.go are //go:build cgo and exercise only the embedded jsonlImporter branch — leaving the fallback path (the actual location of the data-clobber regression) uncovered by CI.

Test design: a small testability seam exposes importFromLocalJSONLFull as a package-level 'fallbackImporter' var that tests can substitute. A minimal stub storage.DoltStorage embeds the interface (nil) and overrides only GetStatistics; any other method call panics, which is correct since the function under test should not invoke them after the emptiness guard short-circuits.

TestMaybeAutoImportJSONL_ServerModeFallback_SkipsWhenNonEmpty fails on the buggy code (substituted importer is invoked when it shouldn't be) and passes after the guard is restored. TestMaybeAutoImportJSONL_ServerModeFallback_RunsWhenEmpty is the negative control — guards against a future change that always short-circuits and would let the regression test pass vacuously.

* fix(test): TestEmbeddedAutoImportJSONLNoExplicitCommit — use write command to trigger auto-import (#3)

* fix(test): use a write command to trigger auto-import in TestEmbeddedAutoImportJSONLNoExplicitCommit

The test was added in PR #3630 with a comment claiming bd list 'triggers maybeAutoImportJSONL in pre-run'. This is incorrect: bd list is registered in cmd/bd/main.go's readOnlyCommands map, and the dispatcher at main.go:1023 explicitly skips maybeAutoImportJSONL for read-only commands (a guard added 2026-04-14 in fa87dd2bd to avoid opening a writable handle for read commands per GH#804).

The test consequently asserted on a 0-issue empty store, failed with 'expected 3 imported issues, got 0', and shipped broken. CI did not catch this because the test is gated behind BEADS_TEST_EMBEDDED_DOLT=1 and t.Skips otherwise; the embedded suite must not have been enabled in the PR's pipeline.

Fix: use bd create (a write command) to trigger auto-import in pre-run. bd create's own write coalesces with the auto-import via PersistentPostRun's maybeAutoCommit — exactly the deferred-commit flow the test was designed to verify. The post-import marker also brings the asserted total to 4.

The original commitCount > 2 assertion was a brittle proxy for 'auto-import didn't issue its own DOLT_COMMIT'. Replace it with a direct check: forbid the 'auto-import: ... (upgrade recovery, GH#2994)' commit message that the function only emits when it calls s.Commit explicitly (the fallback path). Its absence is the actual property under test.

Verified: passes locally with BEADS_TEST_EMBEDDED_DOLT=1; the four sibling auto-import tests in the same file continue to pass.

* docs(test): correct commit path attribution per PR #3 review

Copilot reviewer noted the previous comment incorrectly attributed the coalesced Dolt commit to PersistentPostRun's maybeAutoCommit. The actual commit path: bd create itself calls store.Commit at cmd/bd/create.go:676 (gated on isEmbeddedMode || postCreateWrites). The auto-import stages writes into the Dolt working set and bd create's own commit picks them up alongside its create write; PersistentPostRun's maybeAutoCommit is then a no-op.

* fix(auto-import): handle nil statistics guard

Incorporates the defensive nil-statistics behavior from #3690 by realies, while keeping #3691 as the broader tested fix.

Co-authored-by: realies <5107843+realies@users.noreply.github.com>

---------

Co-authored-by: maphew <486200+maphew@users.noreply.github.com>
Co-authored-by: realies <5107843+realies@users.noreply.github.com>
2026-05-09 14:50:07 -07:00
matt wilkie
c97c416242
docs: publish v1.0.4 docs snapshot (#3845)
* docs: publish v1.0.4 docs snapshot

* release: guard docs version snapshots
2026-05-09 14:42:25 -07:00
matt wilkie
ec116c46f5
Consolidate docs evidence review inventory
Complete mybd-pnm docs evidence review.\n\n- Add verified docs disposition inventory and canonical seams.\n- Stage stale duplicate docs under docs/staged-for-removal with a manifest.\n- Refresh generated CLI docs and harden the generator for CRLF/stdin handling.\n\nFollow-up: mybd-xfr for automated docs freshness checks.
2026-05-09 07:21:46 -07:00
coffeegoddd☕️✨
04a922c65d /internal/storage/db/proxy/server.go: lint 2026-05-08 14:53:48 -07:00
coffeegoddd☕️✨
bcad82554f /cmd/bd/init.go: remove comment 2026-05-08 14:30:45 -07:00
coffeegoddd☕️✨
40506eeaba /{.gitignore,cmd}: disable proxy server mode 2026-05-08 14:25:47 -07:00
coffeegoddd☕️✨
a65d9d1683 /cmd/bd/init.go: some more fixes 2026-05-08 14:19:50 -07:00
coffeegoddd☕️✨
bd02b5ea6d /cmd/bd/init.go: experimental 2026-05-08 13:27:17 -07:00
coffeegoddd☕️✨
c2b998e41d /{cmd,internal}: some refactors 2026-05-08 13:07:37 -07:00
coffeegoddd☕️✨
04f4e06d42 /{cmd,internal}: root piece 2026-05-08 12:14:51 -07:00
coffeegoddd☕️✨
f2954dd9f9 /{cmd,internal}: support logpath 2026-05-08 11:10:45 -07:00
coffeegoddd☕️✨
4ff5308f9a /{cmd,internal}: server config 2026-05-08 10:25:47 -07:00
Harry Miller
b1db6b1328
Merge pull request #3581 from guyua9/fix/windows-drive-dolt-remote-guyua9
fix: preserve Windows drive remotes for dolt sync
2026-05-08 10:11:15 -07:00
matt wilkie
ee3ea9165c
Merge pull request #3746 from scotthamilton77/feat/hook-json-gemini-claude-compliance
feat(setup): Gemini/Claude hook JSON compliance, --hook-json flag, legacy migration
2026-05-08 09:52:46 -07:00
Harry Miller
ce62266b54
Merge pull request #3509 from seanmartinsmith/docs/import-help-completeness
docs(import): enumerate all fields the importer handles in --help
2026-05-08 09:34:16 -07:00
matt wilkie
f52c78b2a1 fix(setup): finish hook JSON migration 2026-05-08 09:21:39 -07:00
Scott Hamilton
287d8a84c8 feat(setup): Gemini/Claude hook JSON compliance, --hook-json flag, legacy migration
Fixes Gemini CLI hook integration by emitting the required SessionStart JSON envelope. Extends the same standard to Claude Code hooks (documented spec, not just tolerated raw text). Adds legacy detection in bd setup gemini --check.

- Add `--hook-json` flag to `bd prime` wrapping output in the cross-CLI `hookSpecificOutput.additionalContext` JSON envelope (Claude Code, Gemini CLI, and Codex all share this contract)
- Update `bd setup gemini` to register `bd prime --hook-json` on SessionStart; remove PreCompress registration (advisory-only, no additionalContext support per Gemini docs v0.40.1)
- Update `bd setup claude` to register `bd prime --hook-json` on SessionStart and PreCompact (JSON form is the documented spec; raw text was merely tolerated)
- Migration sweeps in both setup commands so re-running upgrades bare-command installs cleanly
- `bd setup gemini --check` distinguishes current (`--hook-json`) from legacy (bare `bd prime`) installs and emits upgrade advisory for legacy
- Fix `removeHookCommand` bug: previously dropped entire hook entry on first command match, silently deleting sibling commands; now filters only the matching command and drops the entry only when empty
- Refresh docs and recipes to reflect SessionStart-only Gemini hook behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-08 09:16:25 -07:00
matt wilkie
65a61df6f7
Merge pull request #3819 from cdimartino/codex-hooks-integration
feat(setup): add add proper codex hook integration
2026-05-08 09:15:08 -07:00
Jim Wordelman
2a5a9802bc
fix(dolt): bd dolt status probes SQL when local server is externally-managed
Route bd dolt status through the SQL probe when dolt_mode=server points at a local host but bd auto-start is disabled. In that configuration bd is not the server lifecycle owner, so the PID-file path can report a false negative even though the configured sql-server is reachable.

Keep the bd-managed local PID-file status path unchanged and covered with rendering tests. Document the observable JSON shape change for affected automation in the Unreleased changelog.

Fixes be-0eyj.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 08:29:16 -07:00
matt wilkie
92f539d0ef
docs: resolve legacy extension guide reference (#3810) 2026-05-08 08:24:31 -07:00