fix!: stop ignoring --max-depth, --min-ratio, --no-sort on --json-input#424
Draft
KSXGitHub wants to merge 2 commits into
Draft
fix!: stop ignoring --max-depth, --min-ratio, --no-sort on --json-input#424KSXGitHub wants to merge 2 commits into
--max-depth, --min-ratio, --no-sort on --json-input#424KSXGitHub wants to merge 2 commits into
Conversation
…is used These options were silently ignored on the --json-input code path, which rendered the deserialized tree verbatim. --max-depth regressed in 0.12.0 when depth limiting moved out of the visualizer, while --min-ratio and --no-sort were never honored there. Apply the same depth retention, insignificant-data culling, and sorting that the filesystem scan performs. https://claude.ai/code/session_01Nj3xEp1eoDKRp1MUCxNQRQ
Performance Regression Reportscommit: 0d49dad There are no regressions. |
The existing assertion derives the expected output from the same pipeline the production code runs, so a correlated off-by-one in the depth predicate would pass undetected. Pin the depth boundary by asserting which node names are present and absent, independently of that pipeline. https://claude.ai/code/session_01Nj3xEp1eoDKRp1MUCxNQRQ
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 #420.
--max-depth,--min-ratio, and--no-sortwere ignored when--json-inputwas used, so the deserialized tree was rendered verbatim.
--max-depthregressed in 0.12.0 when depth limiting moved from the visualizer into the tree
builder;
--min-ratioand--no-sorthad never been applied on this path.The
--json-inputcode path now applies the same depth retention,insignificant-data culling, and sorting that the filesystem scan performs.
Tests
json_input_max_depth,json_input_min_ratio, andjson_input_no_sortassert each flag now takes effect.
json_inputround-trip test pins--min-ratio=0so it keepsverifying faithful reconstruction.