Regression test for BIT-32481: P1017 ("Server has closed the connection.") from linkSquadPerson → person.findUnique (the organizationId_sportsPlayerId lookup, the first DB call in the method).
Why
The fix is already in main:
BIT-32460 — retryOnConnectionClosed wraps syncEventSquadsNow, retrying once on P1017 with a fresh client.
BIT-32475 — isPrismaConnectionClosed catch downgrades the exhausted retry to info instead of rejecting to the archive caller's warn and paging the error loop.
The existing BIT-32475 test covers P1017 from person.findFirst (the FPA licence lookup). This PR adds the same coverage for person.findUnique (the organizationId_sportsPlayerId lookup) — the exact call in the BIT-32481 stack trace.
## What
Regression test for BIT-32481: P1017 ("Server has closed the connection.") from `linkSquadPerson` → `person.findUnique` (the `organizationId_sportsPlayerId` lookup, the first DB call in the method).
## Why
The fix is already in `main`:
- **BIT-32460** — `retryOnConnectionClosed` wraps `syncEventSquadsNow`, retrying once on P1017 with a fresh client.
- **BIT-32475** — `isPrismaConnectionClosed` catch downgrades the exhausted retry to `info` instead of rejecting to the archive caller's `warn` and paging the error loop.
The existing BIT-32475 test covers P1017 from `person.findFirst` (the FPA licence lookup). This PR adds the same coverage for `person.findUnique` (the `organizationId_sportsPlayerId` lookup) — the exact call in the BIT-32481 stack trace.
## Test
- `vitest run src/sports/service.test.ts` — 9 passed
- `vitest run src/lib/pg.test.ts` — 18 passed
- `tsc --noEmit` — clean
Paperclip-Issue: BIT-32481
Paperclip-Cluster: 9a675e2734df
The error loop reported P1017 ("Server has closed the connection.") from
linkSquadPerson → person.findUnique (the organizationId_sportsPlayerId
lookup). The fix is already in main: retryOnConnectionClosed (BIT-32460)
retries once on a fresh client, and isPrismaConnectionClosed (BIT-32475)
downgrades the exhausted retry to info instead of paging the error loop.
This adds a regression test for the findUnique path (the existing BIT-32475
test covers findFirst).
Paperclip-Issue: BIT-32481
Paperclip-Cluster: 9a675e2734df
spark
merged commit 2e6be068f5 into main2026-11-19 13:38:45 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Regression test for BIT-32481: P1017 ("Server has closed the connection.") from
linkSquadPerson→person.findUnique(theorganizationId_sportsPlayerIdlookup, the first DB call in the method).Why
The fix is already in
main:retryOnConnectionClosedwrapssyncEventSquadsNow, retrying once on P1017 with a fresh client.isPrismaConnectionClosedcatch downgrades the exhausted retry toinfoinstead of rejecting to the archive caller'swarnand paging the error loop.The existing BIT-32475 test covers P1017 from
person.findFirst(the FPA licence lookup). This PR adds the same coverage forperson.findUnique(theorganizationId_sportsPlayerIdlookup) — the exact call in the BIT-32481 stack trace.Test
vitest run src/sports/service.test.ts— 9 passedvitest run src/lib/pg.test.ts— 18 passedtsc --noEmit— cleanPaperclip-Issue: BIT-32481
Paperclip-Cluster: 9a675e2734df
The error loop reported P1017 ("Server has closed the connection.") from linkSquadPerson → person.findUnique (the organizationId_sportsPlayerId lookup). The fix is already in main: retryOnConnectionClosed (BIT-32460) retries once on a fresh client, and isPrismaConnectionClosed (BIT-32475) downgrades the exhausted retry to info instead of paging the error loop. This adds a regression test for the findUnique path (the existing BIT-32475 test covers findFirst). Paperclip-Issue: BIT-32481 Paperclip-Cluster: 9a675e2734df