Skip to content

Parse kingpin/argparse/brace-choice listings; add 140+ corpus fixtures - #10

Merged
syumai merged 1 commit into
mainfrom
devin/1790058609-help-coverage-round9
Sep 22, 2026
Merged

syumai merged 1 commit into
mainfrom
devin/1790058609-help-coverage-round9

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Parser gains for four real-world help layouts plus ~140 new captured CLIs; the manifest grows to 612 rows.

Parser (internal/helptext/parse.go)

  • kingpin name [args] at col-0: inside a recognized section a column-0 line is now tried as parseEntryLine before flatEntry. aws-vault/saml2aws/tccli write help [<command>...] / add [<flags>] <profile> entries unindented under Commands: — flatEntry was misrouting them into a tentative flat section that never committed, yielding 0 commands.
  • argparse positional arguments: sections are now a recognized header, but gated: the section commits only when a command metavariable appears ({a,b,c}, bare COMMAND, or <command>). This captures pipenv/twine/pre-commit/alembic/ansible-builder/borg listings while keeping meson's builddir/sourcedir, pdm's key/value, and pipx's packages argument lists from fabricating commands.
  • Brace-choice tokens: {check,upload,register} expands into names (twine, tox's {run,r,...} line).
  • name (alias) parenthesized aliases in entry lines (tox's run (r) run environments).
  • Indented group headers no longer flush a known section: copilot's Develop ✨/ Release 🚀 subgroup titles previously ended the section at init, docs; now all groups parse (14 commands).
  • ANSI escapes stripped before parsing (\x1b[...m) — step's colorized help parses.
  • Junk-name filters: UUID-prefix tokens (37d53278-… from gscloud's example tables) and a driver header skip word (goose's Drivers: list) no longer leak as commands.
  • tool sub name: prefix entries without trailing desc (git lfs's git lfs checkout: with the description on the next line) now register — git-lfs yields all 33 commands.

Corpus

  • ~140 new captured CLIs, all license-verified permissive (Apache-2.0/MIT/BSD/CC0/UPL) via upstream LICENSE files — NOTICE.md updated. Includes aws-vault, saml2aws, azd, git-town, git-lfs, keptn, infracost, ubi, rustic, copilot, tox, twine, pre-commit, alembic, pipenv, ansible-builder, goose, gscloud, step, gitlab-runner and ~120 k8s/cloud/db CLIs.
  • Copyleft → synthetic: symfony/zitadel (AGPL-3.0), garden/terramate (MPL-2.0) get hand-written format fixtures per the repo's licensing policy.
  • source=local rows: sealos (Sustainable Use License — non-standard, no committed output), hasura/gadgetctl (help capture times out in non-interactive runs).
  • Removed bad captures: dep/terminus/pgcli (runtime errors), rustic (glibc build — recaptured with musl), tccli (bracketed service inventory, not a command listing).
  • 9 leaf rows for genuinely subcommand-less tools (checkov, kubectx, kubeseal, litecli, mycli, mongosh, stern, ubi); kube-score is empty (has [action]s but help doesn't enumerate them).

Manifest: 612 rows (was 450). go test ./internal/helptext green; docs/supported-commands.md regenerated.

Link to Devin session: https://app.devin.ai/sessions/6b27c26293e1466cb4b3f495d9cf77ea
Open in Devin Desktop: https://app.devin.ai/desktop/session/6b27c26293e1466cb4b3f495d9cf77ea?variant=devin
Requested by: @syumai

- col-0 'name [args]' entries inside known sections take priority over
  flatEntry (kingpin: aws-vault, saml2aws)
- 'positional arguments'/'required arguments' count as sections only
  when a command metavariable ({a,b}, COMMAND, <command>) appears,
  keeping meson/pdm arg lists from fabricating commands
- brace-choice tokens ({check,upload,register}) expand to names
- 'name (alias)' parenthesized aliases inside entry lines (tox)
- indented group headers no longer end a recognized section (copilot)
- ANSI escape sequences stripped before parsing (step)
- UUID-looking and driver-list tokens rejected as names (gscloud, goose)
- tool-prefix colon entries without a trailing description (git lfs X:)

Corpus: ~140 new captured CLIs (NOTICE updated), synthetic fixtures for
AGPL symfony/zitadel and MPL garden/terramate, local rows for sealos/
hasura/gadgetctl. Manifest 612 rows.

Co-Authored-By: syumai <syumai@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@syumai
syumai merged commit 4cbd891 into main Sep 22, 2026
7 checks passed
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.

1 participant