Skip to content

Umbrella: deep audit findings for Python, Go, and TypeScript drivers #146

@NikolayS

Description

@NikolayS

Scope

Umbrella for the 2026-04-30 deep driver audit across:

  • clients/python
  • clients/go
  • clients/typescript

Review goals:

  • correctness against PgQue SQL semantics;
  • alignment across all three drivers;
  • “thin wrappers over SQL primitives / don't reinvent the wheel”;
  • ease of use;
  • tests that actually catch semantic regressions.

Local test evidence

TypeScript:

cd clients/typescript
npm run check
# ok

# Fresh temp DB with sql/pgque.sql installed:
PGQUE_TEST_DSN=postgresql:///... npm test
# 22 passed

Python:

# Fresh temp DB with sql/pgque.sql installed, temp venv:
python -m pytest -q clients/python/tests
# 39 passed, 2 failed

Go:

go test ./clients/go
# not run locally: go binary missing on review host

Go findings are from code inspection + SQL repros; CI should be used as the execution gate.

Filed issues

High/data-safety:

Driver/API alignment and ergonomics:

Suggested order

  1. Fix Clients: high-level consumers can skip unreturned batch rows when max_messages < batch size #134 first. It affects all three high-level Consumers and can silently skip work.
  2. Fix Clients: Go/TypeScript consumers ack batch even when nack fails #135 before relying on Go/TS consumers for retry/DLQ correctness.
  3. Decide Clients: align unknown event type policy across Python, Go, and TypeScript consumers #136 once, then update docs/tests in all drivers.
  4. Fix Python client: tests fail on fresh PgQue install and encode weak transaction assertions #137 so Python CI is trustworthy.
  5. Use Clients: define and implement a cross-driver API parity matrix #144 as the parity roadmap; individual implementation issues can branch from it.

Non-goals

This audit did not attempt to rewrite drivers or merge PRs. It documents defects and alignment gaps for red/green TDD fixes.

Additional TypeScript/pass-3 findings filed

Updated suggested order:

  1. Clients: high-level consumers can skip unreturned batch rows when max_messages < batch size #134, Clients: Go/TypeScript consumers ack batch even when nack fails #135, TypeScript client: top-level undefined payload is not JSON null as documented #149 are correctness/data-safety first.
  2. Clients: align unknown event type policy across Python, Go, and TypeScript consumers #136 is a product/API policy decision; unblock docs/tests after choosing.
  3. Python client: tests fail on fresh PgQue install and encode weak transaction assertions #137 makes Python CI trustworthy.
  4. TypeScript consumer: use PgQue LISTEN/NOTIFY wakeups instead of poll-only 30s latency #147 and Clients: define transactional consumer API/story for receive-process-ack #150 affect high-level Consumer usability/latency semantics.
  5. Clients: define and implement a cross-driver API parity matrix #144 coordinates parity; Go client: add missing thin wrappers/options for parity and ease of use #138/Clients: align typed error mapping across Python, Go, and TypeScript #140/Clients: expose explicit text-vs-JSON payload APIs consistently #141/Clients: define behavior for SQL-valid NULL event type/payload #143/TypeScript client: avoid process-global pg bigint parser mutation at import time #145/Clients: do not hide ack() no-op result in TypeScript/Go #148/TypeScript client: ticker()/forceTick() discard SQL return values and docs misstate behavior #151 are implementation/API cleanup underneath it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineerOwned by an engineer agent (do work, open PR)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions