Commit e265443
committed
fix(wire-shape): close 4 review-surfaced gaps
- load_baseline raises SystemExit with regen hint when the JSON file
is malformed instead of dumping an opaque traceback.
- write_baseline cleans up its tmp sidecar on any exception so a
crashed run can't poison the next refresh from the same PID.
- The validator now exits 1 (not 0) when AXONFLOW_OPENAPI_SPECS_DIR
is set but doesn't point at a directory. A misconfigured CI step
silently disabling the gate produces a green check on a non-running
validator, which we refuse to do. An unset env still skips with 0.
- Workflow's SHA-bump guard distinguishes "baseline missing on base
branch" (genuine first-pin introduction) from "baseline present
but unparseable" (bypass attempt). A malformed baseline on the
base branch can no longer route a labelless PR through the
first-pin path.
- Java source parser:
* Recognises Java 15+ text blocks (`"""..."""`). Previously the
first `"""` looked like quote-empty-quote and the body parsed
as live source — fake `@JsonProperty(...)` and `class X {`
inside a text block silently corrupted attribution.
* Filters annotation matches whose position falls inside a
blanked range (string, comment, text block) so the wire-name
regex on raw content can't grab annotations the structural
pass already nullified.
* Attributes record-parameter annotations to the record. Pending
decls are now tracked between their token and the body `{`,
so `record Foo(@JsonProperty("x") int x) {}` no longer drops
the wire name. The SDK has no records today; this is forward
defence for the next type-class refactor.
- Documents the remaining anonymous-inner-class limitation (no
`class` keyword, so annotations would leak to the enclosing type).
The SDK does not put @JsonProperty inside anonymous inners.
Synthetic-fixture tests cover record params, text blocks with fake
annotations, line and block comments, nested classes, and enum
values. Real Java SDK baseline unchanged: 70 registered types, 39
drift, 8 cross-spec, 1 intra-file.1 parent 2873454 commit e265443
3 files changed
Lines changed: 137 additions & 60 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
181 | | - | |
182 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
183 | 209 | | |
184 | 210 | | |
185 | 211 | | |
| |||
228 | 254 | | |
229 | 255 | | |
230 | 256 | | |
231 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
232 | 261 | | |
233 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
234 | 265 | | |
235 | 266 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
244 | 275 | | |
245 | 276 | | |
246 | 277 | | |
| |||
249 | 280 | | |
250 | 281 | | |
251 | 282 | | |
252 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
253 | 287 | | |
254 | | - | |
| 288 | + | |
| 289 | + | |
255 | 290 | | |
256 | 291 | | |
257 | | - | |
258 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
259 | 299 | | |
260 | 300 | | |
| 301 | + | |
261 | 302 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
273 | 307 | | |
274 | 308 | | |
275 | 309 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 310 | + | |
| 311 | + | |
280 | 312 | | |
281 | 313 | | |
282 | 314 | | |
283 | 315 | | |
284 | 316 | | |
285 | | - | |
286 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
287 | 324 | | |
288 | 325 | | |
289 | 326 | | |
| |||
323 | 360 | | |
324 | 361 | | |
325 | 362 | | |
326 | | - | |
327 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
328 | 377 | | |
329 | 378 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | 379 | | |
335 | 380 | | |
336 | 381 | | |
337 | 382 | | |
338 | 383 | | |
339 | 384 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
344 | 399 | | |
345 | 400 | | |
346 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 41 | + | |
49 | 42 | | |
50 | | - | |
51 | | - | |
| 43 | + | |
52 | 44 | | |
53 | 45 | | |
54 | 46 | | |
55 | 47 | | |
56 | 48 | | |
57 | 49 | | |
58 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
0 commit comments