fix(memory): Initialize GoalExecutor with username and validate Qdrant deletes (Strict TDD) #2

Open
mmintel wants to merge 0 commits from fix-memory-tdd into main
Owner

This PR addresses the "memory poisoning paradox" during blank_start, strictly following TDD (Red -> Green -> Refactor).

TDD Execution

  1. Red Phase: Wrote two unit tests:
    • test_delete_point_logging.py: Proved that qdrant_memory.py unconditionally logs fake deletion successes even when vectors didn't exist.
    • test_bot_flow_singleton.py: Proved the initialization leak where QNavGraph instantiated GoalExecutor without a username, causing PathMemory to latch onto goap_paths_v1 instead of the user-specific collection.
  2. Green Phase:
    • bot_flow.py: Pre-initialized GoalExecutor.get_instance(device, username) to lock in the correct username.
    • qdrant_memory.py: Added client.retrieve() validation inside delete_point before running .delete().

All tests pass perfectly.

This PR addresses the "memory poisoning paradox" during `blank_start`, strictly following TDD (Red -> Green -> Refactor). ### TDD Execution 1. **Red Phase**: Wrote two unit tests: - `test_delete_point_logging.py`: Proved that `qdrant_memory.py` unconditionally logs fake deletion successes even when vectors didn't exist. - `test_bot_flow_singleton.py`: Proved the initialization leak where `QNavGraph` instantiated `GoalExecutor` without a username, causing `PathMemory` to latch onto `goap_paths_v1` instead of the user-specific collection. 2. **Green Phase**: - `bot_flow.py`: Pre-initialized `GoalExecutor.get_instance(device, username)` to lock in the correct username. - `qdrant_memory.py`: Added `client.retrieve()` validation inside `delete_point` before running `.delete()`. All tests pass perfectly.
mmintel added 1 commit 2026-04-25 20:29:03 +00:00
mmintel added 1 commit 2026-04-25 20:35:51 +00:00
Checking for merge conflicts…
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix-memory-tdd:fix-memory-tdd
git checkout fix-memory-tdd
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmintel/instagram-bot#2