Repository navigation
Conversation
This branch has not been deployed
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.
Description
Removes the unused
json_outputparameter fromast_parseandast_query, along with its forwarding through_handle_ast.Both AST commands already produce JSON output regardless of the global
--jsonflag, so the parameter is unnecessary. This change preserves existing CLI behavior and leaves the global flag available to other commands.The implementation also updates two existing routing tests and adds three regression tests that guard against reintroducing the unused parameter.
Before the fix
json_outputwas present inast_parse,ast_query, and_handle_ast.ast parseandast queryproduced identical stdout with and without--json.After the fix
make lintpassed (Ruff and Pyright).--json, and their output matched the original implementation.Type of Change
Checklist
Related Issues
Fixes #378
Notes
Testing limitation: The full repository test suite did not pass locally. Before the fix, it reported 16,776 passed, 160 skipped, and three failures. During the pre-commit run, it reported 16,825 passed, 186 skipped, and six failures. Five of the latter involved local-only AI301 Markdown files; the remaining failure was a filesystem timeout while scanning a MacDroid-connected directory.
I used the repository's documented
SKIP=pytestoption for the commit. The other applicable pre-commit checks passed, and the targeted AST tests passed independently.Pre-push security scan: The
pip-audithook reported CVE-2026-114613 in the locked development dependencymsgpack 1.2.1, with version 1.2.3 listed as a fix. The dependency is pulled in throughpip-auditandcachecontrol, not through the AST commands changed by this PR. I usedSKIP=pip-auditto push the branch without modifying the project's dependency lockfile. This vulnerability remains unresolved and should be addressed separately.AI assistance: I used Claude Code to investigate the affected CLI functions, draft a scoped implementation plan, add regression tests, and help implement the change. I reviewed the changes and verified them using pytest, Ruff, Pyright, and command-line output comparisons.