Repository navigation
Commit 873e0e8
test(cli): derive the
Fixes #18894
Clause-②: no
## What this changes
`packages/cli/test/build-json-failure-warnings.e2e.test.ts` and
`packages/cli/test/build-json-failure-conversions.e2e.test.ts` each
froze three integers read
off `packages/cli/src/commands/compile.ts` — 11 payload literals, 10
`success: false`,
1 `success: true`. **All six were correct**, and that is the defect: the
*shape*, not a stale
number. One honest new exit — the very thing these two files exist to
enforce — turns all six
red, and because both files are nightly-tier by NAME they turn red only
at night, hours after
the PR that did it has merged. That is #18848's `priority:p1` pre-staged
on `compile.ts`.
Ported from the shape PR #18880 landed on the sibling
`validate-json-failure-*` pair:
- the count is **derived** — `toHaveLength(callSites.length)` against a
word-boundary
`emitJson` call-site match over **the same masked source** the payload
extractor reads;
- the old integer is demoted to a **floor**,
`toBeGreaterThanOrEqual(10)`, which rots only in
the exits-are-REMOVED direction;
- one **partition** assertion (`success: true` ×1, `success: false` =
`literals.length - 1`)
replaces the two frozen counts.
⛔ No production file is touched. The diff is those two test files and
nothing else —
`compile.ts` is card #18431's carrier (branch `ccdc9f5389`) and is left
alone.
## Premises, re-measured on `origin/main` before a line was written
Re-derived with the tests' OWN extractor against the masked `compile.ts`
at
`f112a740bd` (`origin/main` at branch point), ⛔ not inherited from the
card:
```
payload literals 11 the pins' 11 was correct
success: false 10 correct
success: true 1 correct
/\bemitJson\s*\(/g 11 symmetric with the extractor
```
**Collection, re-measured in this worktree** (`vitest list --filesOnly`,
`packages/cli`):
`OS_TEST_TIERS` unset ⇒ 267 files, **0** of these two among them, lit
control
`artifact-packages.test.ts` present; `=nightly` ⇒ 68 files, **both**
present, lit control
absent. Both files sit in the `integration` project (`--project unit`
collects 0 of them).
## os build --json exit count from compile.ts, so an honest new exit cannot red main at night (#18966)1 parent 47a9002 commit 873e0e8
2 files changed
Lines changed: 138 additions & 17 deletions
File tree
- packages/cli/test
Lines changed: 70 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 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 | + | |
439 | 501 | | |
| 502 | + | |
440 | 503 | | |
441 | 504 | | |
442 | 505 | | |
| |||
Lines changed: 68 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
| 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 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
515 | 572 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
522 | 579 | | |
| 580 | + | |
523 | 581 | | |
524 | 582 | | |
525 | 583 | | |
| |||
0 commit comments