import io, os
os.chdir(r"C:\Users\decid\.claude-spt\accounts\alt\projects\C--Users-decid-Documents-projects-spt-core\memory")
P = 'JUDGEMENT-INDEX.md'
orig = io.open(P, 'rb').read()
n = len(orig)
assert orig.count(b'\r') == 0, 'expected LF file'

lines = [
 "- [a retraction does not propagate to the adjacent claim](a-retraction-does-not-propagate-to-the-adjacent-claim.md) "
 "\u2b50\u2b50 2026-09-10 golden 34445961595, TWICE in 40 min: I withdrew the wall-time/internal-margin conflation and re-committed it "
 "forty lines later under the heading \"what actually survives\"; doyle re-committed it NINE lines after quoting my retraction while "
 "correcting me for it. Re-DERIVE adjacent claims from the raw numbers; re-reading cannot catch it.",

 "- [an endorsement is a claim](an-endorsement-is-a-claim.md) \u2b50\u2b50 2026-09-10: I called doyle's causal over-read "
 "\"source-derived, so it does not inherit any of my measurement problems\" \u2014 certifying the absence of a defect class I never "
 "checked for, giving one unchecked claim TWO agents' weight. Split a peer's MEASURED half from the INFERRED half; endorse only the first.",

 "- [whole-test wall time is not an internal budget margin](whole-test-wall-time-is-not-an-internal-budget-margin.md) \u2b50\u2b50 "
 "3 faces 2026-09-10: setup/teardown sit OUTSIDE the window (34.908s vs a 30s poll says nothing); a FAIL TRUNCATES the path so "
 "pass/fail totals are incomparable (58.77 vs 61.304 carries nothing); spread is still whole-test. HARD LIMIT: nextest hides PASSING "
 "output and neither budget prints a clock on expiry, so margins are unrecoverable from history \u2014 instrument, with --success-output immediate.",

 "- [occupancy is not contention](occupancy-is-not-contention.md) \u2b50 todlando's catch, measured 2026-09-10: 27 foreign procs -> "
 "501.778s phase vs 17 foreign -> 955.716s. MORE residents on the FASTER run; counts are CONDITIONS to reproduce, never a load "
 "explanation. The 2x slowdown itself stays real and unexplained \u2014 a retracted cause does not take its observation with it.",
]

add = ("\n".join(lines) + "\n").encode('utf-8')
new = orig + (b'' if orig.endswith(b'\n') else b'\n') + add
assert new[:n] == orig, 'prefix changed'
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)
for ln in lines:
    assert ln.encode('utf-8') in b, 'missing: ' + ln[:60]
print('all 4 index lines re-found verbatim')
