Commit e7b2f27
committed
fix(ci): preserve full precision and guard malformed resolution artifacts (#1167)
- scripts/resolution-benchmark.ts: stop rounding precision/recall to 3
decimals before writing the artifact. The rounding let a near-miss like
0.8497 round up to 0.850 and silently clear a 0.85 threshold in CI
artifact mode while failing in fixture mode.
- tests/benchmarks/resolution/resolution-benchmark.test.ts: validate
numeric fields in metricsFromArtifact so a stale or malformed artifact
surfaces a clear 'regenerate' error instead of a confusing TypeError at
the threshold assertions.
- tests/benchmarks/resolution/resolution-benchmark.test.ts: reject an
empty artifact in loadArtifact. Without this guard, an empty {} would
register zero describe blocks and vitest would exit 0 with '0 tests',
silently passing the gate.1 parent d697929 commit e7b2f27
2 files changed
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | | - | |
132 | | - | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
295 | 307 | | |
296 | 308 | | |
297 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
298 | 325 | | |
299 | 326 | | |
300 | 327 | | |
| |||
0 commit comments