fix: MINT-ZUSE says the stick was erased when it was (#168)

failed() printed "MINT-ZUSE: failed -- nothing changed" on every failure
after YES, though by then gpt_write_one() had rewritten the stick's partition
table and the identity partition's first blocks had been zeroed.

gpt_write_one() now tells the two apart: GPT_EIO when its first write failed
(nothing written), GPT_PART when a later write or flush failed (the disk is
changed). MINT-ZUSE keeps "failed -- nothing changed" for GPT_EIO only, and
says "failed -- the stick was erased; Zuse not minted" for every failure
after the table is written. The marker is still written last.

Tested first, seen to fail: qemu_session.py mint_part_fail (writes fail only
at the identity partition's first sector, LBA 2048) -- "nothing changed",
logs/20261112-122132. After: mint_part_fail PASS; mint_fail (every write
fails) still "nothing changed", PASS; replace (the success path) PASS. Their
logs here. FABRIC-3 XLVIII.20.

Captain Bob, 2026-11-12: "start #168".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-12 12:41:36 +00:00
parent 7e30b4525e
commit 54311be18a
21 changed files with 102 additions and 19 deletions
+16
View File
@@ -6565,3 +6565,19 @@ and memorize frequently so we can pick up where we left off").
removed, it can never take a job if it comes back. #140's "Done when" is met by this entry and the
workflows' comments once it reaches `master`.
### 20. #168: MINT-ZUSE says what happened to the stick (2026-11-12)
- **Found** (the code review of 2026-11-11): `failed()` printed "MINT-ZUSE: failed -- nothing changed"
on every failure after YES, though `gpt_write_one()` had by then rewritten the stick's partition
table and the identity partition's first blocks had been zeroed.
- **Tested first, seen to fail:** `qemu_session.py mint_part_fail` -- as `mint_fail`, but only writes
touching the identity partition's first sector (LBA 2048) fail, so the GPT is written and the mint
fails after it. Before: "nothing changed" (`logs/20261112-122132`).
- **Built:** `gpt_write_one()` tells the two apart -- `GPT_EIO` when its first write failed (nothing
written), a new `GPT_PART` when a later write or flush failed (the disk is changed). MINT-ZUSE says
"failed -- nothing changed" only then, and "failed -- the stick was erased; Zuse not minted" (58
characters) for every failure after the table is written. The marker is still written last: the
old Zuse stick works either way.
- **Seen to pass:** `mint_part_fail` (the new message, never "nothing changed", the old stick logs
in); `mint_fail`, every write failing, still "nothing changed"; `replace`, the success path.