Repository navigation
Commit 9acddde
Verdict handshake for 134 scripts/** self-tests that exit 0 on an early return (#14479)
* fix(devx): sentinel verdict handshake for 68 self-tests whose dispatch discards the result
`scripts/**` gates spelled `if (--self-test) selfTest();` had no handshake: a
`return` anywhere above the verdict printed nothing, evaluated no floor and
still exited 0 — a self-test that never finished, reported as one that passed.
Transplants the boundary-only shape landed on `check-self-test-wired.mjs`: a
per-file `SELF_TEST_VERDICT` sentinel returned as the last statement of the
self-test, after its verdict line, and compared at the dispatch. Nothing inside
any self-test body changes.
An unbraced branch body (`else if (c) selfTest();`) is braced first, so the
multi-statement replacement cannot re-bind a following `else`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* fix(devx): verdict-flag handshake for 22 self-tests dispatched as `return selfTest()`
Here the self-test's own return value reaches a caller, so the sentinel shape
cannot be used without changing what the dispatch propagates. A module-level
`selfTestReachedVerdict` is set only after the verdict prints and read between
the call and the return, leaving the returned value exactly as it was.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* fix(devx): verdict-flag handshake for 20 self-tests dispatched as `process.exit(selfTest())`
The shape that reads like a handshake and is not: an early bare `return` yields
`undefined`, and `process.exit(undefined)` is exit 0. The self-test's numeric
exit code is load-bearing, so it is captured and re-exited unchanged; the flag
is read in between.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* fix(devx): verdict-flag handshake for 14 self-tests dispatched inside a ternary
`process.exit(argv.includes('--self-test') ? selfTest() : main())` and the
`const code = ... ? selfTest() : main(argv)` variant carry the same hole. The
ternary is split so the self-test arm can be handshaked; the production arm
keeps its exact expression and exit code.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* fix(devx): verdict-flag handshake for the remaining 10 self-test dispatches
Nine gates whose dispatch discards the result but whose self-test ends in
`return <code>` or `process.exit(...)`, so an appended sentinel return would be
unreachable; the flag is set immediately before that terminal statement.
Plus `check-durability-degradation-log-level.mjs`, whose dispatch calls TWO
self-test entries and combines their statuses with `||`. An early return in
either yields `undefined`, which that `||` reads as a pass, so each entry gets
its own handshake rather than a wrapper.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* style(devx): align the wrapped dispatch blocks in 16 gates
Braces were added around 51 unbraced branch bodies so the multi-statement
handshake could not re-bind a following `else`. In the 16 whose dispatch was
already nested, the block that moved inside them kept its old indentation and
came out one level deep. Whitespace only — no statement moves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
* fix(devx): declare the sentinel's type on check-test-typecheck's self-test
`selfTest()` there is annotated `: void`, so returning the verdict sentinel
added two raw tsc errors to the ROOT program and drifted the
@objectstack/spec-monorepo DEBT entry 26 -> 28. The ledger is shrink-only and
raising it is maintainer-only, so the errors are fixed instead: the annotation
now says what the function returns. Root `tsc --noEmit` is back to 26.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Euac24FtaPN3AXf9uiUWA
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent ab540ed commit 9acddde
134 files changed
Lines changed: 2494 additions & 133 deletions
File tree
- scripts
- docs-audit
- qa
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
554 | 560 | | |
555 | 561 | | |
556 | 562 | | |
| |||
742 | 748 | | |
743 | 749 | | |
744 | 750 | | |
| 751 | + | |
| 752 | + | |
745 | 753 | | |
746 | 754 | | |
747 | 755 | | |
| |||
750 | 758 | | |
751 | 759 | | |
752 | 760 | | |
753 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
754 | 771 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3224 | 3224 | | |
3225 | 3225 | | |
3226 | 3226 | | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
3227 | 3233 | | |
3228 | 3234 | | |
3229 | 3235 | | |
| |||
4898 | 4904 | | |
4899 | 4905 | | |
4900 | 4906 | | |
| 4907 | + | |
| 4908 | + | |
4901 | 4909 | | |
4902 | 4910 | | |
4903 | 4911 | | |
| |||
4922 | 4930 | | |
4923 | 4931 | | |
4924 | 4932 | | |
4925 | | - | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
4926 | 4941 | | |
4927 | 4942 | | |
4928 | 4943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
957 | 974 | | |
958 | 975 | | |
959 | 976 | | |
| |||
1909 | 1926 | | |
1910 | 1927 | | |
1911 | 1928 | | |
| 1929 | + | |
1912 | 1930 | | |
1913 | 1931 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
368 | 374 | | |
369 | 375 | | |
370 | 376 | | |
| |||
452 | 458 | | |
453 | 459 | | |
454 | 460 | | |
| 461 | + | |
| 462 | + | |
455 | 463 | | |
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
459 | 467 | | |
460 | 468 | | |
461 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
462 | 479 | | |
463 | 480 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
| |||
538 | 545 | | |
539 | 546 | | |
540 | 547 | | |
| 548 | + | |
541 | 549 | | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
546 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
547 | 566 | | |
548 | 567 | | |
549 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
814 | 821 | | |
815 | 822 | | |
816 | 823 | | |
| |||
1014 | 1021 | | |
1015 | 1022 | | |
1016 | 1023 | | |
| 1024 | + | |
1017 | 1025 | | |
1018 | 1026 | | |
1019 | 1027 | | |
1020 | 1028 | | |
1021 | 1029 | | |
1022 | | - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1023 | 1042 | | |
1024 | 1043 | | |
1025 | 1044 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
594 | 600 | | |
595 | 601 | | |
596 | 602 | | |
| 603 | + | |
| 604 | + | |
597 | 605 | | |
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
601 | 609 | | |
602 | 610 | | |
603 | 611 | | |
604 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
605 | 622 | | |
606 | 623 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
553 | 560 | | |
554 | 561 | | |
555 | 562 | | |
| |||
820 | 827 | | |
821 | 828 | | |
822 | 829 | | |
| 830 | + | |
823 | 831 | | |
824 | 832 | | |
825 | 833 | | |
| |||
834 | 842 | | |
835 | 843 | | |
836 | 844 | | |
837 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
838 | 857 | | |
839 | 858 | | |
840 | 859 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
700 | 707 | | |
701 | 708 | | |
702 | 709 | | |
| |||
1097 | 1104 | | |
1098 | 1105 | | |
1099 | 1106 | | |
| 1107 | + | |
1100 | 1108 | | |
1101 | 1109 | | |
1102 | 1110 | | |
1103 | 1111 | | |
1104 | 1112 | | |
1105 | | - | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1106 | 1125 | | |
1107 | 1126 | | |
1108 | 1127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
794 | 800 | | |
795 | 801 | | |
796 | 802 | | |
| |||
1508 | 1514 | | |
1509 | 1515 | | |
1510 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
1511 | 1519 | | |
1512 | 1520 | | |
1513 | 1521 | | |
1514 | 1522 | | |
1515 | 1523 | | |
1516 | 1524 | | |
1517 | 1525 | | |
1518 | | - | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1519 | 1534 | | |
1520 | 1535 | | |
1521 | 1536 | | |
| |||
0 commit comments