PR #113 merged the async streaming, RRF multi-query, and SQLite caching upgrade. However, the current implementation still uses a numeric tiebreaker (score + 0.001 * best_score) in the RRF ranking, and the async test mocks to_thread instead of proving true concurrent execution.
-
CODE LOCATION:
misakanet/tools/langchain_tool.pyandtests/test_langchain_tool.py -
RRF TIEBREAKER REFACTOR: Replace the numeric
score + 0.001 * best_scorehack with a clean multi-level tuple sort key:(-rrf_score, best_rank, filename). -
TRUE ASYNC CONCURRENCY TEST: Replace the mocked
test_arunwith a real concurrent test usingasyncio.gather+time.perf_counterthat runs two slow queries (0.2s each) and asserts total elapsed time < 0.35s to prove non-blocking execution. -
COMPATIBILITY: All 11 existing tests (8 original + 3 new) must pass. Run
pytest tests/to confirm.