Commit 8ade0b3
committed
refactor(ci): let tracer-validation reuse benchmark tracer output
The pre-publish-benchmark job's `Run resolution benchmark` step already
spawns `run-tracer.mjs` once per language fixture for telemetry (writing
`dynamicEdges` / `dynamicConfirmed` counts into resolution-result.json).
The `Run tracer validation` step that follows then ran the same per-
language tracer subprocess again to compute same-file recall — doubling
the tracer cost in the pre-publish job.
Extend the script's per-language LangResult with a `tracer` artifact
containing status ('ok' | 'skipped') and the raw captured edges. The
status distinction mirrors the gate test's `runTracer` semantics
(null-return on toolchain-missing → 'skipped'). Refactor the gate test
to consume that artifact when RESOLUTION_RESULT_JSON is set, falling
back to running run-tracer.mjs directly when unset so devs can still
execute `npx vitest run tests/benchmarks/resolution/tracer/...`
standalone. Wire the env var through the workflow's tracer-validation
step.
Verified locally: gate test in artifact mode passes 35/35 in ~160ms
against an artifact produced by scripts/resolution-benchmark.ts (vs
~320ms for the standalone path that respawns the JS tracer subprocess).
The resolution-benchmark gate test still passes 170/170 with the new
`tracer` field present in the artifact.
Closes #11661 parent 0198c57 commit 8ade0b3
3 files changed
Lines changed: 77 additions & 6 deletions
File tree
- .github/workflows
- scripts
- tests/benchmarks/resolution/tracer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
340 | 344 | | |
341 | 345 | | |
342 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
| |||
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
| 83 | + | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
| |||
153 | 168 | | |
154 | 169 | | |
155 | 170 | | |
156 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
157 | 179 | | |
158 | | - | |
159 | | - | |
| 180 | + | |
| 181 | + | |
160 | 182 | | |
161 | 183 | | |
162 | 184 | | |
| |||
167 | 189 | | |
168 | 190 | | |
169 | 191 | | |
| 192 | + | |
170 | 193 | | |
171 | 194 | | |
| 195 | + | |
| 196 | + | |
172 | 197 | | |
173 | | - | |
| 198 | + | |
174 | 199 | | |
175 | | - | |
| 200 | + | |
176 | 201 | | |
177 | 202 | | |
178 | 203 | | |
| |||
276 | 301 | | |
277 | 302 | | |
278 | 303 | | |
279 | | - | |
| 304 | + | |
| 305 | + | |
280 | 306 | | |
281 | 307 | | |
282 | 308 | | |
| |||
285 | 311 | | |
286 | 312 | | |
287 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
288 | 317 | | |
289 | 318 | | |
290 | 319 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 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 | + | |
43 | 71 | | |
44 | 72 | | |
45 | 73 | | |
| |||
113 | 141 | | |
114 | 142 | | |
115 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
116 | 154 | | |
117 | 155 | | |
118 | 156 | | |
| |||
0 commit comments