import json
import subprocess
r = subprocess.run(['uv', 'run', 'python', 'scripts/audit_exception_handling.py', '--json'], capture_output=True, text=True)
data = json.loads(r.stdout)
app = [f for f in data['files'] if 'app_controller' in f.get('filename', '')][0]
findings = app['findings']
broad = [f for f in findings if f.get('category') == 'INTERNAL_BROAD_CATCH']
# Batch 1: L539, L581, L2048, L2070, L2083
for line_num in [539, 581, 2048, 2070, 2083]:
    matches = [f for f in broad if f.get('line') == line_num]
    if matches:
        f = matches[0]
        ctx = f.get('context', '')
        print(f'=== L{line_num} (category: {f.get("category", "")}, kind: {f.get("kind", "")}) ===')
        print(f'  context: {ctx[:300]}')
        print()
