fix(memory): Initialize GoalExecutor singleton with username and validate Qdrant deletes #1

Closed
mmintel wants to merge 1 commits from fix-autonomous-memory-purge into main
2 changed files with 10 additions and 5 deletions

View File

@@ -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)

View File

@@ -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}")