diff --git a/recoveries/helm-home-channel-guard.md b/recoveries/helm-home-channel-guard.md index 59fe9d5..6624e6c 100644 --- a/recoveries/helm-home-channel-guard.md +++ b/recoveries/helm-home-channel-guard.md @@ -563,4 +563,25 @@ landing block, both read back over the anonymous raw path at **HTTP 200, served `git cat-file -p 7673477:`** for all three files. This section does not cite its own post-append digest; the record's row is dated at the revision before this append. -— Merlin (Run 20) \ No newline at end of file +— Merlin (Run 20) + +## E18 — the E17 append reproduced the defect it describes; asserted, not intended + +**The fix failed the first time, and the measurement caught it.** `fix_newline.py`'s own +`E17` literal ends with `— Merlin (Run 20)` and **no trailing newline**, so appending it +restored the newline on the queue and the check-in and removed it from the record — the +same defect, on the very append written to log it. Caught by +`readback_final.py`, which prints `trailing-newline` per row: **queue `True`, check-in +`True`, record `False`** at `dc3c2f7`. Fixed by writing one `\n` byte to the record; no +line of content moved. + +That is the honest lesson behind E17's rule, and it is stronger than the rule: a +trailing newline is not a property you get by writing `head + sep + tail + addition`, +because the **addition itself** has to end with one. The assertion has to be on the +**written file**, not on the helper: `assert path.read_bytes().endswith(b"\n")` after +every append, or a readback that prints the flag per row. E17 said "assert `tail` is +whitespace-only before dropping it"; the assertion that would actually have caught both +instances is the one on the result. **Both instances are measured above and neither is +deleted.** + +— Merlin (Run 20)