v4.3.1 — Hybrid Search Fixes
PATCH release: hybrid search bug fixes from external contributor @Hohlas, anti-regression tests pinning the contracts, and a CI unblocker.
Fixed
search_knowledge(category="general")no longer rejected on custom configs. The parser hardcodes"general"as the fallback iningestion.py:_detect_category, but the validator only accepted what was inconfig.keyword_routes+config.category_mappings.values(). Users who customizedconfig.yamland dropped the default"general": "general"mapping hitInvalid categoryeven though the index containedgeneraldocuments. Validator now always tolerates"general". (#98)- Stale BM25 chunk IDs no longer leak empty results. When BM25 returned a chunk_id that Chroma could no longer resolve (right after
remove_document, or in the window between async reindex and BM25 rebuild), the previous fallback injected a record with emptydocument/metadatainto the reranker. Pipeline nowcontinues past stale IDs cleanly. (#98)
Internal
- 4 anti-regression tests pin both contracts (
tests/test_pr98_regression.py). Test count baseline: 227 → 231. (#99) [tool.mypy] python_versionbumped 3.11 → 3.12 to accept PEP 695typesyntax in the numpy stub. Static-analysis only; runtime support still>=3.11. (#100)
Compatibility
- 13 MCP tools frozen — all parameter signatures identical to v4.3.0
- No breaking changes (verified by
check_api_surface.py) - Atomic version sync across
pyproject.toml,mcp_server/__init__.py,npm/package.json
Install
```bash
pip install knowledge-rag==4.3.1
or
npx -y knowledge-rag@4.3.1
or
docker pull ghcr.io/lyonzin/knowledge-rag:4.3.1
```
Thanks to @Hohlas for the contribution.