Commit c0827d6
fix(bootstrap): a failed hasher now says WHICH way it failed, in one line
"(no 64-hex digest in its output)" was printed for a tool that is NOT INSTALLED,
for one that RAN AND FAILED, and for one that RAN AND PRINTED SOMETHING ELSE.
Three conditions, three different fixes, one message. On CI run 35537960554 it
read as five missing tools on the Solaris guest and bought a whole cycle spent
adding a sixth to the chain, when all five were present and working and the
extractor was the bug. Worse, a tool that is not installed recorded NOTHING at
all -- the `command -v` miss returned before touching KAT_TRIED -- so the chain's
`sha256 -q` was simply absent from the guest's report with no explanation.
One line per tool is kept; the line now distinguishes four verdicts:
sha256sum -> ran but exited 1: sha256sum: unrecognized option
shasum -a 256 -> ran (exit 0) but printed no 64-hex digest: MD5 (kat) = deadbeef
sha256 -q -> command not found: no `sha256` on PATH
digest -a sha256 -> ran (exit 0) but answered 0000...0000, which is not the known answer
stderr is folded into the captured output deliberately: a tool that complains
says why, and the extractor cannot be fooled by prose -- it wants exactly 64 hex
characters. kat_snip takes the first line and truncates to 72 characters, so a
chatty tool cannot turn one entry into a paragraph; the test asserts both the
per-condition wording and that a three-line tool still yields one line.
RED first: against the parent commit the case fails on the very first
assertion -- a tool that is not installed does not say so.
A diagnostic that cannot distinguish its own causes is a gate that cannot fail.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVks4skLBgHSDcjnQ4kHz61 parent 1ce54b2 commit c0827d6
2 files changed
Lines changed: 80 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | 263 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
255 | 282 | | |
256 | 283 | | |
257 | | - | |
| 284 | + | |
258 | 285 | | |
259 | 286 | | |
260 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
752 | 800 | | |
753 | 801 | | |
754 | 802 | | |
| |||
0 commit comments