Commit 752cca8
guard: close the gaps two other projects pointed at
The owner shared the notes of two other projects of his, and the rule
that held was: measurements, traps and methods transfer, conclusions do
not. Two conclusions from there did not survive being checked here, and
three of the traps found real defects.
The conclusion that failed: a refusal comes out in the language of the
machine. True there, on .NET, measured on two machines. Go does not
behave that way - it asks Windows for the English message explicitly
before falling back. Measured here on a Polish install, Errno(1) gives
"Incorrect function." while FormatMessage on its own gives "Niepoprawna
funkcja.". Writing their sentence down would have been a false claim
about this tool.
The change stands for a different reason. The system's sentence is opaque
in any language - "Incorrect function." for reading a directory tells
nobody anything - so describeError replaces it with ours and keeps the
number, which is the part that means the same everywhere. Pointing a
command at a directory now says so and prints what to run instead, which
is the mistake somebody actually makes because the neighbouring commands
take directories.
Also checked and NOT adopted: their two command line findings, a flag
silently accepted and a flag missing from the help. Both are impossible
here by construction - a separate FlagSet per command refuses an unknown
flag, and the help is generated from that same set. No guard was added
for something the architecture already closes.
The trap that paid off most: a guard kept by hand is a guard somebody
eventually does not add. Two rows of the regression surface claimed a
locality guard was proven by mutation and no entry named one, so
untouchable rule 2 rested on a sentence. Four mutations went in, each
aimed one test at a time - the first substitution reddened only the
reordering guard, and naming any of the other three would have reported
it as uncaught.
Their question about a second Ctrl+C produced a probe and two answers.
There is no second press to measure: the run ends within 0.00 s of the
first, in both shapes tried, so every later press lands on a process that
has already gone. And the probe crashed on "files": null in a manifest
describing no files - a defect nobody was looking for, where every other
empty collection beside it was written as {}.
Six numbering schemes and 186 links between documents now have guards
too. They skip loudly on a fresh checkout, because the documents live
outside the repository.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 3bcb429 commit 752cca8
7 files changed
Lines changed: 814 additions & 16 deletions
File tree
- internal
- cli
- guard
- manifest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
41 | 85 | | |
42 | 86 | | |
43 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
236 | 254 | | |
237 | 255 | | |
238 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | | - | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | | - | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | | - | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | | - | |
| 407 | + | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | | - | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| |||
465 | 470 | | |
466 | 471 | | |
467 | 472 | | |
468 | | - | |
| 473 | + | |
469 | 474 | | |
470 | 475 | | |
471 | 476 | | |
| |||
569 | 574 | | |
570 | 575 | | |
571 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
572 | 581 | | |
573 | 582 | | |
574 | 583 | | |
575 | | - | |
| 584 | + | |
576 | 585 | | |
577 | 586 | | |
578 | 587 | | |
| |||
673 | 682 | | |
674 | 683 | | |
675 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
676 | 689 | | |
677 | 690 | | |
678 | 691 | | |
679 | | - | |
| 692 | + | |
680 | 693 | | |
681 | 694 | | |
682 | 695 | | |
| |||
766 | 779 | | |
767 | 780 | | |
768 | 781 | | |
769 | | - | |
| 782 | + | |
770 | 783 | | |
771 | 784 | | |
772 | 785 | | |
| |||
898 | 911 | | |
899 | 912 | | |
900 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
901 | 918 | | |
902 | 919 | | |
903 | 920 | | |
904 | | - | |
| 921 | + | |
905 | 922 | | |
906 | 923 | | |
907 | 924 | | |
908 | 925 | | |
909 | 926 | | |
910 | | - | |
| 927 | + | |
911 | 928 | | |
912 | 929 | | |
913 | 930 | | |
| |||
929 | 946 | | |
930 | 947 | | |
931 | 948 | | |
932 | | - | |
| 949 | + | |
933 | 950 | | |
934 | 951 | | |
935 | 952 | | |
| |||
950 | 967 | | |
951 | 968 | | |
952 | 969 | | |
953 | | - | |
| 970 | + | |
954 | 971 | | |
955 | 972 | | |
956 | 973 | | |
| |||
997 | 1014 | | |
998 | 1015 | | |
999 | 1016 | | |
1000 | | - | |
| 1017 | + | |
1001 | 1018 | | |
1002 | 1019 | | |
1003 | 1020 | | |
| |||
1016 | 1033 | | |
1017 | 1034 | | |
1018 | 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 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1019 | 1101 | | |
1020 | 1102 | | |
1021 | 1103 | | |
| |||
0 commit comments