Reconcile local metadata.json against the authoritative server state in
shared-server/server mode. Repairs two drift cases:
1. Stale dolt_database when another server DB matches the local project_id
2. Stale/missing local project_id when the configured DB has one
Also hardens the server metadata probe:
- Escapes backticks in database names to prevent SQL injection
- Distinguishes expected probe errors (table/DB not found) from unexpected
ones (permission denied, connection failures) so reconciliation does not
act on an incomplete server inventory
Co-authored-by: Bella-Giraffety <thalia.geraghty@fiserv.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
normalizeRemoteURL() converts http:// to git+http://, which breaks Dolt
remotesapi endpoints. Stop normalizing URLs from sync.remote (user
explicitly chose the format) while keeping normalization for auto-detected
git origin URLs. Also add git+http to allowedSchemes in remotecache so
ValidateRemoteURL accepts it.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(init): refuse --force when remote has Dolt history
bd init --force in a repo whose origin has refs/dolt/data silently
skipped the bootstrap-from-remote path and then wired origin as a Dolt
remote anyway. The next write auto-pushed an orphan history, failing
with "no common ancestor". Recovery options were all destructive.
This change:
- Adds --reinit-local (named-intent replacement for --force) and
--discard-remote (explicit cross-boundary authorization).
- Routes --force to --reinit-local with a DeprecationWarning. --force
continues to work for ≥2 releases.
- Refuses bd init --force / --reinit-local when origin has
refs/dolt/data, unless --discard-remote is also passed. Exit code 10
(ExitRemoteDivergenceRefused).
- Adds stable numeric exit codes for init refusals (10/11/12).
- Adds bd init-safety documenting the full flag surface and the
destroy-token format.
- Adds an internal race-safety re-check: if remote state changes
during the TTY confirmation window, abort rather than overwrite.
- Retrofits the existing destroy-token echo at init.go:231 to not
print a copy-pasteable destructive invocation, matching the new
error-text-no-echo ADR invariant.
Adds:
- cmd/bd/init_safety.go — CheckRemoteSafety chokepoint (pure fn).
- cmd/bd/init_safety_test.go — guard matrix (13 cases) + subprocess
regression test with a synthetic refs/dolt/data fixture.
- docs/adr/0002-init-safety-invariants.md — ADR encoding the five
invariants (single-source identity, scope-bound --force, central
chokepoint, error-text-no-echo, race-safety).
- docs/RECOVERY.md — named recovery playbooks per refusal exit code.
- .github/CODEOWNERS — review ownership for init*.go pointing at the
ADR so future flags must extend the guard matrix.
Historical pattern (git log for cmd/bd/init.go): 8+ prior commits
patched individual surfaces of this class without encoding the
invariant. The guard matrix test is the structural hedge — adding a
new flag or data source is a signal to extend the table, not to add
another `&& !someFlag` at the call site.
(bd-q83)
* fix(init): satisfy lint for origin safety helpers (bd-main-nwo)
---------
Co-authored-by: matt wilkie <maphew@gmail.com>
* Fix worktree-aware config.yaml resolution
* fix: honor shared worktree config resolution
* fix(doctor-fix): resolve shared-worktree beads paths
intent(doctor-fix): review-fix-loop found that doctor --fix should keep working when a worktree uses a shared .beads directory with no local path
constraint(doctor-fix): permission fixes must still skip chmod on local symlinked .beads directories when they exist
decision(doctor-fix): centralize resolved workspace lookup in a helper and route fix handlers through it instead of rebuilding path/.beads ad hoc
* test(doctor-fix): cover shared-worktree path resolution
intent(doctor-fix): review-fix-loop needed regressions that prove fix handlers operate on the shared workspace when a worktree has no local .beads
decision(doctor-fix): cover one config-regeneration path and two file-mutation paths so future regressions fail close to the real worktree behavior
learned(doctor-fix): metadata regeneration, stale lock cleanup, and permission repair all exercised separate path assumptions inside the fix package
* test(doctor-fix): strengthen workspace validation coverage
Why:
- shared-worktree fix coverage still left validateBeadsWorkspace edge cases loosely asserted
- fix package had no direct test for resolvedWorkspaceBeadsDir local vs shared precedence
What:
- add focused tests for resolvedWorkspaceBeadsDir local/shared selection
- make validateBeadsWorkspace reject file-backed and file-symlinked .beads explicitly
Refs:
- beads-xc4
* refactor(doctor-fix): share workspace beads dir resolution
Why:
- fix package resolved local and shared .beads paths in multiple steps even though they come from the same workspace root
- permissions handling was correct but harder to follow because local/resolved values were stitched together at the call site
What:
- extract a package-local helper that returns both local and resolved .beads paths from one workspace lookup
- make Permissions reuse that helper and add direct tests for local path behavior
Refs:
- beads-rim
* fix(config): remove shared-worktree import cycle
Why:
- shared-worktree config fallback in internal/config imported internal/beads
- that pulled internal/utils back into internal/utils test setup through storage/dolt and caused PR #37 CI import cycle failures
What:
- keep worktree fallback resolution inside internal/config
- reuse the repo-scoped git-dir fallback for config.yaml discovery without importing internal/beads
Refs:
- beads-3ix
* fix(doctor): resolve database-integrity against shared worktrees
intent(doctor): keep integrity recovery from reading a nonexistent worktree-local .beads during shared-worktree repairs
decision(database-integrity): resolve config and dolt paths from resolvedWorkspaceBeadsDir while keeping bd init --force anchored to the worktree repo root
learned(shared-worktree): the server-mode guard must inspect shared config or it can silently bypass the configured database safety check
* fix(doctor): honor shared worktrees in remote-consistency
intent(doctor): keep remote reconciliation pointed at the active shared workspace state during worktree repairs
decision(remote-consistency): resolve shared-worktree config and dolt paths once before comparing SQL and CLI remotes
constraint(remote-consistency): the fixer still runs from the worktree repo path but cannot derive paths from repoPath/.beads when that directory is absent
* fix(doctor): align shared worktree resolution (beads-u8z)
* test(config): cover shared worktree config precedence (beads-7kw)
intent(config): lock down shared worktree config resolution so future fallback fixes do not silently write or read the wrong file
decision(config-tests): cover both write precedence and Initialize() local override behavior in worktree-specific tests
constraint(shared-worktree): runtime resolution can legitimately target either worktree-local or shared .beads, so the regression coverage must assert both paths explicitly
* Add worktree path coverage for beads dir resolution
* Avoid creating .beads on normal Dolt store opens
* Prefer loaded worktree config when finding project config
* test(worktree): add shared config regression coverage (beads-z65b)
intent(worktree-config): keep shared-worktree sync.remote persistence covered at both the YAML helper and CLI command layers
decision(regression-tests): pair a loaded-state config test with a bd subprocess test because the original regression crossed initialization and command execution
constraint(cmd-bd): use the repo CGO test wrapper for command coverage because raw go test ./cmd/bd requires local ICU setup outside the supported path
* fix(doctor): sweep shared-worktree resolver into remaining checks (beads-3y9p)
intent: keep this PR's worktree bugfix coherent by removing the last redirect-only doctor resolution paths
decision: route standalone doctor checks through ResolveBeadsDirForRepo and add shared-worktree regressions for locks, mq cleanup, hook migrations, and remote consistency
constraint: leave local-only semantics alone and validate with targeted doctor tests instead of broad environment-sensitive full-suite expectations
* test(worktree): strengthen resolver regression coverage (beads-i9x1)
intent(worktree-coverage): raise patch coverage for the shared-worktree resolver PR on branches introduced by this change set
decision(config-tests): cover worktree config helpers directly in internal/config so fallback and loaded-state branches stay deterministic
decision(storage-tests): exercise lazy federation credential-key initialization with one server-backed peer lifecycle instead of broader end-to-end sync flows
constraint(doctor-tests): verify tracked runtime cleanup from the resolved main repo because shared .beads lives outside the worktree root
* fix(bootstrap): persist sync remote in resolved config
intent(bootstrap): fresh worktree bootstrap should finalize the shared workspace config instead of failing on a local .beads stub
decision(config-resolution): add a targeted yaml writer for an explicit beads directory so bootstrap can reuse the resolved workspace path
constraint(worktree-config): bare-parent and shared worktree setups can expose a local .beads directory that must not shadow the canonical config.yaml during finalize
* test(config): cover worktree resolution edge paths (beads-adan)
intent(codecov): PR #3265 needed patch coverage above the Codecov complaint on config/worktree resolution changes
decision(tests): add unit coverage in existing config, doctor/fix, and credentials suites instead of broader e2e coverage
constraint(tests): keep sanitizeDBName available to nocgo typecheck because init.go calls it outside cgo-only files
* test(embedded): allow concurrent dolt status
---------
Co-authored-by: matt wilkie <maphew@gmail.com>
When dolt_mode=server is configured in metadata.json (e.g. for an
externally managed dolt sql-server), bd bootstrap was cloning to the
local .beads/dolt/ directory instead of letting the server handle the
clone. The server never discovered the database, causing bd ready to
return empty results.
Root cause: cloneFromRemote() used isEmbeddedMode() which checks
runtime globals not yet initialized during bootstrap, defaulting to
embedded mode. finalizeSyncedBootstrap() had the same issue, resetting
dolt_mode back to embedded.
Fix:
- cloneFromRemote() now uses doltserver.ResolveServerMode() which reads
metadata.json directly to determine the server lifecycle mode
- In ServerModeExternal, connects to the running server via MySQL and
executes CALL DOLT_CLONE so the server places the database in its
own data directory
- finalizeSyncedBootstrap() uses cfg.IsDoltServerMode() to preserve
the server mode from the loaded config
- Added tests for both server-mode clone routing and mode preservation
Fixes#3343
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After `bd bootstrap` clones from a remote, dolt_ignore'd wisp tables
(wisps, wisp_dependencies, wisp_labels, wisp_events, wisp_comments)
are absent because they are never committed. This caused "table not
found: wisp_dependencies" errors on commands like `bd delete`.
Two fixes:
1. Add EnsureIgnoredTables call to embeddeddolt.New() — matches what
server mode already does in newServerMode(). This is the primary
fix: every embedded store open now creates missing wisp tables.
2. Add post-clone store warmup in executeSyncAction() — opens and
closes a store after finalization to trigger wisp table creation
immediately, regardless of storage mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 #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>
The caller chain (bootstrapCmd.Run → executeBootstrapPlan → executeSyncAction)
guarantees cfg is non-nil via DefaultConfig() fallback at bootstrap.go:178-180.
Follow-up to #3203.
Amp-Thread-ID: https://ampcode.com/threads/T-019d7fee-1326-74af-a566-9c45ad5b349e
Co-authored-by: Amp <amp@ampcode.com>
fix(bootstrap): write metadata.json and config.yaml after sync clone
executeSyncAction created .beads/ and cloned remote Dolt data but never
wrote metadata.json or config.yaml, leaving the workspace in a broken
state where bd status, bd where, and bd dolt push all failed.
Adds finalizeSyncedBootstrap helper that runs after cloneFromRemote and
mirrors what init does: save cfg as metadata.json, create the config.yaml
template, and persist sync.remote. The helper is idempotent so bootstrap
retries remain safe.
Fixesgastownhall/gascity#561
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
* fix(workspace): align resolved workspace messaging and config lookup
intent(workspace): pure worktrees and external BEADS_DIR setups should work without implying a local .beads directory is required
decision(config): derive config repo roots from FindBeadsDir-backed workspace resolution instead of a local-only .beads walk
constraint(workspace-detection): keep FindBeadsDir ordering and storage behavior unchanged while making bd where the primary diagnostic hint
learned(testing): shared-server env and global .beads ignore rules can distort CGO suites, so regression coverage now normalizes those test paths
* fix(bootstrap): align no-workspace JSON wording
intent(bootstrap): machine-readable no-workspace output should match the resolved-workspace guidance used elsewhere on this branch
decision(bootstrap-json): reuse the shared workspace error helpers through a dedicated payload builder so tests can lock the JSON contract
constraint(review-loop): keep the bootstrap CLI flow unchanged outside the no-workspace JSON branch while adding a focused regression test
* fix(where): allow no-workspace diagnostics without db (beads-9f74-5l1)
intent(where): no-workspace guidance should point to a command that actually runs when workspace resolution fails
decision(startup): treat top-level where as a no-db command so it reaches its own handler before database preflight
constraint(where-tests): subprocess mode can change the exact hint text, so the regression test locks the JSON contract and stable guidance fragments instead
* fix(bootstrap): restore bd where guidance for no-workspace output (beads-9f74-3c3)
intent(bootstrap): no-workspace bootstrap guidance should match the resolved-workspace diagnostics introduced on this branch
decision(no-workspace-hints): reuse the shared hint that mentions bd where instead of the bootstrap-specific fallback text
constraint(bootstrap-tests): cover both the payload helper and subprocess CLI path so wording regressions are caught before release
* fix(workspace): remove no-workspace .beads fallbacks (beads-9f74-gr1)
intent(workspace-resolution): finish the GH#3124 follow-up for runtime paths that still fabricated local .beads state
rejected(no-workspace-fallback): inventing ./ .beads paths outside an active workspace hid shared-worktree resolution and created stray files
decision(setup-recipes): keep built-in bd setup recipes usable without a workspace but require an active workspace for custom recipe state
constraint(worktree-support): completion and backup helpers still need to resolve shared main-repo workspaces from a git worktree
* fix(config): skip no-workspace store init for store-free commands
intent(config): review-fix-loop found no-workspace config commands should reach their own graceful paths instead of failing in PersistentPreRun
decision(config-preflight): detect store-free config subcommands before DB synthesis so config.yaml, git-backed, and diagnostic flows can run without an opened store
constraint(json-contract): keep bd config validate --json machine-readable on stdout once pre-run stops short-circuiting into low-level DB errors
learned(config-preflight): the parent config command not being in noDbCommands leaked store init into show, validate, drift, apply, and yaml-only config helpers
* fix(ci): restore init prefix normalization and formatting
intent(ci): clear the current PR failures instead of leaving the branch blocked behind known red checks
decision(init-prefix): normalize dotted prefixes before persisting issue_prefix so config, metadata.json, and Dolt database naming stay aligned for Julia-style repos
constraint(fmt-check): CI runs gofmt over the whole repo, so the existing spacing drift in internal/jira/tracker_test.go had to be cleaned up on this branch to get a green run
learned(ci): the latest main CI was already red on the same formatting file and the same embedded shard, so rebasing surfaced pre-existing blockers rather than introducing a new shard-only regression
When FindBeadsDir() returns empty and remote has dolt data,
bootstrap would create a stray .beads in the worktree. Now
checks GetWorktreeFallbackBeadsDir() first.
When running `bd bootstrap` from a rig subdirectory (its own git repo)
that doesn't have a local .beads/metadata.json, the config fell back to
DefaultConfig() which always returned "beads" as the database name.
Add findParentConfig() that walks up parent directories to find the
workspace-level metadata.json, so server-mode rigs get their configured
dolt_database name instead of the default.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When dolt.shared-server is enabled (via config.yaml or env var) but
cfg.DoltMode is not explicitly set to "server" in metadata.json,
detectBootstrapAction() incorrectly used the embedded database path
(embeddeddolt/) instead of the shared-server path (~/.beads/shared-server/dolt/).
This caused bd bootstrap to clone the database to the wrong location,
making it invisible to the shared Dolt server.
Fix: use cfg.IsDoltServerMode() (which checks env vars and metadata.json)
combined with doltserver.IsSharedServerMode() (which also checks config.yaml)
to determine the correct database path.
Fixes#30
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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>
The PR merged with -y as shorthand for --non-interactive and --yes as a
separate flag with no shorthand. This was confusing UX. Now --yes/-y is
the primary flag and --non-interactive is the alias.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Executed-By: beads/crew/emma
Add --non-interactive / --yes / -y flag to bd bootstrap, matching the
pattern already used by bd init. Also supports BD_NON_INTERACTIVE=1
environment variable. This allows CI environments to skip confirmation
prompts without piping input.
Fixesharry-miller-trimble/beads#19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bd bootstrap leaves .dolt/noms/LOCK files at multiple paths after
cloning, which prevents dolt sql-server from starting. Two changes:
1. CleanStaleNomsLocks now uses filepath.WalkDir to recursively find
all noms/LOCK files, including nested stats databases:
- <db>/.dolt/stats/.dolt/noms/LOCK
- .dolt/noms/LOCK (root-level)
2. executeSyncAction in bootstrap.go now calls CleanStaleNomsLocks
after clone completes, for both server and embedded mode paths.
The existing pre-flight cleanup in PersistentPreRun (main.go) also
benefits from the recursive scan as defense-in-depth.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bd bootstrap failed in a fresh second clone even when the origin already
had refs/dolt/data. The command required .beads to pre-exist, exiting
with 'No .beads directory found' before ever probing the remote.
Root cause: bootstrap.go called beads.FindBeadsDir() and exited at
line 48-62 when it returned empty, before detectBootstrapAction() could
run its remote detection logic (lines 132-142).
Fix: When .beads doesn't exist, probe the git remote for refs/dolt/data
before giving up. If remote has Beads data, synthesize the theoretical
.beads path and proceed with the sync plan. Actual .beads directory
creation is deferred to executeSyncAction to preserve --dry-run semantics.
Design decisions per council review:
- No filesystem writes during plan generation (--dry-run safe)
- No config.yaml generation needed (Dolt clone carries config)
- .beads created with 0750 permissions in executeSyncAction only
- Existing bootstrap behavior for all other scenarios unchanged
Tests added:
- Fresh clone with remote data: detects refs/dolt/data, produces sync plan
- Fresh clone without remote data: exits cleanly, no .beads created
- Existing .beads directory: normal flow unaffected
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On a fresh clone, `bd bootstrap` never looks at the git-tracked
.beads/issues.jsonl file — the portable export that travels with the
repo. It only checks .beads/backup/issues.jsonl (a separate backup
format). This means the fresh-clone scenario (git clone, bd bootstrap,
expect your issues) is broken.
Add a "jsonl-import" action to the bootstrap detection chain, after
backup restore but before fresh init. When .beads/issues.jsonl exists
but no database, backup, or sync remote is present, bootstrap creates
a fresh database and imports all issues from the JSONL file using the
existing importFromLocalJSONL() function (which already handles prefix
auto-detection, tombstone filtering, and SetDefaults).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When running `bd bootstrap` in a fresh clone, probe origin for
refs/dolt/data and automatically clone the existing beads database
instead of creating unrelated state. `bd init` warns if the ref
exists and suggests using `bd bootstrap` instead.
Fixes#2580
A stale empty backup/issues.jsonl (e.g. from a previous bd init --force)
would take priority over the git-tracked .beads/issues.jsonl, causing
bootstrap to attempt a backup restore with no data instead of importing
the real issues. Check that the backup file is non-empty before choosing
the backup restore path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make bootstrap actually run init, restore, and sync operations rather than
just printing manual commands. Adds confirmation prompt, proper error handling,
and tests for action detection logic.
Cherry-picked from PR #2516.
Co-authored-by: Melsov Yernur <MelsovCOZY@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add validateWorkspaceIdentity() preflight in PersistentPreRun that compares
project_id from metadata.json with _project_id in the database. Blocks writes
on mismatch to prevent cross-project data corruption. Escape hatch:
BEADS_SKIP_IDENTITY_CHECK=1.
Add 'bd bootstrap' command as non-destructive alternative to 'bd init --force'.
Auto-detects recovery action: sync from remote, restore from backup, or create
fresh. Supports --dry-run and --json.
Co-Authored-By: matt wilkie <maphew@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. FORMATTING: gofmt 14 files.
2. LINT:
- Delete dead code cmd/bd/bootstrap.go (unused bootstrapEmbeddedDolt)
- Prefix unused 'actor' param in wisps.go updateWisp with _
- Prefix unused 'ctx' param in telemetry.go buildTraceProvider with _
3. TESTS: Add skipIfNoDolt to test helpers that call dolt.New() without
a running test server. In CI (no dolt installed), these tests now skip
instead of failing with "server unreachable at 127.0.0.1:3307".
Delete TestOpenFromConfig_Embedded and TestOpenFromConfig_DefaultsToEmbedded
which tested removed embedded Dolt functionality.
Fixed packages: beads_test, cmd/bd, cmd/bd/doctor, cmd/bd/doctor/fix,
internal/tracker, internal/utils
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the entire JSONL-to-Dolt bootstrap path (Bootstrap(), parseJSONLWithErrors,
importIssuesBootstrap, importRoutesBootstrap, importInteractionsBootstrap) and
742 lines of bootstrap tests. Cold-start now requires either a configured
sync.git-remote for dolt clone, or 'bd init --backend=dolt'.
Also delete orphaned sync_divergence_test.go missed in Phase 1.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: gastown/crew/george
Rig: gastown
Role: crew
- Remove Config.ServerMode and Config.OpenTimeout fields (dead since embedded removal)
- Rewrite doctor/dolt.go to use MySQL protocol instead of embedded dolthub/driver
- Rename openDoltDBWithLock to openDoltConn, remove closeDoltDB helpers
- Delete dolt_nocgo.go stubs (doctor + store_nocgo_test.go)
- Remove cgo build tags from doctor package
- Update lock error messages for server-only world
- Clean up unused lockTimeout parameter threading in list.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete broken store_nocgo_test.go (references undefined errNoCGO),
remove dead bootstrapEmbeddedDolt/hasDoltSubdir functions, and clean up
stale comments and docs that still referenced embedded mode, CGO
requirements, or in-process Dolt across 20 files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Delete 6 CGO/nocgo stub files and remove //go:build cgo tags from
dolt.go and bootstrap.go. Beads now always operates in server mode
(dolt sql-server subprocess). Embedded mode references removed from
CLI help text and config commands.
Part of epic: Remove embedded Dolt mode (server-only operation).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 7 (a5da57e3) deleted internal/storage/factory/ and internal/storage/memory/
but left 30+ files still importing them. This commit fixes all broken references:
- Created internal/storage/dolt/open.go with NewFromConfig/NewFromConfigWithOptions
- Replaced all factory.New/NewFromConfig/NewWithOptions with dolt equivalents
- Broke import cycles in dolt/bootstrap.go (routing/utils/audit → local types)
- Removed dead storage.Config struct
- Converted all test files from memory.New() to dolt.New() test stores
- Removed tests that depended on deleted detectPrefix/LoadFromIssues/mockRemoteStore
46 files changed, 249 insertions(+), 851 deletions(-)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Strip out the multi-backend storage layer: factory pattern, memory/in-memory
provider, connection string parsing, local provider, and associated tests.
Inline Dolt as the sole storage backend. Part of Dolt-Native Beads v2 epic.
WIP - SQLite removal in progress, more cleanup phases to follow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-15 11:27:39 -08:00
Renamed from internal/storage/factory/factory_dolt.go (Browse further)