import re
src = open("/home/kiro/.hermes/scripts/x-account-monitor-run.py").read()
head = src.split("# --- build handle list from watchlist ---")[0]
ns = {}
exec(head, ns)
txt = open(ns["WATCHLIST"]).read()
found = re.findall(r"@(\w+)", txt)
handles, seen = [], set()
for h in ns["CORE"] + found:
    key = h.lower()
    if key in ns["SKIP"] or h in ns["DEAD"] or h in ns["DORMANT"] or key in seen:
        continue
    seen.add(key)
    handles.append(h)
print("handle count:", len(handles))
print(handles)
core = set(ns["CORE"])
print("CORE and IRRELEVANT overlap:", sorted(core.intersection(ns["IRRELEVANT"])))
print("NON_CORE and IRRELEVANT overlap:", sorted(ns["NON_CORE"].intersection(ns["IRRELEVANT"])))
print("NON_CORE and CORE overlap:", sorted(ns["NON_CORE"].intersection(core)))
print("DORMANT still in handles:", sorted(set(handles).intersection(ns["DORMANT"])))
print("heyglif present:", "heyglif" in handles)
print("dropped vs yesterday(62):", 62 - len(handles))
