Skip to content

fix(help): spell Arguments-block names the way the usage line does - #80

Merged
dspangen merged 1 commit into
mainfrom
fix/arguments-section-flag-names
Aug 28, 2026
Merged

fix(help): spell Arguments-block names the way the usage line does#80
dspangen merged 1 commit into
mainfrom
fix/arguments-section-flag-names

Conversation

@dspangen

Copy link
Copy Markdown
Contributor

omni models merge-branch --help described its two positionals twice, under two different names:

Arguments:
  <modelid>     Model UUID
  <branchname>  Branch name

Usage:
  omni models merge-branch <model-id> <branch-name> [flags]

The Arguments block exists to tell a reader that the second positional is a branch name, not a UUID. That only lands if both blocks are recognizably about the same argument — under two spellings they read as four arguments.

The usage line has used canonicalName since #77; argumentsHelp kept calling slugify, which lowercases but doesn't split camelCase. Both now use canonicalName.

Help text only — nothing is parsed from these strings, and flag/arg matching is unaffected.

Details: scope and verification

Scope

One line in argumentsHelp. Only the path-param branch needed it; body-shorthand arg names (model-id, prompt, …) are authored in kebab-case already and were never affected.

Every generated command with a camelCase path param was showing the wrong spelling — ai conversation-detail (<conversationid>), ai job-cancel (<jobid>), models merge-branch, and so on.

After

Arguments:
  <model-id>     Model UUID
  <branch-name>  Branch name

Usage:
  omni models merge-branch <model-id> <branch-name> [flags]

Verification

make build && go test ./... — all packages pass.

TestBuildCommand_ArgumentsSection updated to expect the canonical spelling, and a new TestGenerateCommands_ArgumentNamesMatchUsageLine walks every generated command in api/openapi.json and asserts each <placeholder> in the usage line appears in the Arguments block — the two are built by separate code paths, which is how they drifted in the first place.

Both fail against the pre-fix code (checked by reverting the one-line change): the spec-wide test flags ai conversation-detail, ai job-cancel, and the rest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UP53YBDjhQkkn3WAqMR3sf

`omni models merge-branch --help` listed its positionals twice under two
different names:

  Arguments:
    <modelid>     Model UUID
    <branchname>  Branch name

  Usage:
    omni models merge-branch <model-id> <branch-name> [flags]

The Arguments block exists so a reader learns that the second positional is a
branch NAME, not a UUID. That only lands if the two blocks are recognizably
about the same argument — under two spellings they read as four arguments.

The usage line has used canonicalName since #77; argumentsHelp kept calling
slugify, which lowercases but does not split camelCase. Both now use
canonicalName. Affects help text only — nothing is parsed from these strings.

Adds a spec-wide test asserting every `<placeholder>` in a generated command's
usage line appears in its Arguments block, so the two paths cannot drift apart
again silently.

Constraint: body-shorthand arg names are already authored in kebab-case, so
only the path-param branch needed changing
Confidence: high
Scope-risk: narrow
@dspangen
dspangen requested a review from n8agrin August 25, 2026 16:45
@dspangen
dspangen merged commit fb32efa into main Aug 28, 2026
2 checks passed
@dspangen
dspangen deleted the fix/arguments-section-flag-names branch August 28, 2026 12:40
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.

2 participants