Skip to content

fix!: stop ignoring --max-depth, --min-ratio, --no-sort on --json-input#424

Draft
KSXGitHub wants to merge 2 commits into
masterfrom
claude/relaxed-edison-bR744
Draft

fix!: stop ignoring --max-depth, --min-ratio, --no-sort on --json-input#424
KSXGitHub wants to merge 2 commits into
masterfrom
claude/relaxed-edison-bR744

Conversation

@KSXGitHub
Copy link
Copy Markdown
Owner

@KSXGitHub KSXGitHub commented May 26, 2026

Fixes #420.

--max-depth, --min-ratio, and --no-sort were ignored when --json-input
was used, so the deserialized tree was rendered verbatim. --max-depth
regressed in 0.12.0 when depth limiting moved from the visualizer into the tree
builder; --min-ratio and --no-sort had never been applied on this path.

The --json-input code 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, and json_input_no_sort
    assert each flag now takes effect.
  • The existing json_input round-trip test pins --min-ratio=0 so it keeps
    verifying faithful reconstruction.

…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
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Performance Regression Reports

commit: 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: --max-depth (and --min-ratio, --no-sort) ignored when --json-input is used

2 participants