From 1b21888e8bae3e77377d43d5984821c7c9cdaeba Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 25 Aug 2026 23:29:39 +0300 Subject: [PATCH] Observe chat context route decisions --- cmd/core-runtime/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/core-runtime/main.go b/cmd/core-runtime/main.go index 96247e9..a6a7cb1 100644 --- a/cmd/core-runtime/main.go +++ b/cmd/core-runtime/main.go @@ -534,6 +534,10 @@ func main() { } conversationHistory = append(conversationHistory, recentUserHistory...) personalMemory := interactiondomain.CompilePersonalMemory(conversationHistory) + // Context selection must stay observable without logging the user's + // message or personal fact values. These flags let an operator distinguish + // a missing derived fact from a later routing or clarification decision. + personalMemoryHasCurrentLocation := personalMemory.CurrentLocation() != "" if !creativeUserRequest && locationReply == "" { if continuation := interactiondomain.ContinueLocalSearch(effectiveTaskMessage, conversationHistory); continuation != "" { continuationMessage = continuation @@ -650,6 +654,7 @@ func main() { deterministicSpeechAct := semantic.Interpretation.SpeechAct deterministicReply := semantic.Reply routePlan := buildChatRoutePlan(semantic) + log.Printf("chat context state: current_location=%t research_route=%t clarification=%s", personalMemoryHasCurrentLocation, hasChatRoute(routePlan, chatRouteResearch), semantic.Interpretation.Clarification) cognitiveAttempted := false cognitiveAvailable := true semanticInterpretationRequested := shouldRequestSemanticInterpretation(semantic) -- 2.54.0