Add detail_level and max_flows to get_affected_flows (fixes #849) - #853
Open
asemraza wants to merge 1 commit into
Open
Add detail_level and max_flows to get_affected_flows (fixes #849)#853asemraza wants to merge 1 commit into
asemraza wants to merge 1 commit into
Conversation
get_affected_flows_tool was the only tool in the review chain without detail_level, and it had no result bound. Every flow carries a full steps list, so a 75-file change set returned a 247k-token response in the middle of the documented minimal-first workflow. detail_level="minimal" strips flows to per-flow metadata (name, criticality, depth, counts). max_flows bounds the list (default 50, 0 disables); total always reports the untruncated count and truncated flags the cut, mirroring the impact-radius truncation contract. Fixes tirth8205#849
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #849
Problem
get_affected_flows_toolis step 2 of the documented review-pr workflow with its <=800-token target, but it was the only tool in the chain withoutdetail_leveland had no result bound. Each flow embeds a fullstepslist, so a 75-file change set produced a 247k-token response.Change
detail_level="minimal": per-flow metadata only (id, name, criticality, depth, node_count, file_count), same convention as the sibling tools.max_flows(default 50, 0 disables): bounds the returned list.totalalways reports the untruncated count andtruncatedflags the cut, mirroring the impact-radius truncation contract. The summary appends "showing N" when truncated.Both parameters are wired through the MCP tool wrapper with updated docstrings.
Tests
Three new tests: minimal drops steps/path, max_flows truncates with correct total/truncated/summary, max_flows=0 disables the limit. Full suite 2,401 passed, ruff and mypy clean.