This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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 <svg or viewBox
|
||||
fam_dir = pathlib.Path('templates/phase_z2/families')
|
||||
hits = []
|
||||
for p in fam_dir.glob('*.html'):
|
||||
txt = p.read_text(encoding='utf-8', errors='replace')
|
||||
if re.search(r'<svg', txt) or re.search(r'viewBox', txt):
|
||||
hits.append(str(p).replace('\\', '/'))
|
||||
break
|
||||
print('sample svg-bearing family path:', hits[:1])
|
||||
if hits:
|
||||
r = check_entry(imp18, [hits[0]])
|
||||
if r:
|
||||
print('imp18 fired -> 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'<svg', txt) or re.search(r'viewBox', txt):
|
||||
r = check_entry(imp18, [str(p).replace('\\', '/')])
|
||||
print('imp18 vs frame', p.name, '->', 'issue:', r and r['issue'])
|
||||
break
|
||||
Reference in New Issue
Block a user