Files
MoFin/archive/20260722-scripts-cleanup/test_key7_guard.py
T

12 lines
534 B
Python

import sys, json
sys.path.insert(0, '/home/hmo/MoFin')
import importlib, xmpp_logger
importlib.reload(xmpp_logger)
x = xmpp_logger
print("current provider:", x.current_provider())
print("KEY_TO_PROVIDER keys:", list(x.KEY_TO_PROVIDER.keys()))
bk = x.best_key()
print("best_key:", bk["key_id"] if bk else None, "| total_keys:", bk.get("total_keys") if bk else "-")
# Simulate: if best key were key7 (kimi), auto_heal must skip switch
result = x.auto_heal()
print("auto_heal actions:", json.dumps(result["actions"], ensure_ascii=False))