Skip to content

fix(cli): address 16 CLI consistency issues from 2026-07-20 audit#46854

Merged
pelikhan merged 7 commits into
mainfrom
copilot/cli-consistency-fixes
Jul 20, 2026
Merged

fix(cli): address 16 CLI consistency issues from 2026-07-20 audit#46854
pelikhan merged 7 commits into
mainfrom
copilot/cli-consistency-fixes

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Automated CLI consistency audit identified 16 issues across help text, flag naming, and docs/help mismatches. This PR resolves all of them.

Typos & Grammar

  • trial: "support the workflow_dispatch trigger", "created as a private repository and retained by default"
  • cli.md: "natural language Markdown files", "pinned actions", "from the Agentics collection"
  • checks: policy_blocked description uses past tense consistently: "gates blocked the PR"
  • run --push: help now mentions "Requires a clean working directory"

Flag Naming Inconsistencies

  • FN-1 trial: adds --delete-host-repo-before (consistent with --delete-host-repo-after); --force-delete-host-repo-before deprecated
  • FN-2 remove: adds --no-remove-orphans following the --no-* convention; --keep-orphans deprecated
  • FN-3 run: removes uppercase -F shorthand from --raw-field (CLI-wide lowercase convention); example updated to --raw-field

Docs ↔ Help Text Mismatches

  • doctor --repo: description now includes [HOST/] GHES prefix
  • Root help: "View execution logs""Download and analyze execution logs"
  • update Long: adds note that update bumps all action refs to latest major version by default (--no-release-bump to restrict)

Inconsistent Flag Descriptions

  • audit --evals: changed from negative phrasing ("Skip runs that do not contain…") to positive ("Filter to runs containing evals results (evals.jsonl)"), matching logs --evals
  • run --approve: expanded to mention strict-mode behavior, consistent with compile/upgrade
  • new --force: "Overwrite existing **workflow** files without confirmation", matching add/deploy

All renamed flags retain deprecated aliases for backward compatibility.


pr-sous-chef run https://github.com/github/gh-aw/actions/runs/29761732160

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · 31.2 AIC · ⌖ 6.13 AIC · ⊞ 6.9K ·
Comment /souschef to run again

Copilot AI and others added 2 commits July 20, 2026 14:50
- TG-1: Add missing article 'the' before 'workflow_dispatch trigger' in trial help
- TG-2: Fix phrasing 'created as private and kept' → 'created as a private repository and retained' in trial help
- TG-3: Capitalize 'Markdown' as proper noun in cli.md
- TG-4: Fix tense inconsistency in checks command ('are blocking' → 'blocked')
- TG-5: Add 'Requires a clean working directory' to --push flag help text
- FN-1: Add --delete-host-repo-before flag; keep --force-delete-host-repo-before as deprecated
- FN-2: Add --no-remove-orphans flag for remove command; keep --keep-orphans as deprecated
- FN-3: Remove uppercase -F shorthand from --raw-field; update example to --raw-field
- DM-3: Add [HOST/] prefix to doctor --repo flag description
- DM-4: Update root help 'View execution logs' → 'Download and analyze execution logs'
- DM-5: Fix 'pinned Actions' → 'pinned actions' in cli.md
- DM-6: Fix 'from The Agentics collection' → 'from the Agentics collection' in cli.md
- DM-7: Add note about default action-bump behavior to update command Long description
- ID-1: Standardize --evals flag to positive phrasing in audit command
- ID-2: Expand run --approve description to mention strict-mode behavior
- ID-3: Fix new --force description to 'Overwrite existing workflow files without confirmation'
- Update all related tests and docs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Rename forceDeleteHostRepo variable to legacyForceDelete for clarity
when merging the deprecated --force-delete-host-repo-before and new
--delete-host-repo-before flags, making the intent more explicit.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CLI consistency issues identified in inspection fix(cli): address 16 CLI consistency issues from 2026-07-20 audit Jul 20, 2026
Copilot AI requested a review from pelikhan July 20, 2026 14:53
@pelikhan
pelikhan marked this pull request as ready for review July 20, 2026 15:38
Copilot AI review requested due to automatic review settings July 20, 2026 15:38
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #46854 does not have the 'implementation' label and has only 21 new lines of code in business logic directories (threshold: 100).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns CLI flags, help text, and documentation with the consistency audit.

Changes:

  • Adds deprecated aliases for renamed trial and remove flags.
  • Updates flag descriptions, examples, grammar, and terminology.
  • Removes the -F shorthand and updates related tests.
Show a summary per file
File Description
pkg/cli/update_command.go Documents default action version updates.
pkg/cli/trial_command.go Adds the new repository deletion flag and alias.
pkg/cli/remove_command.go Updates orphan-removal guidance.
pkg/cli/flags_test.go Changes shorthand consistency coverage.
pkg/cli/doctor_command.go Documents GHES repository syntax.
pkg/cli/checks_command.go Revises normalized-state wording.
pkg/cli/audit.go Standardizes eval filtering help.
docs/src/content/docs/setup/cli.md Updates CLI documentation and examples.
docs/src/content/docs/experimental/trial-ops.md Uses the renamed trial flag.
cmd/gh-aw/main.go Updates flags, aliases, and command help.
cmd/gh-aw/main_help_text_test.go Updates run approval help assertion.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 11/11 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread cmd/gh-aw/main.go Outdated
runCmd.Flags().Bool("auto-merge-prs", false, "Auto-merge any pull requests created during the workflow execution")
runCmd.Flags().StringArrayP("raw-field", "F", []string{}, "Pass a workflow dispatch input in key=value format (can be specified multiple times)")
runCmd.Flags().Bool("push", false, "Commit and push workflow files (including transitive imports) before running")
runCmd.Flags().StringArray("raw-field", []string{}, "Pass a workflow dispatch input in key=value format (can be specified multiple times)")
Comment thread cmd/gh-aw/main.go Outdated
runCmd.Flags().StringArrayP("raw-field", "F", []string{}, "Pass a workflow dispatch input in key=value format (can be specified multiple times)")
runCmd.Flags().Bool("push", false, "Commit and push workflow files (including transitive imports) before running")
runCmd.Flags().StringArray("raw-field", []string{}, "Pass a workflow dispatch input in key=value format (can be specified multiple times)")
runCmd.Flags().Bool("push", false, "Commit and push workflow files (including transitive imports) before running. Requires a clean working directory.")
Comment thread pkg/cli/checks_command.go
pending - checks are still running or queued
no_checks - no checks configured or triggered
policy_blocked - policy or account gates are blocking the PR
policy_blocked - policy or account gates blocked the PR
Comment thread pkg/cli/flags_test.go Outdated
Comment on lines +73 to +78
name: "run command does not have -F for --raw-field",
shortFlag: "F",
longFlag: "raw-field",
commandSetup: func() *cobra.Command { return createRunCommandStub() },
shouldExist: true,
description: "run should have raw-field short flag (uppercase F)",
shouldExist: false,
description: "run should not have an uppercase -F short flag (CLI-wide lowercase convention)",
@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 85/100 — Excellent

Analyzed 4 test(s): 4 design, 0 implementation, 0 violation(s).

📊 Metrics (4 tests)
Metric Value
Analyzed 4 (Go: 4, JS: 0)
✅ Design 4 (100%)
⚠️ Implementation 0 (0%)
Edge/error coverage 2 (50%)
Duplicate clusters 0
Inflation No
🚨 Violations 0
Test File Classification Issues
TestRunCommandHelpTextConsistency cmd/gh-aw/main_help_text_test.go design_test None
TestCompileScheduleSeedHelpUsesConsistentQuotes cmd/gh-aw/main_help_text_test.go design_test None
TestShortFlagConsistency pkg/cli/flags_test.go design_test None
TestEngineFlagUsageText pkg/cli/flags_test.go design_test None

Verdict

Passed. 0% implementation tests (threshold: 30%). All modified tests verify user-visible CLI contracts — flag names, usage text, and help text consistency. Both files carry //go:build !integration tags. No forbidden mocks. Changes are minor consistency updates matching renamed constants — no test inflation.

🧪 Test quality analysis by Test Quality Sentinel · 26.4 AIC · ⌖ 9.69 AIC · ⊞ 7K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 85/100. 0% implementation tests (threshold: 30%). All modified tests verify user-visible CLI contracts with proper build tags and no forbidden mocks.

@github-actions github-actions Bot mentioned this pull request Jul 20, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

The changes correctly address most of the 16 identified CLI consistency issues. Existing inline comments have already flagged the key concerns.

Issues already noted in inline comments:

  1. -F shorthand removal (main.go line 801) — breaking change for existing scripts; violates CLI compatibility rules.
  2. --push help text (main.go line 802) — overstated constraint; implementation only rejects unrelated staged files, not all unclean states.
  3. checks MCP duplicate (checks_command.go line 88) — pkg/cli/mcp_tools_readonly.go still uses old phrasing, leaving the stated consistency goal unmet.
  4. Stub-only test (flags_test.go line 78) — test validates a hand-written stub, not the real production runCmd.

Changes that look correct:

  • Typo/grammar fixes in trial_command.go and cli.md
  • --no-remove-orphans alias with deprecated --keep-orphans
  • --delete-host-repo-before alias with deprecated --force-delete-host-repo-before
  • doctor --repo description updated with [HOST/]
  • audit --evals rewritten with positive phrasing
  • update_command.go long-help note about --no-release-bump (flag already existed)
  • new --force description scoped to workflow files

The four issues already called out should be addressed before merge.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 27.5 AIC · ⌖ 4.43 AIC · ⊞ 5K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 24.9 AIC · ⌖ 4.28 AIC · ⊞ 6.7K
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: CLI Consistency Fixes

Non-blocking observations overall — the flag renaming and help text cleanup are sound. One new finding on top of existing comments.

### Findings summary

New finding (inline comment): — the added Long help text and the existing flag description for say contradictory things about what the flag does. The flag description should be updated to match the Long text and the docs.

Pre-existing comments (not duplicated):

  • Removing shorthand may break existing scripts — a breaking change
  • description says "requires a clean working directory" but the implementation only enforces clean staged state
  • description inconsistency with the MCP tool copy
  • Test isolation gap in

🔎 Code quality review by PR Code Quality Reviewer · 45.2 AIC · ⌖ 4.47 AIC · ⊞ 5.6K
Comment /review to run again

Comments that could not be inline-anchored

pkg/cli/update_command.go:287

Contradictory --no-release-bump description: the newly added Long help says update bumps all referenced Actions by default and --no-release-bump restricts to core only — but the flag's own description says it "Disable automatic major version bumps for all actions (only core actions/* are force-updated)", implying core is always force-updated even with the flag set.

<details>
<summary>💡 Suggested fix</summary>

Change the flag description in update_command.go from:

Disable …

</details>

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review feedback, and rerun checks once the branch is up to date.

Unresolved review threads:

Failed checks:

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · 8.75 AIC · ⌖ 14.8 AIC · ⊞ 6.9K ·
Comment /souschef to run again

Copilot AI and others added 3 commits July 20, 2026 16:56
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address unresolved review feedback, and rerun checks once the branch is up to date.

Unresolved review threads:

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · 31.2 AIC · ⌖ 6.13 AIC · ⊞ 6.9K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review feedback, and rerun checks once the branch is up to date.

Unresolved review threads:...

Addressed in 377675e, 97dbd96, and 435600a. I restored -F as a deprecated shorthand for --raw-field, corrected the --push help/docs to match the staged-files behavior, synced the duplicated policy_blocked wording, moved shorthand coverage onto the production cmd/gh-aw command, and hardened the Windows compile integration test cleanup for transient .exe locks.

Local validation passed with make fmt, make lint, make test-unit, and make test, and the targeted Windows compile integration test now passes locally. CI on the new head is still unverified/stale after the agent push, so a maintainer will need to re-trigger it.

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address unresolved review feedback, and rerun checks once the branch is up to date.

Unresolved review threads:...

Addressed by 377675e, 97dbd96, and 435600a. The branch already contains the review follow-ups: -F was restored as a deprecated shorthand, --push help/docs now describe the staged-files constraint accurately, the duplicated policy_blocked wording is synced, the shorthand assertion moved onto the production cmd/gh-aw command, and the Windows integration cleanup now retries .exe removal. I re-validated locally with make fmt, make lint, make test-unit, make test, and make recompile; all passed. The prior Windows Integration failure was the transient locked gh-aw.exe cleanup path, which these commits fix. CI on the current agent head still needs a maintainer re-trigger because agent pushes do not restart workflows.

@pelikhan
pelikhan merged commit afe047b into main Jul 20, 2026
24 checks passed
@pelikhan
pelikhan deleted the copilot/cli-consistency-fixes branch July 20, 2026 17:51
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.14

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.

[cli-consistency] CLI Consistency Issues - 2026-07-20

4 participants