Skip to content

fix(bootstrap): commit issue_prefix to config table (GH#3216)#3247

Merged
maphew merged 1 commit into
gastownhall:mainfrom
maphew:fix/3216-bootstrap-config-commit
Apr 13, 2026
Merged

fix(bootstrap): commit issue_prefix to config table (GH#3216)#3247
maphew merged 1 commit into
gastownhall:mainfrom
maphew:fix/3216-bootstrap-config-commit

Conversation

@maphew

@maphew maphew commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3216. bd init / bd restore / bd import write issue_prefix via SetConfig but then call Commit(), which excludes the config table per GH#2455. The prefix row sits orphaned in the Dolt working set forever, causing bd dolt pull to fail with cannot merge with uncommitted changes on every fresh init and silently breaking sync.

This is the same class of bug as #3028 (fixed for remember/forget/config set by PR #3052) — the bootstrap path was not covered.

Changes

  • cmd/bd/bootstrap.go: switch the three post-SetConfig commits in executeInitAction, executeRestoreAction, and executeJSONLImportAction from Commit to CommitWithConfig.
  • internal/storage/version_control.go: promote CommitWithConfig to the VersionControl interface so it's callable through the storage abstraction.
  • internal/storage/embeddeddolt/version_control.go: add CommitWithConfig as an alias to Commit (embedded already includes config via DOLT_ADD '-A').

Test plan

  • go build -tags gms_pure_go ./cmd/bd passes
  • go vet -tags gms_pure_go ./... passes
  • internal/storage/dolt tests still pass (TestCommitWithConfig_*)
  • Manual: fresh bd init, then bd sql \"SELECT COUNT(*) FROM config\" should match ... AS OF 'HEAD' (no orphaned issue_prefix in working set)

Reported by @GraemeF — thanks for the thorough diagnosis and the pointer to the matching #3052 fix pattern.

🤖 Generated with Claude Code

bd init/restore/import wrote issue_prefix via SetConfig but called
Commit(), which excludes the config table per GH#2455. The prefix row
sat orphaned in the working set forever, causing bd dolt pull to fail
with "cannot merge with uncommitted changes" on every fresh init.

Fix: use CommitWithConfig in the three bootstrap paths, matching the
pattern PR gastownhall#3052 introduced for remember/forget/config set. Promote
CommitWithConfig to the VersionControl interface and add an alias on
EmbeddedDoltStore (whose Commit already includes config via DOLT_ADD -A).

Reported by @GraemeF.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cmd/bd/bootstrap.go 0.00% 3 Missing ⚠️
internal/storage/embeddeddolt/version_control.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@maphew maphew merged commit ebcb901 into gastownhall:main Apr 13, 2026
37 checks passed
@maphew maphew deleted the fix/3216-bootstrap-config-commit branch April 13, 2026 20:54
mzlee pushed a commit to mzlee/beads that referenced this pull request Apr 22, 2026
…nhall#3247)

bd init/restore/import wrote issue_prefix via SetConfig but called
Commit(), which excludes the config table per GH#2455. The prefix row
sat orphaned in the working set forever, causing bd dolt pull to fail
with "cannot merge with uncommitted changes" on every fresh init.

Fix: use CommitWithConfig in the three bootstrap paths, matching the
pattern PR gastownhall#3052 introduced for remember/forget/config set. Promote
CommitWithConfig to the VersionControl interface and add an alias on
EmbeddedDoltStore (whose Commit already includes config via DOLT_ADD -A).

Reported by @GraemeF.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bd init leaves issue_prefix uncommitted in config table (same pattern as #3028/PR#3052)

2 participants