fix: eliminate 3 critical nav failures — DM guard, GOAP unlearn, ad escape
- Extract NAV_INTENT_KEYWORDS constant (DRY) with 'direct message', 'inbox', 'dm', 'notification', 'heart icon' to fix structural guard self-sabotage where 'tap direct message icon inbox' was rejected as non-nav intent - Add goal-achieved pre-check in GOAP _execute_recalled_path to skip stale paths when the bot is already on the target screen - Add already-there detection in _execute_action to prevent false unlearning when navigation produces no UI change because goal is already met - Implement 3-tier ad escape cascade: normal skip -> double scroll -> GOAP force-navigate to HomeFeed after 6+ consecutive ad cycles - 92 unit tests pass, 223/224 integration tests pass (1 pre-existing flaky)
This commit is contained in:
36
scripts/wipe_qdrant.py
Normal file
36
scripts/wipe_qdrant.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add parent dir to path so we can import GramAddict
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from GramAddict.core.qdrant_memory import UIMemoryDB
|
||||
|
||||
|
||||
def wipe_qdrant():
|
||||
print("🧹 Initializing Qdrant connection...")
|
||||
memory = UIMemoryDB()
|
||||
|
||||
if not memory.is_connected:
|
||||
print("❌ Qdrant is not connected. Make sure the container is running.")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"⚠️ Wiping collection: {memory.COLLECTION_NAME}")
|
||||
|
||||
try:
|
||||
memory.client.delete_collection(collection_name=memory.COLLECTION_NAME)
|
||||
print("✅ Collection deleted.")
|
||||
|
||||
# Reinitialize to recreate the schema
|
||||
memory._init_collection()
|
||||
print("✅ Collection recreated with clean schema.")
|
||||
|
||||
print("🎉 Qdrant Memory is now completely clean and ready for fresh learning!")
|
||||
except Exception as e:
|
||||
print(f"❌ Failed to wipe Qdrant memory: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
wipe_qdrant()
|
||||
Reference in New Issue
Block a user