Skip to content

chore(deps): bump jvspatial to 0.0.16 and mark PostgreSQL supported - #140

Merged
eldonm merged 1 commit into
mainfrom
chore/jvspatial-0.0.16
Aug 5, 2026
Merged

chore(deps): bump jvspatial to 0.0.16 and mark PostgreSQL supported#140
eldonm merged 1 commit into
mainfrom
chore/jvspatial-0.0.16

Conversation

@eldonm

@eldonm eldonm commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Bumps the pin to jvspatial==0.0.16 and 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() accepts db_type=postgres, and PostgresDB rebuilds its asyncpg pool when the event loop changes — the case jvagent hits on every boot, bootstrapping the graph under asyncio.run() and then serving from uvicorn's loop.

Also adds scripts/smoke_postgres.sh so 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

  • Bug fix (non-breaking)
  • New feature (non-breaking) — Postgres becomes a usable backend
  • Breaking change
  • Documentation
  • Chore / tooling / CI

Changes

File Change
pyproject.toml jvspatial==0.0.15==0.0.16
scripts/smoke_postgres.sh new — 15-check end-to-end Postgres smoke
docs/postgres.md status → version requirement; §3 rewritten as version history; §4 now a verification guide
.env.example drops the "NOT USABLE YET" banner
.planning/reference/jvspatial-integration.md Postgres becomes a supported row; "four backends" → five; two stale pin refs fixed
docs/environment-keys-reference.md DSN note cites the version requirement
CLAUDE.md drops "(blocked upstream)"

Checklist

  • I read CONTRIBUTING.md and the local CLAUDE.md.
  • pre-commit run --all-files passes.
  • pytest tests/ passes — 3253 passed, 0 failures against 0.0.16.
  • Bug fixes cite file:line in the description.
  • Docs / CHANGELOG.md updated where relevant — docs yes; no CHANGELOG entry, see note.
  • No ADR was modified in place.

Notes for reviewers

Verified against the released wheel, not a local checkout. pip install jvspatial==0.0.16 from PyPI, stock jvagent CLI, zero patches: graph bootstraps onto Postgres (39 nodes; node/edge/object tables and indexes created by the driver unattended), /health reports "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:

  • The DSN reaches the driver via env only. 0.0.16 adds ServerConfig.database.postgres_dsn, so I checked whether it now flows through us — it doesn't. server_config.py builds an explicit DatabaseConfig(...) with no Postgres fields, which overrides the env-derived group; create_server_from_config() yields postgres_dsn: None with JVSPATIAL_POSTGRES_DSN set. So app.yaml database.uri is silently ignored for Postgres, unlike mongodb. Threading the four postgres_* settings through is a natural follow-up — code plus tests, deliberately not in this docs/pin PR.
  • The log DB silently falls back to a json file log for any type jvspatial doesn't recognize, Postgres included, and JVSPATIAL_LOG_DB_TYPE defaults to JVSPATIAL_DB_TYPE — so this fires by default and never warns.

Two stale pin references fixed. jvspatial-integration.md §1 and §5 both claimed jvspatial==0.0.12 while pyproject.toml had said 0.0.15 for 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.

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.
@eldonm eldonm self-assigned this Aug 5, 2026
@eldonm
eldonm merged commit c38ec0f into main Aug 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant