Archived
Checker: all five CLEAN. 393 cases now carry a verified summary and a scenario sequence. Owner decisions recorded for batch 02 cases 211, 210, 208, 207, 206, 205 (batches/decide.py, corrections-approved.md); new attribute proposed: prior acquaintance / insider. Report and export rebuilt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZZENdTLzNGsbNy4DyF1yt
23 lines
1.2 KiB
Python
23 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Record the owner's decision on one verified case.
|
|
Usage: decide.py <batch> <id> "<decision text>"
|
|
Appends a bullet under '## Batch NN decisions — owner, <date>' in corrections-approved.md
|
|
(creating the section if needed) and stamps the case in batches/batch-NN.json."""
|
|
import json, sys, datetime, re
|
|
from pathlib import Path
|
|
bn, cid, text = int(sys.argv[1]), int(sys.argv[2]), sys.argv[3].strip()
|
|
today = datetime.date.today().isoformat()
|
|
p = Path('corrections-approved.md'); s = p.read_text(encoding='utf-8')
|
|
head = f"## Batch {bn:02d} decisions — owner, "
|
|
if head not in s:
|
|
s = s.rstrip('\n') + f"\n\n---\n\n{head}{today}\n\nTaken case by case from `batches/contradictions-{bn:02d}.md`; evidence in `batches/batch-{bn:02d}.json`.\n"
|
|
s = s.rstrip('\n') + f"\n- **DB id {cid}** — {text}\n"
|
|
p.write_text(s, encoding='utf-8')
|
|
bp = Path(f'batches/batch-{bn:02d}.json'); b = json.loads(bp.read_text(encoding='utf-8'))
|
|
for c in b:
|
|
if c['id'] == cid:
|
|
c['notes_for_sofia'] = (c.get('notes_for_sofia') or '').rstrip() + f" DECIDED {today}: {text}"
|
|
c['checked'] = f"{today} owner decision recorded"
|
|
bp.write_text(json.dumps(b, ensure_ascii=False, indent=1), encoding='utf-8')
|
|
print(f"recorded: batch {bn:02d} case {cid}")
|