Skip to content

fix(cli): move clone's own help options after clone, not merge graphs (#2636) - #5629

Closed
ayushcodes10 wants to merge 1 commit into
Graphify-Labs:v8from
ayushcodes10:fix-2636-help-text-ordering
Closed

ayushcodes10 wants to merge 1 commit into
Graphify-Labs:v8from
ayushcodes10:fix-2636-help-text-ordering

Conversation

@ayushcodes10

Copy link
Copy Markdown
Contributor

Fixes #2636.

In the top level help output, clone's own two option lines were appended after the graph merging command's block instead of directly after clone itself:

clone <github-url>      ...
merge-driver <base> <current> <other>  ...
merge-graphs <g1> <g2>  ...
    --out <path>            output path (default: graphify-out/merged-graph.json)
    --previous <path>       restore the previous merged clustering's community ids
                            (by node id) instead of each input's own per-source ids,
                            so a later cluster-only run reuses labels correctly
    --branch <branch>       checkout a specific branch (default: repo default)
    --out <dir>             clone to a custom directory (default: ~/.graphify/repos/<owner>/<repo>)
add <url>               ...

A reader sees the graph merging command documented with two different output flags, and no way to discover that clone itself takes a branch flag at all. Both flags are real and already work on clone; only the help layout was wrong.

Moved the two lines to sit directly after the clone line, before the git merge driver and graph merging entries. Confirmed the output now reads:

clone <github-url>      ...
    --branch <branch>       checkout a specific branch (default: repo default)
    --out <dir>             clone to a custom directory (default: ~/.graphify/repos/<owner>/<repo>)
merge-driver <base> <current> <other>  ...
merge-graphs <g1> <g2>  ...
    --out <path>            output path (default: graphify-out/merged-graph.json)
    --previous <path>       ...
add <url>               ...

Same block, the issue also flagged four lines that were one space short of the two space wider description column every other entry uses: the droid, trae and trae CN uninstall lines, plus the multigraph diagnose line. Verified each was indeed off by exactly one space against the column every surrounding install/uninstall pair shares, and added the missing space to each.

Adds two tests to tests/test_cli_help.py. One asserts clone's own options appear between clone and the git merge driver entry, and that the graph merging entry keeps only its own output flag. One asserts the four corrected lines appear verbatim. Both fail against unmodified v8 (confirmed via a temporary git stash of only graphify/__main__.py) and pass with the fix.

Verification: the help test file passes (5 tests). The full test suite gives 12349 passed, with the 10 failures that remain all confirmed as known flakes: the Erlang grammar network fetch timeout, a group of Terraform fixture parametrizations and a worker count test that only fail under pytest xdist parallel workers (pass every time in isolation), and a subprocess timeout flake in the R extractor test under load. The skillgen check reports all 134 artifacts clean. This change touches only help text, so no AST cache schema bump is needed.

clone's own two option lines were appended after the graph merging
command's block instead of directly after clone itself, so the top
level help listing read as though graph merging took a branch flag
and a second, differently described output flag, with no way to
discover that clone takes a branch flag at all. Both flags are real
and already work on clone; only the layout was wrong. Move the two
lines to sit directly after the clone line, before the git merge
driver and graph merging entries.

Same block, four lines were one space short of the two space wider
description column every other entry uses: the droid, trae and trae
CN uninstall lines, plus the multigraph diagnose line. Add the
missing space to each so the description column lines up again.

Adds two tests to tests/test_cli_help.py: one asserting clone's own
options appear between clone and the git merge driver entry and that
the graph merging entry keeps only its own output flag, one asserting
the four corrected lines appear verbatim. Both fail against
unmodified v8 and pass with the fix.
@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @ayushcodes10. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic.

@github-actions github-actions Bot added the contributor Pull request from a returning community contributor label Nov 29, 2026

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify review View in Graphify

Nothing blocking · 1 possible issue to check · Merge confidence 5/5

1 possible issue to check · High impact

The help listing now places clone’s --branch and --out descriptions directly after the clone command, and aligns several command descriptions.

1 possible issue we couldn't confirm
  • The merge-graphs option check stops at the first add <url> text, so a help reorder can make it fail for the wrong reason · tests/test_cli_help.py:88

They don't change the score.

Code graph · 403 functions depend on this change
  • 39 of 658 test files are affected by this change.
  • Gate, test list and every flagged function: in the Graphify check.

Reviewed 42e5dfc

safishamsi added a commit that referenced this pull request Nov 30, 2026
Extractor accuracy (Swift #5641, Apex #5627, Python #5647, TypeScript
#5604/#5614/#5612, Bash caller-var #5602), GitHub Actions run-step
extraction (#5603), incremental correctness (#5634/#5638/#5636), symlink
and semantic-cache fixes (#5617/#5618), export/report hardening and perf
(#5643/#5644/#5645/#5646/#5619/#5620/#5621), and CLI/docs/skill/install
work (#5629/#5628/#5626/#5624/#5623/#5625/#5642/#5583). AST cache schema
59 to 60; Swift/Apex/Python/Bash/GHA inputs re-extract on first build.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@safishamsi

Copy link
Copy Markdown
Member

Landed in v0.9.124 (just released to PyPI), cherry-picked with your authorship preserved so it shows under your name in the history. Thanks @ayushcodes10 for listing clone's own help options under clone — verified green in the full suite and, where applicable, smoke-tested against the published package. 🙏

@safishamsi safishamsi closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor Pull request from a returning community contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graphify --help: clone's --branch / --out options are printed under merge-graphs, and --out is listed twice with contradictory descriptions

2 participants