From 4a67afead39a18bc940d463fb701507370ac09a9 Mon Sep 17 00:00:00 2001 From: Priyanka Punukollu Date: Thu, 26 Feb 2026 23:08:21 -0600 Subject: [PATCH] debug: add stdout print logs to classify_node for Railway visibility Made-with: Cursor --- agent/graph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/graph.py b/agent/graph.py index 7e477aeb5..1472def9d 100644 --- a/agent/graph.py +++ b/agent/graph.py @@ -428,6 +428,7 @@ async def classify_node(state: AgentState) -> AgentState: _log_path = "/Users/priyankapunukollu/Repos/AgentForge - Project 2 (W2)/.cursor/debug-91957c.log" _phrase_matched = any(phrase in query for phrase in followup_trigger_phrases) _broad_matched = has_history and any(phrase in query for phrase in _broad_followup_phrases) + print(f"[DEBUG:classify] query={query[:80]!r} has_history={has_history} history_len={len(state.get('messages', []))} old_matched={_phrase_matched} broad_matched={_broad_matched}", flush=True) try: with open(_log_path, "a") as _lf: _lf.write(_json_log.dumps({ @@ -448,6 +449,7 @@ async def classify_node(state: AgentState) -> AgentState: # #endregion if has_history and (_phrase_matched or _broad_matched): + print(f"[DEBUG:classify] → context_followup (early return)", flush=True) return {**state, "query_type": "context_followup"} # --- Full position analysis — "everything about X" or "full analysis of X position" --- @@ -740,6 +742,7 @@ async def classify_node(state: AgentState) -> AgentState: # #region agent log import json as _json_log2, time as _time_log2 _log_path2 = "/Users/priyankapunukollu/Repos/AgentForge - Project 2 (W2)/.cursor/debug-91957c.log" + print(f"[DEBUG:classify] → final query_type={query_type!r} query={query[:80]!r}", flush=True) try: with open(_log_path2, "a") as _lf2: _lf2.write(_json_log2.dumps({