chore(deps): bump jvspatial to 0.0.16 and mark PostgreSQL supported - #140
Merged
Conversation
jvspatial 0.0.16 ships the two fixes that kept jvagent off Postgres: DatabaseConfigurator.initialize_graph_context() now accepts db_type=postgres, and PostgresDB rebuilds its asyncpg pool when the event loop changes -- the case jvagent hits every boot, bootstrapping the graph under asyncio.run() and then serving from uvicorn's loop. Verified against the released wheel with the stock CLI and no patches: graph bootstraps onto Postgres (39 nodes, node/edge/object tables and indexes created by the driver), /health reports PostgresDB, JWT login resolves a Postgres-stored user, agent turns write the memory subgraph, and a post-restart turn recalls pre-restart state. 15/15 checks. Add scripts/smoke_postgres.sh so that stays true. Unit tests never touch a real Postgres, and the pool-affinity failure only appears across a server restart, so the regression that motivated this is invisible to the suite. The script spins up its own container and skips agent-turn checks when no model key is configured, keeping the persistence checks. Docs move from "blocked upstream" to a version requirement, and docs/postgres.md section 4 becomes a verification guide rather than a record of what I tried. Two claims kept deliberately: - The DSN still reaches the driver via env only. 0.0.16 adds ServerConfig.database.postgres_dsn, but server_config.py builds an explicit DatabaseConfig without postgres fields, which overrides the env-derived group -- confirmed postgres_dsn is None through create_server_from_config(). Threading those settings is a separate change. - The log DB still silently falls back to a json file log for postgres. Also fix two stale pin references in jvspatial-integration.md sections 1 and 5, which still claimed ==0.0.12 while the pin had moved to 0.0.15.
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
Bumps the pin to
jvspatial==0.0.16and flips PostgreSQL from blocked to supported, because it now actually is.0.0.16 (TrueSelph/jvspatial#35, released today) ships the two fixes that kept us off Postgres:
DatabaseConfigurator.initialize_graph_context()acceptsdb_type=postgres, andPostgresDBrebuilds its asyncpg pool when the event loop changes — the case jvagent hits on every boot, bootstrapping the graph underasyncio.run()and then serving from uvicorn's loop.Also adds
scripts/smoke_postgres.shso this doesn't silently regress, and fixes two stale pin references that predate this work.Related issues
Upstream fix: TrueSelph/jvspatial#35, released in 0.0.16. Docs originally landed in #139.
Type of change
Changes
pyproject.tomljvspatial==0.0.15→==0.0.16scripts/smoke_postgres.shdocs/postgres.md.env.example.planning/reference/jvspatial-integration.mddocs/environment-keys-reference.mdCLAUDE.mdChecklist
CONTRIBUTING.mdand the localCLAUDE.md.pre-commit run --all-filespasses.pytest tests/passes — 3253 passed, 0 failures against 0.0.16.file:linein the description.CHANGELOG.mdupdated where relevant — docs yes; no CHANGELOG entry, see note.Notes for reviewers
Verified against the released wheel, not a local checkout.
pip install jvspatial==0.0.16from PyPI, stockjvagentCLI, zero patches: graph bootstraps onto Postgres (39 nodes;node/edge/objecttables and indexes created by the driver unattended),/healthreports"database":"connected", lifecycle logs📊 Database: PostgresDB, JWT login resolves a Postgres-stored user, agent turns write the memory subgraph, and a post-restart turn recalls pre-restart state. 15/15 checks.Why a smoke script and not a test. Both failure modes here are invisible to
pytest: the suite never touches a real Postgres, and the pool-affinity bug only appears across a server restart — two processes, two event loops. A unit test cannot express that. The script spins up its own container, and when no model key is configured it skips the agent-turn checks and still runs the persistence ones, so it can go in CI as-is if you want it there.Two documented limitations I deliberately kept, both still true on 0.0.16:
ServerConfig.database.postgres_dsn, so I checked whether it now flows through us — it doesn't.server_config.pybuilds an explicitDatabaseConfig(...)with no Postgres fields, which overrides the env-derived group;create_server_from_config()yieldspostgres_dsn: NonewithJVSPATIAL_POSTGRES_DSNset. Soapp.yamldatabase.uriis silently ignored for Postgres, unlike mongodb. Threading the fourpostgres_*settings through is a natural follow-up — code plus tests, deliberately not in this docs/pin PR.JVSPATIAL_LOG_DB_TYPEdefaults toJVSPATIAL_DB_TYPE— so this fires by default and never warns.Two stale pin references fixed.
jvspatial-integration.md§1 and §5 both claimedjvspatial==0.0.12whilepyproject.tomlhad said0.0.15for some time. Pre-existing drift, unrelated to this bump, but that file is what agents read for the jvspatial boundary and §5 exists specifically to pin version policy — leaving it wrong while editing the same file seemed worse than fixing it.No CHANGELOG entry, consistent with #139: our changelog records jvagent package behavior, and the behavior change here is jvspatial's. Say the word if you'd rather dependency bumps be listed.