Commit a234b7d
test(scripts): pin the prerequisite exit code and advisory in the three i18n gates (#15181)
* refactor(scripts): extract check-i18n-coverage's three refusal printers into pure text functions
The three PREREQUISITE NOT MET / COULD NOT MEASURE / POPULATION EMPTY
printers built their string inline inside `console.error(...)`, so the exit
code each path returns and the advisory that names it had no value a test
could read. Same shape `scripts/import-prerequisite.mjs` already uses.
Text unchanged: only the wrapper and the trailing comma move.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): pin check-i18n-coverage's three refusal paths from its own self-test
New battery, 23 cases, registered through the existing `registerCase()` helper:
the prerequisite class is 3, distinct from a finding's 1 and from 0; each of the
three printers exits through the named constant rather than a literal, prints
the pinned text function, interpolates the code rather than spelling one, and
renders an advisory that names both numbers with no stale `Exit code 1`.
Three negative controls prove each predicate can still fail.
Roster: 4 batteries -> 5 (SELF_TEST_BATTERY_FLOOR 4 -> 5); the new battery is
floored at its measured 23.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): pin check-i18n-bundles' refusal code and advisory from its own self-test
Extracts the refusal printer into `prerequisiteNotMetText` (message text
unchanged, both `scanned` branches move with it) and adds a 14-case battery:
the prerequisite class is 3, distinct from a finding's 1 and from 0; the printer
exits through the named constant, prints the pinned text function and
interpolates the code; both rendered advisories name both numbers with no stale
`Exit code 1`. Three negative controls prove each predicate can still fail.
Roster: 4 batteries -> 5 (SELF_TEST_BATTERY_FLOOR 4 -> 5); new battery floored
at its measured 14.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(cli): pin check-app-nav-i18n's refusal code and advisory from its own self-test
Extracts the refusal printer into `buildPrerequisiteText(probe)` (message text
unchanged — the live refusal on an unbuilt tree is byte-identical before and
after, still exit 3) and adds twelve cases in the file's existing self-test
shape: the prerequisite class is 3, distinct from a finding's 1 and from 0; the
refusal exits through the named constant, prints the pinned text function and
interpolates the code; the advisory names both numbers with no stale
`Exit code 1` and still names the probe file it was handed. Three negative
controls prove each predicate can still fail.
No battery roster added here — that is #13799's surface, not this card's.
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 6757634 commit a234b7d
3 files changed
Lines changed: 369 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 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 | + | |
588 | 662 | | |
589 | 663 | | |
590 | 664 | | |
591 | 665 | | |
592 | 666 | | |
593 | 667 | | |
594 | 668 | | |
595 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
596 | 672 | | |
597 | 673 | | |
598 | 674 | | |
| |||
632 | 708 | | |
633 | 709 | | |
634 | 710 | | |
635 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
636 | 730 | | |
637 | 731 | | |
638 | 732 | | |
| |||
646 | 740 | | |
647 | 741 | | |
648 | 742 | | |
649 | | - | |
| 743 | + | |
650 | 744 | | |
651 | | - | |
652 | 745 | | |
653 | 746 | | |
654 | 747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
986 | 987 | | |
987 | 988 | | |
988 | 989 | | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
989 | 1082 | | |
990 | 1083 | | |
991 | 1084 | | |
| |||
1038 | 1131 | | |
1039 | 1132 | | |
1040 | 1133 | | |
1041 | | - | |
1042 | | - | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1043 | 1138 | | |
1044 | 1139 | | |
1045 | 1140 | | |
| |||
1091 | 1186 | | |
1092 | 1187 | | |
1093 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1094 | 1206 | | |
1095 | 1207 | | |
1096 | 1208 | | |
| |||
1100 | 1212 | | |
1101 | 1213 | | |
1102 | 1214 | | |
1103 | | - | |
| 1215 | + | |
1104 | 1216 | | |
1105 | 1217 | | |
1106 | 1218 | | |
| |||
1112 | 1224 | | |
1113 | 1225 | | |
1114 | 1226 | | |
1115 | | - | |
| 1227 | + | |
1116 | 1228 | | |
1117 | | - | |
1118 | 1229 | | |
1119 | 1230 | | |
1120 | 1231 | | |
| |||
0 commit comments