Commit cb97148
fix(run-ops split): self-default resolveWaitpointThroughReadThrough to safe run-ops clients
The read-through concern defaulted both newClient and legacyReplica to $replica
(control-plane), so a bare caller that omits `deps` — the waitpoints wait route —
never queried the dedicated run-ops replica. A co-located, NEW-resident waitpoint
minted by streams.input().wait() lives on the run-ops-new DB, so the read missed,
returned null, and the route 404'd (re-serialized to 500).
Match the deps the complete/callback routes pass: default newClient to
runOpsNewReplica, legacyReplica to $replica, and splitEnabled to
runOpsSplitReadEnabled — mirroring readThroughRun's own self-defaulting. This
immunizes any bare caller (present or future) against the control-plane pin,
without touching the wait route. The wait/complete/callback call sites live on a
higher branch and are unchanged; complete/callback keep their explicit deps
(now redundant but harmless).
Adds a heteroRunOps regression case driving the concern with no `deps` via the
`defaults` DI seam: proves the old $replica default misses a NEW-resident
waitpoint (null) while the safe run-ops default finds it. No mocks; the fallback
is exercised against real PG14/PG17 containers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 88359b2 commit cb97148
2 files changed
Lines changed: 68 additions & 4 deletions
File tree
- apps/webapp
- app/runEngine/concerns
- test
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
12 | 30 | | |
13 | 31 | | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
| 35 | + | |
17 | 36 | | |
| 37 | + | |
| 38 | + | |
18 | 39 | | |
19 | 40 | | |
20 | 41 | | |
21 | 42 | | |
22 | 43 | | |
23 | 44 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
27 | 48 | | |
28 | 49 | | |
29 | 50 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
154 | 197 | | |
155 | 198 | | |
156 | 199 | | |
| |||
0 commit comments