Repository navigation
test(#11): assert the RowDescription-shifted manifestation in the pool-desync harness - #18
Conversation
…l-desync harness NexusPlus's consumer-contract suite found a second 1.0.2 manifestation of #11 that bypasses an app-side checkout 'error' guard: a stray RowDescription landing on a client whose activeQuery is null makes node-postgres' Client._handleRowDescription throw uncaught (not emit 'error'). The pool-desync harness previously only caught the CommandComplete-shift and the silent shifted/empty result; an uncaught crash showed up as an opaque non-zero exit. Add a process-level uncaughtException/unhandledRejection trap that records a 'crash' (tagging the RowDescription null-deref shape), prints the summary, and exits 2, so the RowDescription-shift is asserted as a first-class failure. Document the three manifestations in the test plan. Test-only; no library change. Verified green on 1.0.3 (released) and red on 1.0.2 (baseline/1.0.2); the crash trap+classifier verified against the exact Client._handleRowDescription null-deref shape.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc4dd1e648
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const PROTOCOL_RE = /unexpected \w+ message from backend/i; | ||
| // pg's Client._handleRowDescription does `this.activeQuery.handleRowDescription(...)`; | ||
| // a stray RowDescription with activeQuery === null throws this shape. | ||
| const ROWDESC_CRASH_RE = /Cannot read propert.*of null|handleRowDescription|activeQuery/i; |
There was a problem hiding this comment.
Require RowDescription details in the crash classifier
When any unrelated code in the harness or a dependency throws a null-property error such as Cannot read properties of null (reading 'foo'), the first regex alternative matches and the summary incorrectly labels it as the RowDescription-shift regression. Because this output is intended to distinguish that exact protocol manifestation from an ordinary harness crash, require the null-dereference shape and handleRowDescription/activeQuery evidence together rather than accepting every null-property TypeError.
Useful? React with 👍 / 👎.
Test-only follow-up to #11 (no library change, no release).
NexusPlus's consumer-contract suite surfaced a second 1.0.2 manifestation of #11 that bypasses an app-side checkout
'error'guard: a strayRowDescriptionlanding on a client whoseactiveQueryisnullmakes node-postgres'Client._handleRowDescriptionthrow uncaught rather than emit'error'. Thepool-desync.mjsharness previously caught the CommandComplete-shift and the silent shifted/empty result, but an uncaught crash showed up only as an opaque non-zero exit.This adds a process-level
uncaughtException/unhandledRejectiontrap that records acrash(tagging the RowDescription null-deref shape), prints the summary, and exits 2 — so the RowDescription-shift is asserted as a first-class failure. The three manifestations are documented indocs/adversarial-test-plan.md.Verified: green on 1.0.3 (released), red on 1.0.2 (
baseline/1.0.2); the trap + classifier verified against the exactClient._handleRowDescriptionnull-deref shape (Cannot read properties of null (reading 'handleRowDescription')).