Commit b320ba5
fix(run-ops split): drop dead connectedRuns relation from ApiWaitpointPresenter hydrate select
GET /api/v1/waitpoints/tokens/:id returned HTTP 500 under split routing. The
hydrate() select in ApiWaitpointPresenter included the connectedRuns RELATION,
but it is never referenced in the returned object (all scalars) — dead code left
over from the presenters de-join pass (48ae62b70), which stripped relations from
WaitpointListPresenter but missed this one.
Under split routing a standalone cuid token classifies LEGACY, so readThroughRun
probes the scalar-only run-ops NEW client FIRST. The dedicated run-ops Waitpoint
model is scalar-only (relations de-normalized), so Prisma threw
PrismaClientValidationError: Unknown field connectedRuns before the legacy
fallback could run.
Removing the block makes the select all-scalar and valid against both the
control-plane client and the scalar-only run-ops-new client. No return-shape,
type, or SDK change.
Regression test: extends apiWaitpointPresenter.readthrough.test.ts with a
heteroRunOpsPostgresTest case that uses the REAL scalar-only run-ops client
(prisma17) as the split-mode NEW client and seeds a cuid token on the legacy
side. Fails before the fix (Unknown field connectedRuns), passes after
(resolves via the legacy fallback). Not caught by the existing heteroPostgresTest
cases because those run the full control-plane schema on both sides.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8f287d3 commit b320ba5
2 files changed
Lines changed: 46 additions & 8 deletions
File tree
- apps/webapp
- app/presenters/v3
- test
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
| |||
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | | - | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
256 | 300 | | |
257 | 301 | | |
258 | 302 | | |
| |||
0 commit comments