Repository navigation
Wire the postgres store into the runtime, CLI, and MCP server - #710
arrry-hydraDB merged 1 commit into
Conversation
|
@hydra-mira-review review |
Mira score 5/5 · 🟢 Good to merge
Users can select PostgreSQL storage through the runtime, command line, and MCP server in both SDKs. Shared settings require a PostgreSQL URI and graph name. Documentation, tests, and probes cover setup, matching errors, and password redaction. Before this ships · 1 with another PR, 1 in place
How this PR works · 5 changes, 2 medium risk, 3 low riskPostgres tables can already be read through the store, but settings cannot select it. This final layer wires that store into both SDKs, their CLIs, and MCP servers. It reuses existing connection settings and adds validation, credential probes, documentation, and integration coverage. 1. Validate Postgres addresses and require a graph name · 🟠 medium risk ·
|
There was a problem hiding this comment.
Mira Review Summary
The conformance job fails because its Python environment lacks the Postgres driver. The new connection error comparison in typescript/test/conformance/py_side.py:2216 also fails in CI because asyncpg is excluded.
Key Issues
| Issue | Location | |
|---|---|---|
| 🔴 | The new connection-error comparison fails in CI because its Python installation excludes asyncpg. | typescript/test/conformance/py_side.py:2216 |
7ddd586 to
8614e29
Compare
8614e29 to
8d982bd
Compare
|
@hydra-mira-review review |
8d982bd to
898ff57
Compare
|
@hydra-mira-review review |
898ff57 to
d05a593
Compare
|
@hydra-mira-review review |
d05a593 to
e695e8b
Compare
|
@hydra-mira-review review |
e695e8b to
07ab813
Compare
|
@hydra-mira-review review |
07ab813 to
a52ff47
Compare
|
@hydra-mira-review review |
Signed-off-by: adityamishra-hydradb <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
a52ff47 to
a86fa49
Compare
|
@hydra-mira-review review |
Summary
5/5 of #706. Adds
store=postgresto the runtime, CLI, and MCP server of both SDKs:--uritakes the postgresql:// login and--databasenames the pg_hydradb graph.Adds the docs page for the store, and the secret-echo probe now covers it.
Implementation details
Door:
one-wayNew
storevalue and new settings errors, shared by the CLI,SELFGRAPH_*, and MCP in both SDKs.Cleanup:
noneWhat to delete:
Decisions
databasealready names the graph for FalkorDB, so it names the pg_hydradb graph here. The login lives in the URI, soauthis ignored with the usual warning.store=postgresneeds apostgres://orpostgresql://URI and a graph name; each missing piece isinvalid_settingwith itsfield. The message does not echo the URI, since a query string can hold a password.storestill means HydraDB, as before. The store gets the settings namespace, since it serves only one.scripts/probes/secret_echo.py --store postgreschecks the API, settings, CLI, and MCP paths with marker passwords in the URI. Side fix in the same file: the CLI path ranmain()inside the probe's event loop, so it only ever saw aninternal_errorfromasyncio.run; it now runs in a worker thread and reaches the real connection error, for the Bolt stores too.postgres. It builds pg_hydradb from a pinned hydradb commit and runs these gated tests of both SDKs on Postgres 16 and 17. No image goes to a registry.docs/backends.mdgets the Postgres section (setup in Docker, Python, TypeScript, CLI, MCP, the statements the store runs, the trigram index, and the limits);docs/cli.mdlists the new store.Validation
tests/test_runtime.pyandtest/pgHydradbStore.test.ts: settings errors and the store the settings build. Gated tests drive the CLI (path) and a read-only MCP server (retrieve) against Postgres 16, 17, and 18.selfgraph --store postgres --uri ... --database work retrieve "who works at Acme"prints the Acme employees;mcp --read-onlystarts and serves;SyncSelfGraph(PgHydraDBStore(...)).neighbors(...)returns the right rows.gh) went into Postgres tables and a pg_hydradb graph. An agent asked 5 questions through the MCP tools; all 5 answers matched the GitHub data. This found thatcheck_readinesscalled the graph unreachable; 1/5 now fixes that.selfgraph mcpneeds themcpextra.secret_echo.pyfor neo4j, hydradb, cypher, and postgres: clean.precheck --base4/5: all checks passed.conformanceGraphwhile Docker builds loaded the machine; the rerun passed.make probes:plan_apply,secret_echo, andunmerge_orderpass;parity_tablefails the same way on main and on the branch (vitest cannot parse a.scmquery file in this environment).ruff checkandruff format --check: clean.Limits
Same as 2/5. The MCP server's
check_answerablestill raisesunsupported_readfor this store; agents can go on toretrieve, as its instructions say. The maintainers decided on 2026-12-05 to keep this limit (see 2/5).Linked issue
Closes #706
AI Assistance
Checklist
/approved.AGENTS.md).Breaking changes
None.
🤖 Generated with Claude Code