import sys, pathlib, re sys.path.insert(0, 'scripts') from check_dormant_triggers import load_registry, check_entry entries = load_registry() imp16 = next(e for e in entries if e['issue'] == 16) imp18 = next(e for e in entries if e['issue'] == 18) # IMP-16: phantom src path (no file content) -> no match r = check_entry(imp16, ['src/imaginary_module.py']) print('imp16 vs phantom src file:', r) # IMP-18: scan family templates for one that contains issue:', r['issue'], 'files:', r['match']['files']) else: print('imp18 did not fire') else: print('no svg-bearing family found; testing with synthetic match against frames/') frm_dir = pathlib.Path('templates/phase_z2/frames') for p in frm_dir.glob('*.html'): txt = p.read_text(encoding='utf-8', errors='replace') if re.search(r'', 'issue:', r and r['issue']) break