import json, glob
base = "/tmp/claude-1000/-var-www-html-peta/310517d2-8f28-442b-9907-0e3560add2cb/scratchpad/"
exec(open(base + "r2b03_build.py").read().split("cases = [")[0])
inp = "/var/www/html/peta/storage/app/propertylab-catalogue-match/review/r2_batch_03_in.jsonl"
for l in open(inp):
    c = json.loads(l); v = dec[c["case"]]
    cn = ""
    if v["cand"] is not None:
        cc = [x for x in c["catalogue_candidates"] if x["k"] == v["cand"]][0]
        cn = f"{cc['name']} ({cc.get('area')})"
    print(f"{c['case']} {v['verdict']:9} {v['confidence']:6} {'W' if v['web'] else ' '} R={c['realtycheck']['name'][:45]:45} -> {cn[:55]}")
