Commit 24d8bc8
fix(gates): declare the workspace parents as globs, so the dispatch deriver can read the whole population (#10540)
`scripts/pm/dispatch-gates.mjs` decides which cards are told to run a gate by
scanning that gate's module body for the path literals it operates on, and its
covering rule refuses a literal with no path separator as too generic (measured
and deliberate: admitting bare top-level words takes it from 19k watch-hint
pairs to 158k).
`check-test-source-alias.mjs` and `check-type-source-resolution.mjs` each
declared their whole population as `WORKSPACE_PARENT_DIRS`, of whose 11 entries
8 carried a separator and 3 did not (`packages`, `apps`, `examples`). So the
derivation's answer was decided by WHERE a package happens to sit: measured,
1832 of the 4844 tracked files under packages/ derived check:test-source-alias
and the rest did not, the misses being exactly the flat `packages/<pkg>`
layouts plus all of apps/ and examples/. Same test file, two layouts, two
different answers, with nothing in the output saying so.
Spelling the array as the pnpm-workspace globs it already documents itself to
be (`packages/*`, `apps/*`, …) and re-deriving the directory names from it puts
a separator in every entry. The walk is unchanged — both gates still report the
same package census — and there is no second list to keep in sync.
Measured on this tree, whole-corpus, before -> after:
matched (family, tracked-file) pairs 37903 -> 43356 (+5453)
check:test-source-alias 1833 -> 5116 (+3283)
check:type-source-resolution 2946 -> 5116 (+2170)
The two deltas sum to the total, so no other family moved; exactly two families
resolve to the two changed scripts, measured in both trees. For scale, the
alternative #9626 measured and refused (admitting bare top-level literals
globally) was +139084, and took `packages/spec/src/index.ts` from 7 matched
families to 34. This takes it from 13 to 14.
Each gate's self-test now pins the readability property, because the regression
is a tidy-up nobody would flag: the live gate stays green when an entry loses
its separator, so only an assertion can be loud about it.
Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
Co-authored-by: Claude <noreply@anthropic.com>1 parent 13fa51e commit 24d8bc8
2 files changed
Lines changed: 134 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 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 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
518 | 549 | | |
519 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
520 | 554 | | |
521 | 555 | | |
522 | 556 | | |
| |||
2644 | 2678 | | |
2645 | 2679 | | |
2646 | 2680 | | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
2647 | 2701 | | |
2648 | 2702 | | |
2649 | 2703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
321 | 352 | | |
322 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
323 | 357 | | |
324 | 358 | | |
325 | 359 | | |
| |||
1313 | 1347 | | |
1314 | 1348 | | |
1315 | 1349 | | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1316 | 1370 | | |
1317 | 1371 | | |
1318 | 1372 | | |
| |||
0 commit comments