fix: keep file-search count aligned with accessible results#754
fix: keep file-search count aligned with accessible results#754
Conversation
|
@claude review PR. |
|
Claude finished @kovtcharov's task —— View job PR Review: LGTM 🟢Summary: Clean, minimal fix that correctly aligns Code Review
Tests ✅
🟢 Minor Observations (non-blocking)
Verdict: Approve. The fix is correct, well-tested, and addresses the contract violation described in #594. |
|
Lint is failing on a Black formatting issue — one function signature is too long. Here's the fix: -def test_search_file_count_matches_returned_files(search_file_fn, tmp_path, monkeypatch):
+def test_search_file_count_matches_returned_files(
+ search_file_fn, tmp_path, monkeypatch
+):In |
Summary
countconsistent with the number of files the tool actually returnstotalconsistent with the list actually included in the eventWhy
Fixes #594. The current contract can report more file-search results than the tool payload and UI event actually expose, which makes the UI claim files that are not accessible from the returned list.
Validation
PYTHONPATH=src python -m pytest -q tests\\unit\\test_file_tools.py::test_search_file_count_matches_returned_filesPYTHONPATH=src python -m pytest -q tests\\unit\\chat\\ui\\test_sse_handler.py -k file_list_limited_to_20Risk Notes