fix(openclaw): resolve tracking compaction hang, restrict tracking tools and enforce lifecycle management

This commit is contained in:
Moritz Graf
2026-10-14 13:39:38 +02:00
parent cab8dd290f
commit a0c8c3828c
3 changed files with 21 additions and 1 deletions
Binary file not shown.
+18
View File
@@ -22,6 +22,8 @@ TOPIC_TO_AGENT = {
"118": "doktor",
"119": "itguy",
"164": "grabengasse_media",
"2796": "mila_tracker",
"2797": "nutrition_tracker",
}
def parse_args():
@@ -90,6 +92,22 @@ def triage_agent_session(agent, topic_id=None, limit=10, db_root="/home/node/.op
elif status == "processing":
badges.append("⚡ [ACTIVE_PROCESSING]")
# Check ingress queue status
state_db = "/home/node/.openclaw/state/openclaw.sqlite"
if topic_id and os.path.exists(state_db):
try:
s_con = sqlite3.connect(state_db, timeout=2.0)
lane_pat = f"%topic:{topic_id}%"
pending_cnt = s_con.execute(
"SELECT count(*) FROM channel_ingress_events WHERE lane_key LIKE ? AND status IN ('pending', 'claimed')",
(lane_pat,)
).fetchone()[0]
s_con.close()
if pending_cnt > 0:
badges.append(f"📬 [INGRESS_STALLED: {pending_cnt} message(s) pending]")
except Exception:
pass
print("=" * 72)
print(f"🎯 AGENT: {agent.upper():<12} | TOPIC: {topic_id or 'N/A':<6} | STATUS: {status.upper()}")
print(f" SESSION KEY: {skey}")
+3 -1
View File
@@ -51,12 +51,14 @@ THRESHOLD_EVENT_COUNT = 30
CRON_MAX_AGE_HOURS = 48
RPC_TIMEOUT_MS = 180000
# Tier A: High-frequency interaction topics (koch, hebamme, shopping).
# Tier A: High-frequency interaction and tracking topics (koch, hebamme, shopping, mila_tracker, nutrition_tracker).
# Deep-compaction keeps a compact summary + latest 2 turns without completely wiping conversational memory.
TIER_A_TARGETS = [
("koch", "agent:koch:telegram:group:-1004326921510:topic:21"),
("hebamme", "agent:hebamme:telegram:group:-1004326921510:topic:22"),
("shopping", "agent:shopping:telegram:group:-1004326921510:topic:115"),
("mila_tracker", "agent:mila_tracker:telegram:group:-1004326921510:topic:2796"),
("nutrition_tracker", "agent:nutrition_tracker:telegram:group:-1004326921510:topic:2797"),
]
def prewarm_page_cache():