Commit f64b61c
committed
CI-internal hardenings; no user-visible behaviour change.
- refresh.js: `--sha` with no value used to be silently consumed as
the positional `specsDir`, masking the missing argument and routing
the script through the gitHeadSHA fallback. Now exits 2 with a
clear message.
- validate.js: an empty `registered_types` paired with non-empty
cross_spec / intra_file / per_type_drift entries used to silently
disable Gate 4 (rename-escape). The validator now treats this
combination as a baseline corruption and fails the run. A genuinely
fresh baseline (every section empty) still skips the gate as
before, since the first-pin run has nothing to guard.
- lib.js writeBaseline: a crash between writeFileSync(tmp, ...) and
renameSync(tmp, BASELINE_PATH) used to leave a `.tmp.<pid>`
sidecar, which a future writer with the recycled PID would
collide on. Now wraps in try/catch + unlinkSync on any throw.
- lib.js extractInterfaceProps: an `interface X extends Y` would
silently under-report fields because we walk only iface.members.
No such interface ships in the SDK today; the gate now warns
loudly the first time one appears so coverage gets resolved
before drift can hide. Full heritage walking is the proper fix
if this becomes a routine pattern.
Verifications:
- refresh.js with `--sha` as last token exits 2; with `--sha foo` works.
- validate.js with corrupted baseline (empty registered_types but
populated drift/cross_spec) exits 1 with explanatory message.
- writeBaseline temp-file is cleaned up on synthetic write error.
- Real baseline regenerates byte-identical to origin/main.
1 parent 27d6fa5 commit f64b61c
3 files changed
Lines changed: 69 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
223 | 248 | | |
224 | 249 | | |
225 | 250 | | |
| |||
290 | 315 | | |
291 | 316 | | |
292 | 317 | | |
293 | | - | |
294 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
295 | 331 | | |
296 | 332 | | |
297 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
227 | 249 | | |
228 | 250 | | |
229 | 251 | | |
| |||
0 commit comments