* fix: fall back to DOLT_FETCH+DOLT_MERGE when DOLT_PULL fails on missing branch tracking
When a remote is added via bd dolt remote add (rather than bd bootstrap
or dolt clone), repo_state.json has an empty "branches" map. DOLT_PULL
then fails with "did not specify a branch" even when the branch is
passed explicitly, because Dolt checks upstream tracking config first.
This fix detects that specific error in pullWithAutoResolve and falls
back to the DOLT_FETCH + DOLT_MERGE approach already used by
versioncontrolops.Pull (GH#3144). The fallback preserves the existing
metadata conflict auto-resolution logic.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(dolt): add regression tests for GH#3144 branch-tracking fallback
pullWithAutoResolve_BranchTrackingFallback (no build tag) injects the
exact Dolt tracking-error text via a stored procedure SIGNAL, then
verifies pullWithAutoResolve enters the DOLT_FETCH + DOLT_MERGE fallback
path (confirmed by the 'fetch from' error when no remote is configured).
Covers lines A–D of the fallback block.
pullWithAutoResolve_BranchTrackingSuccess (//go:build integration)
reproduces the real failure scenario end-to-end: a remote is added via
DOLT_REMOTE('add', ...) rather than clone, leaving repo_state.json with
an empty 'branches' map, causing DOLT_PULL to fail with the tracking
error. The test then verifies pullWithAutoResolve succeeds via the
DOLT_FETCH + DOLT_MERGE fallback. Covers lines E–I of the fallback block.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: prefer bootstrap for missing database recovery
Executed-By: beads/crew/emma
* fix: align doctor recovery guidance with bootstrap
Executed-By: beads/crew/emma
* fix: let bootstrap recover missing server databases
Executed-By: beads/crew/emma
* fix: bootstrap missing server databases safely
Executed-By: beads/crew/emma
* fix: fail closed on bootstrap server probe errors
Executed-By: beads/crew/emma
* fix: honor runtime server config in bootstrap
Executed-By: beads/crew/emma
* docs: soften bootstrap-first recovery wording
Executed-By: beads/crew/emma
* fix: report resolved bootstrap server port
Executed-By: beads/crew/emma
* fix: repair test failures from build tag mismatch and mode detection
Three issues causing CI failures on macOS and Ubuntu:
1. detectBootstrapAction used isEmbeddedMode() (global state) to choose
the database path, but tests set cfg.DoltMode without updating the
global serverMode flag. Switch to cfg.GetDoltMode() so the detection
logic respects the config object passed by the caller.
2. TestDetectBootstrapAction_NoneWhenDatabaseExists created a "dolt"
directory but default (embedded) config looks for "embeddeddolt".
Fix the test to create the correct directory.
3. embeddeddolt/slots.go and new_methods_test.go used //go:build
embeddeddolt tag while all other files in the package use cgo,
causing interface satisfaction failures. Also fix undefined
isEmbeddedDolt reference (should be isEmbeddedMode()).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Executed-By: beads/crew/emma
---------
Co-authored-by: mayor <thalia.geraghty@fiserv.com>
Co-authored-by: beads/crew/emma <steve.yegge@gmail.com>
When switching git branches, the Dolt database does not travel with the
branch, causing database not found errors. Previously the error message
only mentioned server misconfiguration. Now it:
1. Checks for .beads/backup/*.jsonl files and suggests bd backup restore
2. Lists branch switching as a common cause
3. After bd init creates a fresh DB, warns if backup files exist
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SyncGitRemote field to Config and route it through construction site
- Extract databaseNotFoundError() with config-aware hint generation
- Hint suggests setup when remote is empty; names the remote when configured
Improves fresh clone discoverability by guiding users toward the correct
next step when the database is not found.