Skip to content

fix(cli): put clone's --branch/--out under clone in --help, and align the description column - #2639

Open
rajarshidattapy wants to merge 1 commit into
Graphify-Labs:v8from
rajarshidattapy:fix/help-clone-options-placement
Open

rajarshidattapy wants to merge 1 commit into
Graphify-Labs:v8from
rajarshidattapy:fix/help-clone-options-placement

Conversation

@rajarshidattapy

Copy link
Copy Markdown
Contributor

Fixes #2636.

The bug

In the top-level help, clone's two option lines were emitted after the merge-driver
and merge-graphs entries. Since option lines are attributed to whatever command precedes
them, the block read as though merge-graphs accepts --branch and a second --out:

  merge-graphs <g1> <g2>  merge two or more graph.json files into one cross-repo graph
    --out <path>            output path (default: graphify-out/merged-graph.json)
    --branch <branch>       checkout a specific branch (default: repo default)
    --out <dir>             clone to a custom directory (default: ~/.graphify/repos/<owner>/<repo>)

Two --out flags with contradictory descriptions under one command, and no way to discover
that clone takes --branch at all.

Fix

Moved the two lines to sit
|---|---|
| reported | diagnose multigraph, droid uninstall, trae uninstall, trae-cn uninstall |
| also found | --missing-only, query "<question>", affected "X", --no-gitignore, --as <tag>, global add, global remove, global list, global path |

Fixed all 13, since a partial pass leaves the column just as broken as before.

merge-driver <base> <current> <other> is deliberately left alone — its left column is 39
characters, wider than the description column, so it cannot be padded into alignment. Any
line whose left column already overruns the target is skipped rather than force-shifted.

Verification

  • python -m graphify --help re-audited programmatically: 0 misaligned lines remain, and
    no command block lists the same flag twice.
  • git diff -w collapses to 2 insertions / 2 deletions — mechanical proof the change is
    the two moved lines plus whitespace, with no text or logic touched.
  • 184 help/CLI tests pass; full suite shows the same 42 pre-existing failures as baseline
    (Windows/env), none new.

Note for reviewers

The realignment was applied by script rather than by hand, measuring each line's column on
the string as Python renders it (ast.literal_eval) instead of on the raw source. This
matters: a naive source-level measurement counts the backslashes in \" and so mis-pads
path "A" "B", explain "X", --author "Name" and --contributor "Name" — lines that were
already correct. Each rewrite is asserted to change whitespace only
(new.split() == old.split()), which is what makes the git diff -w result above meaningful.

@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 reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. 1 change(s) tested, no difference found (not proven).


Graphify review — findings

This pull request adjusts the whitespace alignment of help-text strings printed in the CLI's usage output within graphify/__main__.py. It normalizes the column spacing after various command and flag descriptions (e.g., diagnose multigraph, query, affected, global add/remove/list/path, droid uninstall, trae uninstall) so descriptions line up consistently. It also relocates the --branch and --out help lines from under merge-graphs to under the clone command. The changes are confined to print statements in the CLI help output; the surface area is documentation/usage text formatting only.

No blocking issues surfaced.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 158 functions depend on the 12 functions this change touches.

Health — grade A; 2 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):

  • dispatch_command() — 2 callers, 117 callees (high)
  • test_poisoned_manifest_is_healed() — 0 callers, 6 callees (medium)

Verification — 158 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 158 function(s) in the blast radius were not formally verified this run

Formal verification

No difference found (not proven): No behavior difference found in \_run\_cli (not a proof).

The verifier ran both versions of \_run\_cli on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

This branch has not been deployed

No deployments
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.

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

1 participant