* maybe
* /{cmd,internal}: updates to bd sql proxied-server mode
* fix(sql): terminate line comments on CR and scope multi-statement help
Address Copilot review on #5002:
- topLevelStatementCount: `--` and `#` line comments now terminate on CR as
well as LF, so CR-only line endings can't swallow following statements and
undercount a batch.
- sql help text: scope the multi-statement batch semantics to proxied-server
mode alongside --database.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The #4847 reapply brought back tests written when sqlite was still a
supported backend; update them to the tombstone contract:
- internal/beads: FindDatabasePath returns "" for sqlite metadata (fail
closed at store selection) and never creates the database file.
- doctor: server health reports the generic non-Dolt warning; the perf
refusal message names the backend without a support claim.
- examples/library-usage: exercise the API against embedded Dolt instead
of the removed sqlite backend.
Also sweep stragglers flagged in review: bd sql help text, conformance
audit provenance comments, the test-strategy example path, and a comment
tying the flake devShell sqlite3 CLI to the legacy migration scripts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The HookFiringStore decorator wraps DoltStorage for automatic hook
firing, but hides the concrete store's optional interfaces
(StoreLocator, BackupStore, Flattener, Compactor, etc.) from type
assertions. This caused "storage backend does not support X" errors
for flatten, backup, compact, dolt remote, and other operations.
Add storage.UnwrapStore() helper that peels the decorator before type
assertions, and apply it at all 24 callsites in cmd/bd/.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add bd context command showing effective backend identity (beads dir, repo
root, dolt mode, server endpoint, database, project ID, role) without requiring
DB open -- useful for degraded-state diagnostics. Supports --json.
Update error messages across 13 commands to suggest bd doctor for diagnosis
before bd init for reset, preventing unsafe destructive recovery paths.
Fix: use cfg.GetDoltServerPort() instead of doltserver.DefaultConfig() for
correct port resolution in context command. Add env var isolation in tests
to prevent BEADS_DOLT_PORT interference.
Co-Authored-By: matt wilkie <maphew@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The --no-db CLI flag was removed when beads switched to Dolt-only, but
several user-facing messages still referenced it:
- bd init help text mentioned "--no-db" as a valid option
- Error messages in 6 commands suggested "use 'bd --no-db'" as a fix
- Generic "no database found" hint suggested the removed flag
- Dead code block in init.go handled --no-db initialization
The config key (no-db: true in config.yaml) is still valid for the
CGO fallback path; only the CLI flag references are removed.
Fixes#1848
Adds a new `bd sql` subcommand that passes raw SQL queries directly to
the underlying database (SQLite or Dolt). Supports table, JSON, and CSV
output for SELECT queries, and reports rows affected for write queries.
Write queries are blocked in read-only mode via CheckReadonly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/jasper
Rig: beads
Role: polecats