beads/internal/utils
Aaron Lippold 63418ae549 fix: guard CREATE DATABASE to prevent shadow databases on wrong server
bd unconditionally ran CREATE DATABASE IF NOT EXISTS on every connection.
When connecting to the wrong server (auto-started from .beads/dolt/ or
Homebrew default), this created an empty shadow database hiding real data.

Changes:
- Add CreateIfMissing field to Config — only bd init sets it true
- SHOW DATABASES LIKE check before CREATE (with underscore escaping)
- Network error handling for SHOW DATABASES failure
- Suppress auto-start when metadata.json has explicit dolt_server_port
- Fix backup git push across .beads/redirect (findGitRoot)
- Fix macOS CanonicalizePath case resolution (walk dirs, not realpath)
- Add CreateIfMissing to all migration and create paths
- 10 regression tests covering guard, auto-start, ReadOnly, underscore
- CHANGELOG and TROUBLESHOOTING docs

Authored by: Aaron Lippold<lippold@gmail.com>
2026-02-28 13:29:51 -05:00
..
id_parser.go fix(dolt): stop wisp ID double-prefixing and add wisp fallback to ResolvePartialID 2026-02-24 15:50:46 -08:00
id_parser_test.go fix: guard CREATE DATABASE to prevent shadow databases on wrong server 2026-02-28 13:29:51 -05:00
issue_446_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
issue_id.go fix: improve issue ID prefix extraction for word-like suffixes 2025-12-16 13:19:22 -08:00
path.go fix: guard CREATE DATABASE to prevent shadow databases on wrong server 2026-02-28 13:29:51 -05:00
path_test.go fix: remove JSONL storage functions and config field (bd-9ni.2) 2026-02-22 21:36:00 -08:00
strings.go fix: complete decision type aliases and help strings 2026-02-11 17:23:21 -08:00
strings_test.go fix: complete decision type aliases and help strings 2026-02-11 17:23:21 -08:00
testmain_test.go fix: isolate id_parser_test.go from shared Dolt server (bd-19i) 2026-02-27 16:31:27 -08:00