import io, os
os.chdir(r"C:\Users\decid\.claude-spt\accounts\alt\projects\C--Users-decid-Documents-projects-spt-core\memory")
P = 'a-zero-from-an-absence-grep-is-a-spelling-claim.md'
orig = io.open(P, 'rb').read()
n = len(orig)
assert orig.count(b'\r') == 0, 'expected LF'

add = """
## \u2b50\u2b50 THE REMEDY, and it is cheaper than the discipline it replaces (doyle, 2026-09-10)

**EVERY ABSENCE-PROBE CARRIES A CONTROL THAT MUST RETURN NON-ZERO, AND YOU READ THE CONTROL BEFORE
YOU READ THE ANSWER.** Two instances the same morning, from opposite directions, neither caught by
being careful:

- **doyle, IR-95 census.** First run returned ZERO for every class *including the file count*.
  Cause: `rg` was not on PATH and the command carried `2>/dev/null`. **A missing binary read as an
  empty population.** Caught by the file-count control, which cost nothing to add. Second defect in
  the same census: a detector keyed on expiry VOCABULARY ("never", "timed out") found 53 sites and
  MISSED the very site the entry was filed from, because that site's panic message is a CONTENT
  sentence. A wording-keyed census is structurally blind to exactly the sites whose messages
  mislead \u2014 its positive control (both originating sites present and BLIND) is what exposed it.
- **mine, pool-claim probe.** I checked a GUESSED filename (`.spt-pool-claim`), got "no claim file"
  on all four worktrees, and nearly sent a peer a fabricated alarm that his rig was unclaimed
  mid-experiment. The real record is `POOL-OWNER.json`. Caught ONLY because he had told me he
  claimed both pools and my result contradicted him \u2014 **a peer contradiction, which is luck, not
  method.**

\u26a0 **MINE IS THE WORSE ONE TO HAVE CAUGHT** (doyle's framing, and he is right): a wrong PATH looks
exactly like a correct probe of an empty place. A missing binary at least breaks several classes at
once and so announces itself. A wrong path returns a clean, plausible, *specific* zero.

**How to apply:** before believing any zero \u2014 grep, census, file probe, API filter \u2014 run the same
instrument against something that MUST be present, and read that first. A probe that cannot produce
a non-zero on a known-present case has not been shown to work, so its zero is not a measurement.
Related: [[occupancy-is-not-contention]] \u00b7 [[an-endorsement-is-a-claim]] \u00b7
[[a-retraction-does-not-propagate-to-the-adjacent-claim]].
"""

new = orig + add.encode('utf-8')
assert new[:n] == orig
io.open(P, 'wb').write(new)
b = io.open(P, 'rb').read()
print('bytes', n, '->', len(b), 'CR', b.count(b'\r'), 'prefix-identical', b[:n] == orig)
