fix(search): keep session logs out of retrieval - #3018
Conversation
|
@r266-tech @qin-ctx 我按当前
建议下一版只保留一个窄修复:把“内部 session transcript 不可召回”做成可复用 URI/索引策略,在当前主干的 quick/global/children 查询结果上过滤历史向量,并按需分页补足 请按这个方向 rebase/refine;更新后我会继续在本 PR 上复核。 |
77d6396 to
15c994c
Compare
|
已按这个方向基于当前
本地已通过 Ruff、 |
huangruiteng
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 15c994c967b0202de0936f7ab1a8ace3d7a2c0b2 against current main@09cd4782df3c8a443c3785eebb7fbd7365628eed. The rework is now conflict-free and preserves the current async rerank, image candidate, and rerank-token-budget paths. The bounded URI classification, request-wide replacement-page budget, child offset propagation, and QueryResult.truncated plumbing are coherent. Two test-compatibility fixes are still required before approval:
- The new child paging path always passes
offset=. The existingDummyStorage/QuickSearchStorage/DirectChildProxytest doubles intests/retrieve/test_hierarchical_retriever_rerank.pydo not accept that keyword, so three existing tests now fail withTypeError. These same three nodes pass 3/3 on exact currentmain. Please add an optionaloffset: int = 0to the affected doubles (they may discard it). test_filtered_search_reports_scan_capfails on this exact head because the project logger writes the warning but does not propagate it intocaplog; the assertion sees an empty capture. Please assert through a patchedretriever_module.logger.warning(or another logger-compatible capture) instead.
The exact failing nodes are:
tests/storage/test_hierarchical_retriever_session_logs.py::test_filtered_search_reports_scan_captests/retrieve/test_hierarchical_retriever_rerank.py::test_retrieve_uses_rerank_scores_in_thinking_modetests/retrieve/test_hierarchical_retriever_rerank.py::test_retrieve_falls_back_to_vector_scores_when_rerank_returns_nonetests/retrieve/test_hierarchical_retriever_rerank.py::test_score_propagation_alpha_uses_configured_weight
I applied only those test-double/capture adjustments locally and the related retrieval set passed 106/106. Please also run Ruff fix/format: the exact head currently reports an unsorted private-name import in the new test file and would reformat two lines in hierarchical_retriever.py. After the local test adjustments plus those mechanical fixes, Ruff check, format check, and git diff --check all pass.
|
已在
本地通过 Ruff check、Ruff format check、三个修改文件的 |
Summary
QueryResult.truncatedprovenance.Fixes #2989.
Tests
ruff check openviking/retrieve/hierarchical_retriever.py openviking/storage/vikingdb_manager.py openviking/storage/viking_vector_index_backend.py openviking_cli/retrieve/types.py tests/storage/test_hierarchical_retriever_session_logs.pypython -m py_compile openviking/retrieve/hierarchical_retriever.py openviking/storage/vikingdb_manager.py openviking/storage/viking_vector_index_backend.py openviking_cli/retrieve/types.py tests/storage/test_hierarchical_retriever_session_logs.pyFull upstream pytest was not available in the no-clone maintenance environment; GitHub CI is the integration check.