From b7b8ce9558039925262c1804471dde8fa1d48ab8 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sat, 25 Apr 2026 22:14:13 +0200 Subject: [PATCH] fix(memory): Initialize GoalExecutor singleton with username and validate Qdrant deletes --- GramAddict/core/bot_flow.py | 3 +++ GramAddict/core/qdrant_memory.py | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/GramAddict/core/bot_flow.py b/GramAddict/core/bot_flow.py index bc9d6d2..b82d81c 100644 --- a/GramAddict/core/bot_flow.py +++ b/GramAddict/core/bot_flow.py @@ -184,6 +184,9 @@ def start_bot(**kwargs): active_inference = ActiveInferenceEngine(username) # Core Autonomous Engines + from GramAddict.core.goap import GoalExecutor + + GoalExecutor.get_instance(device, username) zero_engine = ZeroLatencyEngine(device) nav_graph = QNavGraph(device) growth_brain = GrowthBrain(username, persona_interests=persona_interests) diff --git a/GramAddict/core/qdrant_memory.py b/GramAddict/core/qdrant_memory.py index fd7f734..f002b05 100644 --- a/GramAddict/core/qdrant_memory.py +++ b/GramAddict/core/qdrant_memory.py @@ -205,11 +205,13 @@ class QdrantBase: point_id = self.generate_uuid(seed_string) try: - self.client.delete(collection_name=self.collection_name, points_selector=[point_id]) - logger.info( - f"🗑️ [Qdrant] Purged poisoned memory vector from {self.collection_name} (UUID: {point_id[:8]}...)", - extra={"color": "\x1b[31m"}, - ) + res = self.client.retrieve(collection_name=self.collection_name, ids=[point_id]) + if res: + self.client.delete(collection_name=self.collection_name, points_selector=[point_id]) + logger.info( + f"🗑️ [Qdrant] Purged poisoned memory vector from {self.collection_name} (UUID: {point_id[:8]}...)", + extra={"color": "\x1b[31m"}, + ) return True except Exception as e: self._handle_error(e, f"Failed to delete point {point_id}") -- 2.49.1