docs(clients): cross-driver parity matrix#152
Conversation
REV review — PR #152
|
| Capability | Python (client.py/consumer.py) |
Go (pgque.go/consumer.go) |
TS (client.ts/consumer.ts) |
Matrix | Verdict |
|---|---|---|---|---|---|
connect / close |
connect() + PgqueClient.close() |
Connect() + Close() |
connect() + Client.close() |
✓/✓/✓ | accurate |
send |
PgqueClient.send |
Client.Send |
Client.send |
✓/✓/✓ | accurate |
send_batch |
PgqueClient.send_batch present |
absent | absent | ✓/TBD/TBD | accurate |
receive |
PgqueClient.receive |
Client.Receive |
Client.receive |
✓/✓/✓ | accurate |
ack |
PgqueClient.ack |
Client.Ack |
Client.ack |
✓/✓/✓ | accurate |
nack w/ retry_after+reason |
both params | hardcoded '60 seconds', no reason |
NackOptions { retryAfter, reason } |
✓/TBD/✓ | accurate (Go TBD lines up with #153) |
Consumer max_messages |
ctor kwarg | hardcoded 100 in consumer.go Receive call |
opts.maxMessages |
✓/TBD/✓ | accurate |
Consumer unknown_handler policy |
acks + WARN log | nacks unknown msg | nacks unknown msg | TBD/TBD/TBD | see below |
One ambiguity, non-blocking: the unknown_handler policy row is TBD for all three, but all three drivers already implement a policy on main today (Python: ack+warn; Go/TS: per-message nack). If the row means "user-configurable policy hook" (i.e. #138-style), the TBDs are fine — please add a footnote like "TBD = configurable policy hook; current default behavior differs per driver" so readers don't read TBD as "no behavior at all."
No cell is wrong vs main. No cell that should already be ✓ is mislabeled TBD.
Guidelines (CLAUDE.md)
- Naming: lowercase
pgquefor code refs,PgQuein prose — both used correctly. - No leaked person names beyond what is already in source headers (Nikolay Samokhvalov, Marko Kreen via PgQ attribution); no GitLab/internal infra/Round/WI references.
- Conventional Commits: title
docs(clients): cross-driver parity matrix✓. - No SECURITY DEFINER / search_path concerns (docs).
Docs
- Internal anchors render correctly as a GitHub-flavored Markdown table.
- Cross-links to umbrella Umbrella: deep audit findings for Python, Go, and TypeScript drivers #146 and parity issue Clients: define and implement a cross-driver API parity matrix #144 present and correctly framed ("closes the docs portion of Clients: define and implement a cross-driver API parity matrix #144"); deferred items (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, TypeScript consumer: use PgQue LISTEN/NOTIFY wakeups instead of poll-only 30s latency #147, Clients: do not hide ack() no-op result in TypeScript/Go #148, Clients: define transactional consumer API/story for receive-process-ack #150, TypeScript client: ticker()/forceTick() discard SQL return values and docs misstate behavior #151) listed with one-line scope.
- Tone matches the existing
docs/flat layout — short, present tense, no marketing. - Legend mentions "N/A" but no row uses it; harmless.
- Nit: header says "v0.2.0 parity matrix" while the intro says "tracks parity" — consider adding the install version / date the matrix was captured at, since the doc is explicitly a
main-snapshot.
Architecture (CLAUDE.md rule 3 / SQL 1:1 wrappers)
Every row in the matrix is a 1:1 wrapper over a pgque.* SQL primitive:
send→pgque.sendsend_batch→pgque.send_batchreceive→pgque.receiveack→pgque.acknack→pgque.nackConsumeris a thin poll loop aroundreceive+ack/nack; not a composite that reduces to multiple primitives in a non-obvious way.
No row implies a composite that hides multiple SQL calls behind one driver method. Aligned with rule 3. The v0.2.1 follow-ups (subscribe/unsubscribe/ticker/force_tick per #138, typed errors #140, send_text/send_json shape #141, NULL handling #143, bigint parser #145, LISTEN/NOTIFY #147, ack no-op #148, transactional consumer #150, ticker return values #151) are all wrapper- or shape-level concerns — appropriate for v0.2.1, not blockers for the v0.2.0 parity-must-have set.
Note: TS client.ts already implements subscribe/unsubscribe/ticker/forceTick on main, while #138 covers them as a v0.2.1 follow-up across all drivers. Consider a brief footnote that TS is partially ahead, so readers don't think those wrappers are missing everywhere.
Summary
Matrix is accurate against d66c16f. Cells correctly anticipate #153 (Go nack/Consumer), #155 (Python — already mostly ✓), #154 (TS — already mostly ✓). No blocking issues. Two non-blocking nits: clarify unknown_handler TBD semantics and note TS's existing subscribe/unsubscribe/ticker wrappers.
Generated by Claude Code
|
Updated the matrix to reflect the actual v0.2.0 ship state (commit 3bad71c). All 7 TBD cells eliminated. Verified each row against Post-merge tally per driver:
Notes from the verification pass:
Header note added above the table makes the assumption explicit: "Status as of v0.2.0 (assumes PRs #153, #154, #155 merge as planned)." v0.2.1 follow-ups subsection retained and slightly expanded so #138 covers both the deferred Python/Go wrappers and the deferred TS Generated by Claude Code |
|
Dropped the Commit: 383e7c0 Generated by Claude Code |
383e7c0 to
10d11a0
Compare
Leo review — PR #152Scope reviewed: BLOCKINGNone found. NON-BLOCKINGNone. POTENTIAL / watch later
Review notes
Validation
Verdict: READY once CI is green. |
Lifecycle / testing evidence for head
|
Update for head
|
Summary
Adds
clients/README.mdwith the cross-driver parity matrix called for in #144.connect/close,send,send_batch,receive,ack,nack(retry_after + reason), andConsumer(max_messages, unknown_handler policy) for Python / Go / TypeScript.maintoday. Per-driver PRs are in flight to fill the TBD rows.Closes the docs portion of #144. The implementation portion is covered by the in-flight per-driver PRs (
fix/clients-python-v0.2.0,fix/clients-go-v0.2.0,fix/clients-typescript-v0.2.0).Test plan
Generated by Claude Code