fix(dolt): disable auto-push by default; require explicit opt-in#3446
Merged
maphew merged 1 commit intoApr 24, 2026
Merged
Conversation
Auto-push was enabled whenever an "origin" remote existed. At any concurrency above one writer, git+ssh remotes have no chunk-level upload atomicity: concurrent dolt pushes race on the remote manifest and can leave it referencing chunks that were never uploaded. Any subsequent clone/fetch/push then propagates the dangling reference. Change the default to off. Set dolt.auto-push=true in .beads/config.yaml (or BD_DOLT_AUTO_PUSH=true) to restore auto-push on single-writer setups. Rename TestIsDoltAutoPushEnabled_DefaultNoStore to _DefaultOff — the test now documents the intended default, not a nil-store edge case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f40fb94 to
5e485fe
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
maphew
approved these changes
Apr 24, 2026
maphew
left a comment
Collaborator
There was a problem hiding this comment.
Approved after rebase, docs update, and CI repair. Auto-push default-off is the right data-safety default; explicit opt-in preserves single-writer setups.
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.
Problem
bdcurrently auto-enables Dolt push whenever anoriginremote exists. Thisis unsafe at any concurrency above one writer.
Root cause: git+ssh remotes (GitHub, Hosted Dolt via SSH) have no
chunk-level upload atomicity. When two agents push concurrently, one push's
manifest update can land before the other's chunks finish uploading. The remote
ends up with a manifest that references
.darcblobs that were never stored.Any subsequent
dolt fetch,dolt pull, ordolt pushfrom a client thatingested that manifest then propagates the dangling reference to new remotes.
We hit this three times in ~24 hours with ~10 concurrent agents writing to the
same database. Each "fix" (new remote + fresh push) was re-corrupted within an
hour because agents fetched the corrupt state, then auto-pushed it elsewhere.
Change
Remove the auto-enable-when-remote-exists logic.
isDoltAutoPushEnablednowreturns
config.GetBool("dolt.auto-push"), which defaults tofalse.To restore auto-push on single-writer setups, add to
.beads/config.yaml:or set
BD_DOLT_AUTO_PUSH=true.The explicit-config path (
dolt.auto-push: true/false) is unchanged — thisonly affects the case where the key is not set at all.
Tests
TestIsDoltAutoPushEnabled_DefaultOff(renamed from_DefaultNoStore) nowdocuments that the default is
falseregardless of store state.Notes
I'm happy to discuss whether a warning (rather than silent change) would be
better for existing users who relied on auto-push. The behavior is easy to
restore with one config line, but I wanted to raise the option.