fix: default parse --level to reachable to match scan and Python CLI#35
Draft
joshbouncesecurity wants to merge 4 commits intoknostic:masterfrom
Draft
fix: default parse --level to reachable to match scan and Python CLI#35joshbouncesecurity wants to merge 4 commits intoknostic:masterfrom
joshbouncesecurity wants to merge 4 commits intoknostic:masterfrom
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>
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. |
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.@