Commit 39d6a18
fix(gates): give the in-process ESLint ratchets the parser stack headroom
* fix(gates): give the in-process ESLint ratchets the parser stack headroom `pnpm lint` already has
`check:slot-lookup` and `check:query-options-erasure` drive ESLint through its
Node API, so neither inherits the `--stack-size=4000` the root `lint` script
puts on ESLint's CLI entry. Measured on this tree: the gates' own ESLint channel
fails to parse `packages/spec/src/migrations/registry.ts` 10/10 runs at the
default V8 stack and 0/10 with the flag; the gates' whole-population runs failed
2 in 14 at the default stack, which is why every red read as a flake.
Both gates now re-exec themselves once with the flag, following the re-exec
precedent in `scripts/pm/check-governed-merges.mjs`. The headroom lives in the
gate rather than in a script line so it cannot be dropped by invoking the gate
a different way.
A self-test asserts the current `registry.ts` still parses through the gate's
own channel -- a parse, never a pinned depth or a pinned stack size, because
that file gains a step per breaking protocol major and any number would expire
at the next one.
Part of #10449
* fix(gates): make the headroom adoption check immune to a commented-out call
Found by ablating the check itself: commenting out
`ensureStackHeadroom(...)` left the identifier in the source, so the regex
still matched and the self-test reported the gate as armed at exactly the
moment it stopped being armed. Strip whole-line comments before testing.
* refactor(gates): use the repo's shared js-comment-mask instead of a private strip
scripts/js-comment-mask.mjs is 'the ONE answer' to comment-or-code and exists
precisely to retire per-gate copies of this logic (#9367). stripComments
rather than maskComments: this check reports gate names, never offsets.
Ablation re-run against it -- a commented-out ensureStackHeadroom() call is
still caught.
* style(gates): arm the headroom before the constant block, not inside it
Pure reordering -- the re-exec already ran before any linting; this just stops
it splitting the two gates' constant blocks in half.
---------
Co-authored-by: Claude <noreply@anthropic.com>pnpm lint already has (#10464)1 parent 9f05b7d commit 39d6a18
3 files changed
Lines changed: 406 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
101 | 120 | | |
102 | 121 | | |
103 | 122 | | |
| |||
443 | 462 | | |
444 | 463 | | |
445 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
446 | 536 | | |
447 | 537 | | |
448 | 538 | | |
| |||
454 | 544 | | |
455 | 545 | | |
456 | 546 | | |
457 | | - | |
| 547 | + | |
| 548 | + | |
458 | 549 | | |
459 | 550 | | |
460 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
| |||
0 commit comments