fix: default parse --level to reachable to match scan and Python CLI - #35
Merged
ar7casper merged 4 commits intoMay 12, 2026
Conversation
The Go CLI parse command defaulted --level to "all", skipping reachability analysis. The scan command and the Python CLI both default to "reachable". Align parse to match so reachability filtering runs by default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
joshbouncesecurity
requested review from
ar7casper,
dgeyshis,
shahar-davidson,
sounil and
yotamleo
as code owners
May 4, 2026 18:00
joshbouncesecurity
marked this pull request as draft
May 4, 2026 18:06
added 3 commits
May 4, 2026 21:08
After flipping the default to reachable, the forwarding guard at parse.go was still 'parseLevel != "all"', which silently dropped '--level all' (the user's explicit non-default choice) and let the Python CLI fall back to its own default of reachable. Compare against the new default so all four choices are forwarded faithfully and the behavior matches scan.go.
Pulls the Python argv assembly out of runParse into buildParsePyArgs so the forwarding rules (omit defaults, pass non-defaults through) can be tested directly. Adds cases for every --level choice plus a baseline that pins the full argv shape, and a usage-string check that asserts all four documented choices appear in --help.
Contributor
Author
Manual verificationIn addition to the new automated tests:
|
Contributor
Author
Local test resultsBuilt the Go CLI from this branch and verified the help text on Windows. Commands run: Result (relevant flag): Outcome:
Did not run the full parse-vs-scan parity comparison in this pass (that's well-covered by the automated test in the diff), but the user-facing default is now correctly flipped. |
joshbouncesecurity
marked this pull request as ready for review
May 12, 2026 07:00
ar7casper
pushed a commit
that referenced
this pull request
May 12, 2026
ar7casper
added a commit
that referenced
this pull request
May 13, 2026
Covers the seven PRs in this release: - #35: parse --level default → reachable (CLI consistency with scan + Python CLI) - #36: auto-detect dep changes via ~/.openant/venv/.deps-hash - #37: lazy JS parser npm bootstrap on first use - #39: TypeScript/NestJS DI-aware call resolution (constructor + field + functional inject()) - #40: --language auto opt-in for openant init + non-git path support + shared config/languages.json - #49: Express anonymous route handler extraction (route_handler / route_middleware) - #50: --llm-reachability opt-in stage + cross-parser call_graph.json contract Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
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.
@
Summary
The Go CLI
parsecommand defaults--levelto"all", while bothscanand the Python CLI default to"reachable". This means standaloneopenant parseproduces a different (larger, noisier) dataset thanopenant scan, with no indication to the user.This change flips parse's default to
"reachable"so the three entry points stay consistent.Addresses item 4 from #16 (does not close the issue).
Test plan
openant parse <repo>writes the same set of nodes asopenant scan <repo> --steps parse.openant parse <repo> --level allstill produces the larger dataset.@