From cf0700390390d10f5246b51835d3f2cc1822b483 Mon Sep 17 00:00:00 2001 From: Merlin Date: Tue, 13 Oct 2026 20:50:05 +0000 Subject: [PATCH] helm: Run 20 E18 -- the E17 append reproduced the very defect E17 describes Found by readback_final.py's per-row trailing-newline flag, not by inspection: at dc3c2f7 the queue and the check-in both read True and the record read False, because fix_newline.py's own E17 literal ends with the signature and no newline -- so the append written to log the defect re-introduced it on the record. Fixed by writing one newline byte; no line of content moved. Record 33,064 B / cfb71db33761... -> 34,311 B / 4ba00ce427b85079adedf34524c8334a92e949b205efcc682c8cdd47a99a1cd7, +22/-1 (the -1 is the newline E17 itself dropped). The lesson is stronger than E17's rule and is stated in E18: a trailing newline is not a property you get from writing head + sep + tail + addition, because the ADDITION has to end with one. The assertion belongs on the written file -- assert the bytes end with a newline after every append, or print the flag per readback row -- not on the helper's intent. Both instances are measured in E18 and neither is deleted. Nothing deployed, no cp into /root/.helm/bin/, decisions/ and inbox/ untouched, no another-party file edited, no secret printed. Live state unchanged: snapshot 14,039 B / aa842b0fd88037f8... / mtime_ns 1791479579475780303, held pin 120 B / 5b6d70716153c3f4... / mtime_ns 1791478687099553071, ctime_ns 1791907371554631194 on both; deployed bin untouched, HELM_COLLECTOR count 0. --- recoveries/helm-home-channel-guard.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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)