Repository navigation
Description
Summary
Inspected the gh aw CLI with a fresh binary (./gh-aw, ccb6ce2-dirty). Found 4 confirmed issues: 1 high-severity silent-failure bug, 1 medium, and 2 low. The pre-collected all-help.txt was unreliable (repeated error output, split per-command files), so help was regenerated per command.
| Severity | Count |
|---|---|
| high | 1 |
| medium | 2 |
| low | 1 |
Findings
1. gh aw list reports errors but exits 0 (high)
Affects list (plain and --json) when --repo fails. The error is printed and then the command returns nil.
Observed:
$ gh aw list --repo ghe.example.com/owner/repo
✗ invalid repository format: ghe.example.com/owner/repo (expected owner/repo or owner/repo@ref)
$ echo $?
0
$ gh aw list --repo nonexistent-owner-xyz/repo --json; echo $?
✗ failed to list workflow files from nonexistent-owner-xyz/repo: failed to clone repository ...: exit status 128
0
Expected: non-zero exit code on failure. With --json, a failure produces 0 bytes on stdout, so scripts cannot distinguish "no workflows" from "error".
Root cause: RunListWorkflows in pkg/cli/list_workflows_command.go (around line 99–102) runs fmt.Fprintln(os.Stderr, console.FormatErrorMessage(err.Error())); return nil after listWorkflowFiles fails. It should return the error.
Suggested fix: return err (wrapped) instead of printing and returning nil. Add a regression test that asserts a non-nil error for an invalid --repo value.
2. gh aw help <unknown-topic> exits 0 (medium)
Observed:
$ gh aw help bogus; echo $?
<prints root help>
0
$ gh aw bogus-cmd; echo $?
✗ unknown command "bogus-cmd" for "gh aw"
1
Expected: unknown help topics should fail the same way as unknown commands (exit 1, unknown command message). Cause: help is Cobra's built-in help command, which does not validate its argument. help compile and help bogus both exit 0.
Suggested fix: validate the topic argument in a custom help command, or set a RunE on the help command that resolves the topic with cmd.Root().Find(args) and returns an error when it does not match.
3. --repo host-prefix handling differs by command (medium)
--repo is documented as [HOST/]owner/repo on about 21 commands, but commands handle a host prefix in different ways:
| Command | --repo ghe.example.com/owner/repo |
|---|---|
doctor |
rejected: ✗ --repo must use the OWNER/REPO format |
env get |
rejected: ✗ invalid repository slug "..." then invalid repo format: ... |
work-queue state |
rejected: ✗ repo must be owner/repo |
list |
rejected with exit 0 (see finding 1) |
status |
accepted and ignored: i No workflow files found. |
audit |
attempted against the API, then failed with an access error (exit 1) |
Expected: one rule for host-prefixed --repo. Either support it everywhere or reject it everywhere with the same message. The help text should match what each command accepts. Currently doctor, env, and work-queue say "GHES host prefixes are not supported" while others say [HOST/]owner/repo format.
Suggested fix: centralise --repo parsing in one helper with one error message, and make the help text generated from it.
4. Inconsistent --repo error wording (low)
Three different messages for the same validation (see finding 3). Use one shared format string, for example invalid --repo "<value>": expected owner/repo.
Inspection metadata
- Binary:
./gh-aw(ccb6ce2-dirty). Note: the PATHgh awextension failed to install, so the repo binary was used. - Commands inspected: 90 help pages generated (
--helprecursion across all root commands and subcommands). - Examples checked: 274 unique example invocations; none rejected for unknown flags.
- Flag coverage: doc (
docs/src/content/docs/setup/cli.md) vs help checked in both directions. 15 flags in thework-queuesubtree are documented only in--help, which matches the docs' stated policy. 9 doc-only flags were verified against source and are legitimate (installer--skip-checksum, poutine--disable-version-check, grype--config, hidden--read-only, hidden deprecatedlogs --after, and others). - Checks with no findings: doubled words, punctuation spacing, sentence capitalisation, root-command doc coverage,
--timeoutsemantics table, short/long flag pairing,--no-*negation pattern. - Date: 2026-11-12.
Flag-coverage detail (doc vs help)
- Help flags missing from
cli.md: 15, all in thework-queuesubtree (documented as "see--help"). - Doc-only flags with no help match: 9, all verified as legitimate (see above).
Priority
- Finding 1 (exit code on failure), because it breaks scripting.
- Finding 2 (help topic validation).
- Findings 3 and 4 (
--repoconsistency).
Generated by ✅ CLI Consistency Checker · copilot · routed: haiku55 xhigh · ~15 AIC · ⌖ ~1 AIC · ⊞ 3.4K · ◷
- expires on Nov 14, 2026, 5:35 AM UTC-08:00
Activity
github-actions commentedon Nov 14, 2026
This issue was automatically closed because it expired on 2026-11-14T13:35:11.498Z.