beads/cmd/bd/doctor/fix
Bella-Giraffety 5a2fc61f7a
fix: repair shared-server bootstrap and doctor metadata drift (#3242)
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>
2026-05-03 14:42:21 -07:00
..
artifacts.go cleanup: remove remaining Gas Town terminology from help text, docs, and comments 2026-03-22 13:27:43 -07:00
artifacts_test.go cleanup: remove 3-way merge engine remnants (GH#2391) 2026-03-10 14:08:54 -07:00
common.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
common_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
config_values.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
database_config.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
database_config_test.go fix: remove Beads Classic SQLite backend and migration infrastructure 2026-03-02 12:42:09 -08:00
database_integrity.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
database_integrity_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
dolt_format.go fix: cross-rig prefix routing for issue resolution via routes.jsonl (#2954) 2026-04-20 17:42:11 -07:00
e2e_test.go refactor: remove JSONL references from core Go files (bd-9ni.2) 2026-02-22 21:54:01 -08:00
fix_edge_cases_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
fix_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
fs.go refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
fs_test.go refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
git_repo_template_test.go Test isolation follow-up: consolidate and guard hooksPath leakage (#2234) (#2237) 2026-03-01 14:41:08 -08:00
hooks.go feat: add hk (hk.jdx.dev) as supported git hook manager 2026-02-28 07:28:06 -06:00
hooks_test.go Stabilize hook-related tests by forcing repo-local hooksPath (#2233) 2026-03-01 09:52:19 -08:00
locks.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
locks_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
maintenance.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
maintenance_cgo_test.go test(doctor): skip maintenance cgo tests when dolt test server is unavailable 2026-02-26 20:35:56 +08:00
maintenance_test.go refactor: remove SQLite backend (Phase 6) 2026-02-15 10:57:05 -08:00
metadata.go fix: repair shared-server bootstrap and doctor metadata drift (#3242) 2026-05-03 14:42:21 -07:00
metadata_dolt_test.go ci: install dolt binary on Linux and macOS test runners (#3440) 2026-04-24 06:58:40 -07:00
metadata_json.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
metadata_test.go fix: repair shared-server bootstrap and doctor metadata drift (#3242) 2026-05-03 14:42:21 -07:00
migrate.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
migrate_import_test.go fix: add missing //go:build cgo tags to embedded test files and cmd 2026-04-01 07:08:41 -07:00
permissions.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
remotes.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
remotes_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
repo_fingerprint.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
repo_fingerprint_test.go fix(doctor): resolve bd doctor --fix hang by running fixes in-process (#1850) 2026-02-17 23:45:10 -08:00
symlink_test.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
testmain_cgo_test.go refactor(tests): migrate all test files from StartTestDoltServer to container-native API 2026-03-03 10:07:32 -08:00
untracked.go refactor: remove JSONL references from core Go files (bd-9ni.2) 2026-02-22 21:54:01 -08:00
validation.go Fix worktree-aware config.yaml resolution (#3265) 2026-04-24 07:33:31 -07:00
validation_test.go fix: remove duplicate testutil import in validation_test.go 2026-04-08 12:46:31 -07:00