method: commit the tool before running it, and never edit it mid-run

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 01:01:31 +00:00
parent 6d708cd2ed
commit 5bdc4c0104

View File

@@ -2749,3 +2749,30 @@ of the other traps on this page.
📌 Use a heredoc (`git commit -F -`) or single quotes for any message containing 📌 Use a heredoc (`git commit -F -`) or single quotes for any message containing
backticks. This page is full of identifiers in backticks, so the exposure is backticks. This page is full of identifiers in backticks, so the exposure is
constant. constant.
## Commit the tool before you run it — and never edit it while it runs
The third submenu sweep died because I **edited the sweep script while its own run
was in flight**, and deliberately broke its decision rule with `sed` to check the
new self-test could fail. The sweep reads its script when *it* starts — after the
reach probe finishes — and that fell inside the window. It read the broken rule.
✅ **The self-test caught it and refused to run**, on the day it was written,
against a fault I had introduced. Without it the sweep would have reported
`RESETS` for all three screens: confident, uniform, and fabricated.
⚠️ Three further self-inflicted faults in the same hour, recorded because the
failure was process rather than analysis:
* a **competing `x11grab` during a measurement** — the concurrency confound
`sylpheed-port` had just warned cost them a 7-point swing;
* `pkill -f x11grab` to clear it, which can kill the running probe's own capture —
this page already records `pkill -f` matching the caller's shell, biting the same
way from a different direction;
* the **restore of the broken file sat as the last line of a command that timed
out**, so it never ran; recovering with `git checkout` then discarded the entire
uncommitted rework.
📌 **An uncommitted tool is one timed-out command away from being unrecoverable,
and a tool edited during its own run is not the tool that ran.** Commit first, then
run. Cheap, and it would have prevented all four.