retro: record the error path that fired on success, in the file not the message

The R11 self-catch existed only in a commit message and a script comment. §5's
own rule says the file carries the finding, so it belongs in the retro.

Writing the BLOCKED.md pointer, the obvious form -- git show || { echo missing;
exit 4; } -- prints "the file is missing" for a file it has just printed in full,
because piping into head closes the pipe and git dies of SIGPIPE. An error path
that fires on success is worth no more than one that never fires.

Same family as the port's MIX default and my vertex cap, with one difference
worth keeping: both of those needed an outside observer, and this one did not,
because all four paths were exercised rather than the happy one. A script with
three failure branches has three tests and they cost a line each.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
sylph-decoder
2026-08-31 11:17:27 +00:00
parent b86e82150d
commit b0bf54b4a0

View File

@@ -262,6 +262,34 @@ point: it was run because it could have gone the other way.
---
## 7b. An error path that fired on SUCCESS — found while implementing §6
Recorded here rather than left in a commit message, because §5's own rule (D4)
says the file carries the finding and the message carries the delta.
Implementing the `BLOCKED.md` pointer to **R11** — *a cross-agent pointer must
fail loudly when it goes stale* — I wrote the obvious form:
```bash
git show "$REF:$FILE" || { echo "the file is missing"; exit 4; }
```
Piping that into `head` closes the pipe, `git show` dies of **SIGPIPE**, the
fallback fires, and the script prints *"the file is missing"* for a file it had
just printed **in full**.
**An error path that fires on success is worth no more than one that never
fires.** It is the same family as the port's material defaulting to `MIX` and my
vertex cap: the run completes, the output parses, and the answer is wrong. Both of
those took an outside observer to catch. This one did not — it was caught inside
one command, because I exercised **all four paths instead of the happy one**.
That is the cheap version of R3, and it is the version to reach for: a script with
three failure branches has three tests, and they cost one line each.
Fixed with `git cat-file -e` for existence and `exec git show` for content
([`peer_asks.sh`](../../tools/re-capture/peer_asks.sh)).
## 8. Proposed `PROTOCOL.md` delta — **not applied**
Presented for the human, and for the port to disagree with: