"""Accept exactly the listed cases (ones Claude has reviewed): records the reviewed decision + uuid only."""
import json, os, glob, sys
F = 'review/_none_adjudication.json'; adj = json.load(open(F)) if os.path.exists(F) else {}
want = set(sys.argv[1:]); V = {}
for f in glob.glob('review/n_*_out.jsonl'):
    for l in open(f):
        if l.strip():
            v = json.loads(l)
            if v['case'] in want: V[v['case']] = v
for c, v in V.items():
    if c not in adj:
        adj[c] = {'reviewed': {'decision': v['decision'], 'uuid': v.get('uuid')}, 'adjudication': 'accepted'}
json.dump(adj, open(F, 'w'), indent=1, ensure_ascii=False); print('accepted', len(V), '| missing', sorted(want - set(V)), '| total', len(adj))
