p = 'docs/INFRA-REGISTER.md'
raw = open(p, 'rb').read()
crlf = b'\r\n' in raw
s = raw.decode('utf-8').replace('\r\n', '\n')


def rep(a, b):
    global s
    assert s.count(a) == 1, (s.count(a), a[:80])
    s = s.replace(a, b)


rep("**STILL UNEXERCISED after eight field reaps (2026-09-24, samples below).**",
    "**STILL UNEXERCISED after nine field reaps (2026-09-24, samples below).**")
rep("      - FORCED (the population behind the zero was captured and non-empty): 6. doyle's gate pools, hertz's Tier 2, todlando's W5 (a labelled transcription, see sample 4), hertz's 185a rig, hertz's W7 rig, todlando's W6.",
    "      - FORCED (the population behind the zero was captured and non-empty): 7. doyle's gate pools, hertz's Tier 2, todlando's W5 (a labelled transcription, see sample 4), hertz's 185a rig, hertz's W7 rig, todlando's W6, hertz's W7 order check.")
rep("      Eight samples of the ZERO arm are not evidence",
    "      Nine samples of the ZERO arm are not evidence")
anchor = "  - **What the second and third samples do to the 0.98 % residual.**"
s9 = """  - **Ninth field sample (hertz, W7 order-check worktree, kitsubito ext4, 2026-09-24 19:10Z).** Record: `.spt/preserved/331/hertz/w7-336-rig/rig-reap-order-ir150.log`.
    - The write census ran as a SEPARATE call, read before the reap was launched (sample 7's procedural finding, applied): 0 writers, load 3.80. The in-script census then read 0 writers before, during and after.
    - Pass band PRE-REGISTERED ±0.1 %. Sizes: apparent 7,319,790,114; allocated 7,352,229,888; escaped 0, FORCED (202 files at nlink = 2, max 2).
    - Reclaim 7,352,229,888 against expected 7,352,229,888: **gap 0 B**.
"""
rep(anchor, s9 + anchor)
rep("  - **Samples 4–8 do not move it either.** On a quiet volume the gap stayed inside ±0.1 % (samples 5 and 6; sample 8 at 0.046 % had no pre-registered band).",
    "  - **Samples 4–9 do not move it either.** On a quiet volume the gap stayed inside ±0.1 % (samples 5, 6 and 9; sample 8 at 0.046 % had no pre-registered band).")
out = s.replace('\n', '\r\n') if crlf else s
open(p, 'wb').write(out.encode('utf-8'))
print('ok crlf', crlf)
