Commit Graph
2 Commits
Author SHA1 Message Date
Priya RamanandPaperclip fb354fd0ff fix(server): remove a NUL byte from the fatal-error test file and an unref hazard on the exit path
The test file had one literal NUL byte in a string literal, so Git read
the whole file as binary and hid it from every diff. The fallback
string was unreachable, so the fix asserts on `error.stack` directly.

`flushWithTimeout` also called `timer.unref?.()`. An unreferenced timer
does not keep the event loop open, so a crash with no other open
handle could let Node exit with code 0 before `process.exit(1)` runs.
The 2-second bound already gives the same protection, so the line is
removed, and the timer now clears inside `finish` instead.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-27 21:15:28 +00:00
Priya RamanandPaperclip 2d6c3dc597 feat(server): measure the Postgres driver null-socket crash on fatal errors
Add a process-level handler for uncaughtException and unhandledRejection.
It reports a fixed-cardinality verdict to first-party telemetry — whether
the crash matches the known postgres null-socket write defect — and calls
process.exit(1) on every path, so it does not change today's crash
behavior. This adds measurement only; it does not guard against the
defect.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-27 21:05:38 +00:00