Commit a35dd34
test(scripts): batch 8b — assertion floors for two b4-thunk and two recipe-A self-tests (#15307)
* test(scripts): floor measure-test-shard-timings' self-test on a registered battery
The 22 bare `if (...) throw ...` assertions in `selfTest()` are each wrapped
verbatim in the `check(() => { ... })` thunk PR #15198 landed: the condition is
carried in untouched, so no `!` can be dropped while the case still registers
and still passes. Zero named section banners, so one hoisted battery (the
PR #14896 / #15003 / #15217 shape), floored at the measured 22 with the roster's
own size pinned at 1. The floor throws, matching this file's own sink, and is
evaluated before the verdict so the success line can only be printed by a run
that actually ran its cases.
Part of #13799
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): floor measure-position-name-fold-census' self-test on a registered battery
The 13 `if (...) problems.push(...)` assertion sites in `selfTest()` are each
wrapped verbatim in the `check(() => { ... })` thunk PR #15198 landed. The sink
here is FAILURE-ONLY, so routing `problems.push` itself through `registerCase()`
would have inverted the floor rather than installing it: a green run would
register nothing and the battery would read DID NOT RUN. Zero named banners, so
one hoisted battery, floored at the 24 registrations measured on a run (four of
the thirteen sites sit inside loops: 9 + 4 + 4 + 2 + 5).
The floor lives inside the `!quiet` branch. `main()` gates the PRODUCTION census
on `selfTest({ quiet: true })`, which prints no verdict and so makes no claim for
a floor to guard; evaluating it there would let a roster edit change what a
census run outputs. Both production modes are byte-identical to the base tree.
One site stays outside the roster and says so in place: the `catch` arm of the
AUDIT_CONTROLS loop ends in `continue`, illegal inside the thunk's arrow
function, and rewriting that control flow is exactly what the verbatim rule
forbids. Its sibling in the same loop body is floored, so a loop that stops
running still reds.
Part of #13799
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): floor check-override-consistency's self-test on its table rows
Recipe A as the pilot PR #15271 settled it: each of the 17 row labels of the
literal `cases` table is a declared battery with a floor of 1, `registerCase(name)`
is the first statement of the driving loop body, and the roster is a LITERAL the
table is cross-checked against so a deleted or renamed row names ITSELF rather
than deleting its own floor. Roster size pinned at 17; duplicate labels are
refused from both sides. The three `// --- ... ---` comments inside the array are
grouping rules, not section heads.
The boolean `passed` becomes a `failures` counter so the red line can carry the
recipe's wording, `N failure(s) (cases and floor)`; no assertion condition is
touched and the green line is byte-identical to the base tree's.
Part of #13799
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): floor check-skill-line-ratchet's self-test on all 155 table rows
Recipe A per the pilot PR #15271: every row label is a declared battery with a
floor of 1, `registerCase(name)` is the first statement of the driving loop,
the roster is a LITERAL cross-checked against the table, size pinned at 155.
The only deleted line is the red-run verdict, reworded to the recipe's
`N failure(s) (cases and floor)`; the green line stays byte-identical.
The batch-8 census flagged this table's four `...(() => { ... })()` spreads as an
IIFE-produced block whose rows could not take a literal roster key. Measured, that
premise does not hold here: each IIFE is a SCOPING device that declares local
fixture consts and then returns an array of LITERAL [label, actual, expected]
rows. No label is a template string or computed, and no row comes from a
map/push/loop. Three independent readings agree on 155 -- labels extracted from
source, literal row starts, and the `cases.length` the green line prints on a run
-- so ALL 155 rows are floored with no residue, rather than the partition the row
anticipated.
Part of #13799
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 88a35c2 commit a35dd34
4 files changed
Lines changed: 775 additions & 95 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
| 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 | + | |
432 | 489 | | |
433 | 490 | | |
434 | 491 | | |
| |||
542 | 599 | | |
543 | 600 | | |
544 | 601 | | |
545 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
546 | 609 | | |
547 | 610 | | |
| 611 | + | |
548 | 612 | | |
549 | 613 | | |
550 | 614 | | |
551 | 615 | | |
552 | 616 | | |
553 | 617 | | |
554 | 618 | | |
555 | | - | |
| 619 | + | |
556 | 620 | | |
557 | 621 | | |
558 | 622 | | |
559 | 623 | | |
560 | 624 | | |
561 | 625 | | |
562 | | - | |
563 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
564 | 684 | | |
565 | 685 | | |
566 | 686 | | |
| |||
0 commit comments