fix(storage): purge stale lbug/DuckDB refs after ADR 0019; fix 2 latent bugs#247
Merged
Merged
Conversation
…nt bugs The single-file SQLite migration (ADR 0019, #245) left stale references to the removed graph.lbug + temporal.duckdb backends across source comments, docs, agent-facing MCP tool descriptions, and user-facing error strings. Sweep and correct them, and fix two real bugs the migration left behind: 1. describeArtifacts() still returned graphFile="graph.lbug" / temporalFile="temporal.duckdb" (paths.ts). That value is a live existence probe (is-indexed.ts) and the user-facing path in the MCP "store unreadable" error (tools/shared.ts). openStore() writes store.sqlite, so both pointed at a file that never exists. Now returns store.sqlite for both views. paths.test.ts updated (it pinned the wrong values, so it was green while asserting broken behavior). 2. bm25CorpusHasSummaries() probed `information_schema.tables` (tools/query.ts) — a DuckDB/Postgres catalog node:sqlite does not expose. The query threw, was swallowed by the surrounding try/catch, and the probe was silently always-false. Switched to sqlite_master; updated the test mock that pinned the old string. Also: the `sql` MCP tool now advertises nodes/edges/embeddings as directly SQL-queryable (they are real tables in store.sqlite) instead of claiming the graph is "NOT SQL-queryable, reachable only through Cypher"; the cypher: arg returns a clear "use sql: instead" envelope against the default SQLite backend (execCypher is unimplemented per ADR 0019, reserved for community forks). sql.test.ts updated to assert the inverted contract. Verified: core-types/storage/mcp/cli typecheck clean; storage (81), mcp (234), cli (346) suites pass; banned-strings gate passes.
Merged
theagenticguy
pushed a commit
that referenced
this pull request
Jun 25, 2026
🤖 Automated release via release-please --- <details><summary>root: 0.9.2</summary> ## [0.9.2](root-v0.9.1...root-v0.9.2) (2026-06-24) ### Features * **analysis:** plumbing sieve + candidate_business tag (deterministic, advisory) ([#248](#248)) ([383b719](383b719)) * **ingestion:** business-logic analyze phase — populate likely_plumbing + candidate_business ([#249](#249)) ([a3d44ad](a3d44ad)) * **storage:** single-file SQLite + WASM embedder — zero native dependencies ([#245](#245)) ([c72c84f](c72c84f)) ### Bug Fixes * **storage:** purge stale lbug/DuckDB refs after ADR 0019; fix 2 latent bugs ([#247](#247)) ([90f40a2](90f40a2)) </details> <details><summary>cli: 0.9.2</summary> ## [0.9.2](cli-v0.9.1...cli-v0.9.2) (2026-06-24) ### Features * **storage:** single-file SQLite + WASM embedder — zero native dependencies ([#245](#245)) ([c72c84f](c72c84f)) ### Bug Fixes * **storage:** purge stale lbug/DuckDB refs after ADR 0019; fix 2 latent bugs ([#247](#247)) ([90f40a2](90f40a2)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The single-file SQLite migration (ADR 0019, #245) left stale references to the removed
graph.lbug+temporal.duckdbbackends across source comments, docs, agent-facing MCP tool descriptions, and user-facing error strings. This sweeps and corrects them, and fixes two real bugs the migration left behind that its own tests did not catch.Bugs fixed (behavioral)
1.
describeArtifacts()pointed at a file that no longer exists.paths.tsstill returnedgraphFile="graph.lbug"/temporalFile="temporal.duckdb", butopenStore()writesstore.sqlite. That value is not cosmetic: it feeds theis-indexedexistence probe (cli/src/lib/is-indexed.ts) and the user-facing path in the MCP "store unreadable" error (mcp/src/tools/shared.ts). So the error told users to check a.codehub/graph.lbugthat is gone. Now returnsstore.sqlitefor both views.paths.test.tshad pinned the wrong values, so it was green while asserting broken behavior — updated.2.
bm25CorpusHasSummaries()queriedinformation_schema.tables.That is a DuckDB/Postgres catalog
node:sqlitedoes not expose. The query threw, was swallowed by the surroundingtry/catch, and the probe was silently always-false in production. Switched tosqlite_master; updated the test mock that pinned the old string.Also: the
sqlMCP tool contractThe
sqltool now advertisesnodes/edges/embeddingsas directly SQL-queryable (they are real tables instore.sqlite) instead of claiming the graph is "NOT SQL-queryable, reachable only through Cypher". Thecypher:arg returns a clear "usesql:instead" envelope against the default SQLite backend (execCypheris unimplemented per ADR 0019, reserved for community forks).sql.test.tsupdated to assert the inverted contract.Scope
47 files. Most are comment/doc corrections; the 4 above are behavioral. The DuckDB→SQLite comment pass was context-aware (historical-fact mentions like "replaced the lbug + DuckDB pair" intentionally kept).
Verification