fix(bootstrap): commit issue_prefix to config table (GH#3216)#3247
Merged
Conversation
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3216.
bd init/bd restore/bd importwriteissue_prefixviaSetConfigbut then callCommit(), which excludes theconfigtable per GH#2455. The prefix row sits orphaned in the Dolt working set forever, causingbd dolt pullto fail withcannot merge with uncommitted changeson every fresh init and silently breaking sync.This is the same class of bug as #3028 (fixed for
remember/forget/config setby PR #3052) — the bootstrap path was not covered.Changes
cmd/bd/bootstrap.go: switch the three post-SetConfigcommits inexecuteInitAction,executeRestoreAction, andexecuteJSONLImportActionfromCommittoCommitWithConfig.internal/storage/version_control.go: promoteCommitWithConfigto theVersionControlinterface so it's callable through the storage abstraction.internal/storage/embeddeddolt/version_control.go: addCommitWithConfigas an alias toCommit(embedded already includes config viaDOLT_ADD '-A').Test plan
go build -tags gms_pure_go ./cmd/bdpassesgo vet -tags gms_pure_go ./...passesinternal/storage/dolttests still pass (TestCommitWithConfig_*)bd init, thenbd sql \"SELECT COUNT(*) FROM config\"should match... AS OF 'HEAD'(no orphanedissue_prefixin working set)Reported by @GraemeF — thanks for the thorough diagnosis and the pointer to the matching #3052 fix pattern.
🤖 Generated with Claude Code