Repository navigation
fix(cli): put clone's --branch/--out under clone in --help, and align the description column - #2639
rajarshidattapy wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
Fixes #2636.
The bug
In the top-level help,
clone's two option lines were emitted after themerge-driverand
merge-graphsentries. Since option lines are attributed to whatever command precedesthem, the block read as though
merge-graphsaccepts--branchand a second--out:Two
--outflags with contradictory descriptions under one command, and no way to discoverthat
clonetakes--branchat 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 39characters, 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 --helpre-audited programmatically: 0 misaligned lines remain, andno command block lists the same flag twice.
git diff -wcollapses to 2 insertions / 2 deletions — mechanical proof the change isthe two moved lines plus whitespace, with no text or logic touched.
(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. Thismatters: a naive source-level measurement counts the backslashes in
\"and so mis-padspath "A" "B",explain "X",--author "Name"and--contributor "Name"— lines that werealready correct. Each rewrite is asserted to change whitespace only
(
new.split() == old.split()), which is what makes thegit diff -wresult above meaningful.