Commit Graph

2 Commits

Author SHA1 Message Date
Jonny 8a7ac5aad6 fix: add explanatory comments for psycopg2 mocking in test_memory.py
Document why psycopg2 mocking is necessary in local test environment:
- psycopg2-binary cannot be installed on Python 3.14 (no Wheel)
- main.py imports psycopg2 at module level
- pg_pool only used at runtime, not during import, so mocking is safe
- Docker test environment (JARVIS_HANDOFF.md) has psycopg2-binary available

Also ensures test_memory.py matches pattern of other test files
while explaining the necessary deviation for local test execution.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 14:35:05 +02:00
Jonny 18e2ff87d2 feat: add memory_facts DB helpers
Implement four async DB-helper functions for memory_facts table:
- insert_memory_fact(user_id, content) -> int
- search_memory_facts(query) -> list
- delete_memory_fact(fact_id) -> None
- get_all_memory_facts() -> list

Add test_memory.py with 4 passing tests for these helpers.
All tests pass with mocked db_query.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iZMEPk2Kt1UC96Lo9bC5w
2026-09-13 12:10:23 +02:00