Quality System Test Infrastructure Fixes
This patch release resolves critical test failures in the Memory Quality System introduced in v8.45.0. All 27 functional tests now passing with proper async/await handling and correct API routing.
Fixed
-
HTTP API Router Configuration - Fixed missing
/api/qualityprefix causing 404 errors on all quality endpoints- Root cause: app.py included quality router without the
/api/qualityprefix - Impact: All quality API endpoints were inaccessible via HTTP
- Resolution: Added proper prefix to router inclusion in app.py:270
- Root cause: app.py included quality router without the
-
Quality Distribution MCP Tool - Corrected storage method call in quality distribution handler
- Root cause: Used non-existent
search_all_memories()instead ofget_all_memories() - Impact: MCP tool
analyze_quality_distributioncrashed with AttributeError - Resolution: Updated server.py:4338 to use correct storage method
- Root cause: Used non-existent
-
HTTP API Tests - Replaced synchronous TestClient with async httpx.AsyncClient
- Root cause: FastAPI TestClient not thread-safe with SQLite in async context
- Impact: SQLite "objects created in a thread can only be used in that same thread" errors
- Resolution: Migrated all HTTP tests to use httpx.AsyncClient with proper dependency overrides
-
Distribution Endpoint Logic - Fixed storage retrieval and Memory object handling
- Root cause: Incorrect storage method calls and unnecessary dict conversions
- Impact: Quality distribution endpoint returned malformed data
- Resolution: Simplified logic in quality.py:223-253 to use direct storage methods
Added
- Dependencies - Added
pytest-benchmarkfor performance testing support - Dependencies - Added
onnxruntimeas optional dependency for ONNX model support
Testing
- ✅ All 27 functional tests passing
- ⏭️ ONNX tests properly skip when model unavailable (expected behavior)
- ⚠️ Zero errors in test suite
Upgrade Notes
No breaking changes. This is a drop-in replacement for v8.45.0. All quality system features from v8.45.0 remain fully functional.
Installation
# Upgrade existing installation
pip install --upgrade mcp-memory-service
# Or with uv
uv pip install --upgrade mcp-memory-serviceRelated Issues
Fixes test failures introduced in #260 (Memory Quality System)
Full Changelog: v8.45.0...v8.45.1