An already-initialized project that later gets a remote BEADS_DOLT_SERVER_HOST
or dolt.host configured, but never sets dolt_mode/BEADS_DOLT_SERVER_MODE,
silently falls through to embedded storage at runtime instead of talking to
the configured server. bd init's guard (#3533) only protects init time, not
this later-configured case.
- configfile.IsDoltServerMode now infers server mode from a non-localhost
BEADS_DOLT_SERVER_HOST env var, a persisted metadata.json DoltServerHost,
or config.yaml dolt.host — each gated so an explicit dolt_mode in
metadata.json always wins over a persisted/configured host, and an
explicit localhost/empty BEADS_DOLT_SERVER_HOST suppresses inference
entirely (deliberate operator intent, not just "no signal"). This
diverges from the original PR's precedence (host inference ran
unconditionally before the dolt_mode check); here explicit metadata
wins, matching the hard-fail review stance from the original PR
discussion — flagging for maintainer confirmation.
- doltserver.EnsureRunningDetailed and storage/dolt's newServerMode
connect-failure hint now recognize a non-localhost configured host and
tell the operator to verify the external server instead of suggesting
`bd dolt start`, which cannot help them (GH#3518).
- Adds regression tests for both, porting and extending PR #3563's
(shaunc) test suite; one doltserver subtest is adapted because
GetBackend() on this codebase now recognizes "sqlite" as a real
registered backend rather than normalizing all input to "dolt".
Does not touch `bd dolt status` (already fixed on main by #3362).
Fixes#3545. Helps #3518. Supersedes #3563.
Agent-Signature: claude-fable-5-high on behalf of maphew
Co-authored-by: Shaun Cutts <shauncutts@factfiber.com>