Commit 059ed74
committed
fix(observability): discriminator-lock the oneOf schema; align cockpit to 0.5.0
Three schema-validator tests were failing because the inbound-event
oneOf permitted fall-through: a tool.call with a missing required
field, or a runtime.metrics with a bad-type field, would be rescued by
the permissive generic branch. Add a branchIsStrictConst() guard and
rewrite the loop so once a strict-const branch claims a given type,
fall-through to the generic branch is forbidden. Also constrain
genericVariant.type to the 30 known Rust Event discriminators.
Bump inspector/Cargo.toml 0.1.0 -> 0.5.0 so the Rust cockpit matches
the Node SDK version reported by package.json. Cargo.lock regenerated
by cargo build --release.
Tests: 403 pass, 0 fail (was 400 / 3).1 parent 660f795 commit 059ed74
4 files changed
Lines changed: 85 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 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 | + | |
33 | 67 | | |
34 | 68 | | |
35 | 69 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
114 | 128 | | |
115 | 129 | | |
116 | 130 | | |
| |||
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
191 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
192 | 228 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
196 | 233 | | |
197 | | - | |
198 | | - | |
| 234 | + | |
199 | 235 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 236 | + | |
| 237 | + | |
206 | 238 | | |
207 | | - | |
208 | 239 | | |
209 | 240 | | |
210 | 241 | | |
| |||
0 commit comments