Several helper paths (list, completions, github, gitlab, linear) reopen
Dolt with only a raw path when the global store is nil. This loses
repo-local metadata like custom dolt_database names and server ports,
falling back to the wrong database or port.
Add a shared openReadOnlyStoreForDBPath() helper that maps dbPath back
to its owning .beads dir and reopens with full metadata. Also fix port
resolution in applyConfigDefaults to use BeadsDir (the .beads/ config
directory) instead of Path (the dolt data directory).
Fixes#2627
Co-Authored-By: Gary <gary@algorune.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In shared-server mode, the DB issue_prefix belongs to whichever project
initialized first. This caused all projects sharing a server to use the
wrong prefix for issue creation, ID generation, and imports.
Fix: YAML config.yaml issue-prefix now takes precedence over the DB value
in create.go, github.go, gitlab.go, linear.go, orphans.go, and merge_slot.go
(which already had the correct pattern).
Also: EnsureRunning() now calls KillStaleServers() before starting a new
server, cleaning up orphaned dolt sql-server processes that accumulate when
parent processes crash without graceful shutdown (GH#2372).
Also: add cross-project data isolation tests (5 tests covering read isolation,
port collision, same-prefix isolation, concurrent writes, and concurrent
read-write mix). Based on tests by @PabloLION (PR #2472).
Co-Authored-By: PabloLION <dev@pablolion.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>