ReviewOS

home-lang/home

Port node-postgres TLS pool and bulk-query integration

#289
Open chris opened this 9 days ago ·
9 days ago

Context

Bun corpus position 4041, js/third_party/pg/pg.test.ts, contains two test bodies gated together by TLS_POSTGRES_DATABASE_URL. The runner records the skipped describe as one intentional todo. The fixture covers a TLS pool version query plus a client lifecycle that creates a table, inserts 300 parameterized rows, reads them back, and closes cleanly.

Remaining work

  • Connect the pg Client and Pool adapters to Home's native PostgreSQL/TLS transport.
  • Support pg-connection-string options, TLS settings, pool lifecycle, parameterized bulk inserts, row counts, and client cleanup.
  • Exercise a deterministic local TLS PostgreSQL fixture where possible while preserving the upstream secret-backed path.
  • Ensure connect/query/pool errors expose stable codes, operation/phase, sanitized endpoint/database context, causes, and operation stack frames without leaking credentials or query parameters.

Acceptance

  • The copied file remains one intentional skipped-suite todo without TLS_POSTGRES_DATABASE_URL and both contained tests pass when a compatible endpoint is configured.
  • Permanent local coverage verifies connection parsing, pool/client lifecycle, bulk parameter handling, cleanup, and redacted diagnostics.
  • #66 references the completed transport slice and corpus counts.
9 days ago

Bootstrap registration and safe failure handling landed in db77ab600; this issue remains open for the native TLS/query transport.

Completed now:

  • The copied pg corpus imports resolve and reach the upstream describe.skipIf gate.
  • Without TLS_POSTGRES_DATABASE_URL, position 4041 records one intentional skipped-suite todo (covering both test bodies), with no failure or unsupported syntax.
  • pg-connection-string, Client, and Pool compatibility surfaces are present.
  • Bootstrap connect/query/pool failures use sanitized PGConnectionError diagnostics with stable code, operation/phase, endpoint/database context, original cause, and operation stack frames.
  • Permanent coverage proves URL credentials are absent from both messages and stacks.

Remaining: connect these surfaces to Home's native PostgreSQL/TLS transport and make both contained tests pass when a compatible endpoint is configured.

Sign in to comment on this issue.