from pathlib import Path import csv p = Path('output/handoff.md') s = p.read_text() s = s.replace('No export was made. (inputs/archive.md, TICKET-223.)', 'The record does not establish whether any export occurred; this investigation made none. (inputs/archive.md, TICKET-223.)') s = s.replace('Staging build a17: CSV passed 12 positive and 4 invalid-format tests;', 'Staging build a17: CSV passed 12 positive and 4 invalid-format tests (16 total on a17);') s = s.replace('This closes the earlier duplicate-test gap, not all acceptance.', 'This addresses the duplicate-test gap on a19, not all acceptance or later builds.') s = s.replace('Email alerts failed 2 of 5, but alerts are now excluded by CR-12.', 'Email alerts failed 2 of 5, but are now excluded (inputs/approved-changes.md, CR-12).') s = s.replace('In parallel, arrange an explicitly named trained backup for the reserved morning slot, or use Theo at a later confirmed time;', 'In parallel, arrange an explicitly named trained backup for the reserved morning slot, or confirm a later slot and Theo’s availability;') s = s.replace('requirements.csv uses local tracking IDs; unspecified owners remain explicitly unresolved.', 'requirements.csv uses local tracking IDs and distinguishes approved gates, evidence tracking and routine expectations. Reporter attribution is not a new ownership assignment. Unspecified owners remain unresolved.') p.write_text(s) p = Path('output/requirements.csv') with p.open(newline='') as f: reader = csv.DictReader(f) fields = reader.fieldnames rows = list(reader) byid = {r['id']: r for r in rows} byid['AW-05']['status'] = 'Evidence tracking, not a separately approved test-count gate: a17 passed 12 positive and 4 invalid-format tests (16 total); a19 regression 12/12; a19 invalid-format rerun not separately evidenced' byid['AW-06']['status'] = 'Evidence tracking: a17 passed 8 tests; a19 regression passed 8/8; keyboard-path failure remains separate blocker' byid['AW-07']['status'] = 'Evidence tracking: earlier untested gap addressed on a19 by 3/3 passing; no later-build evidence supplied' byid['AW-11']['status'] = 'Blocked; plan absent from archive; attach before deployment as conservative sequencing; exact meaning of first is not further specified' byid['AW-14']['current_requirement'] = 'Track support-runbook readiness for revised scope (readiness item; no separate approval gate specified)' byid['AW-14']['owner'] = 'Nora (readiness reporter only); maintenance owner unspecified' byid['AW-15']['owner'] = 'Maya (approved scope); Mobile and copy workstream owners unspecified' with p.open('w', newline='') as f: writer = csv.DictWriter(f, fieldnames=fields) writer.writeheader() writer.writerows(rows) print('Revised handoff and 16-row CSV; original snapshot untouched.')