Commit eb687fc
fix(run-engine): don't mislabel DB errors as UnclassifiableWaitpointId in completeWaitpoint (#4259)
## Summary
The waitpoint completion path wrapped every error from the
store-resolution step (`runStore.forWaitpointCompletion`) as
`UnclassifiableWaitpointId`. That step probes the database to find the
owning store, so a transient connection failure surfaced as a misleading
"unclassifiable waitpointId" error, hiding the real cause and losing the
underlying error's type, retryability and grouping. During a brief
database failover this mislabel sent an incident investigation down a
false trail before the real connection error was found underneath.
## Fix
The catch is narrowed: only a genuine `UnclassifiableRunId` (the
documented classification-failure signal from
`RunStore.forWaitpointCompletion`) becomes `UnclassifiableWaitpointId`.
Every other error, including database connectivity failures, is rethrown
unchanged.
With the default classifier this also turns `UnclassifiableWaitpointId`
into a clean signal: it no longer fires on infra noise, so any
occurrence indicates a real id-routing defect worth alerting on.
Recovery does not depend on this change, since lost completion side
effects are re-delivered by the finalization guard from
[#4849](#4849); this PR
is about diagnosing failures correctly.
A hermetic unit test locks both behaviors: a database error bubbles up
unchanged, and a classification failure is wrapped with the original
error as `cause`.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Sutton <45313566+d-cs@users.noreply.github.com>
Co-authored-by: Matt Aitken <matt@mattaitken.com>1 parent baeff45 commit eb687fc
2 files changed
Lines changed: 106 additions & 3 deletions
File tree
- internal-packages/run-engine/src/engine
- tests
- waitpointCoordinator
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
125 | | - | |
| 146 | + | |
126 | 147 | | |
127 | 148 | | |
128 | 149 | | |
| |||
0 commit comments