fix(search): escape SQL LIKE wildcard characters in memory search - #30
Conversation
Agent PR reviewValidationValidation passed: SummaryThis PR updates memory free-text search to escape SQL Issues and risks
Test coverageThe PR adds unit coverage for literal Important missing coverage: tag-side RecommendationNeeds changes before merge. This is an automated review. Please treat it as advisory; human review is still required. |
Update summary
Resolved in commit Testing
|
…agent/issue-26-run-28680237657
Related Links
Summary
This PR attempts to satisfy the linked issue while keeping the change scope limited to the issue requirements. Escaped SQL
LIKEwildcard characters in free-text memory search soqtreats%,_, and backslash literally while preserving case-insensitive substring matching.Files changed
app/storage.py- added LIKE-pattern escaping andESCAPE '\'clauses forqfilters.tests/unit/test_storage.py- added regression coverage for literal_,%, and backslash search terms.README.md- documented literal wildcard behavior.docs/data_object_schema.md- updated retrieval contract wording.Validation
pytest tests/unit/test_storage.py- passed, 12 tests.ruff check app/storage.py tests/unit/test_storage.py- passed.ruff format --check app/storage.py tests/unit/test_storage.py- passed.pytest tests/integration/test_memories_list.py; it hung before producing a first test result and was interrupted after about 90 seconds.Risks
Low risk. The change is isolated to shared retrieval filtering. Existing behavior changes only for search strings containing SQL LIKE wildcard or escape characters.
Follow-up
Before merging, run the full CI suite or at least re-run the integration list tests in an environment where they complete normally.
Test Steps
ruff format --check .,ruff check ., andpytestOther Notes
This draft PR was created automatically. Human review is required before marking it ready for review or merging.