fix(query): bound remaining response lists - #895
Conversation
code-review-graph reviewOverall risk: 0.54 (MEDIUM) — 16 changed function(s)/class(es), 0 affected flow(s), 6 test gap(s) Risk-scored changes
Test gaps
Token savings: this graph-backed report used ~36,715 fewer tokens (~92%) than reading every changed file in full (estimated, chars/4 approximation). Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
|
The net win here is real and I measured it: on main, 1. The edge cap slices an unranked list, so the visible edges misrepresent the graph. CALLS is 51% of the real set and 7% of what the caller sees; 2. That is over the Worth fixing in the same pass:
Verified good, for the record: bounds reject |
Summary
max_resultson the impact-radius MCP tool and validate all caller-supplied bounds, rejecting booleans and values below 1.Regression coverage
Validation
pytest tests/test_token_budget.py tests/test_tools.py tests/test_main.py tests/test_documentation.py -q— 298 passed.pytest tests/test_token_budget.py -q— 127 passed.ruff check code_review_graph/tools/query.py code_review_graph/main.py tests/test_token_budget.py— passed.python -m py_compilefor all changed Python files andgit diff --check— passed.Fixes #888