Skip to content

fix: 4 CLI consistency issues in mcp, logs, and init commands#30158

Merged
pelikhan merged 4 commits intomainfrom
copilot/fix-cli-consistency-issues
May 4, 2026
Merged

fix: 4 CLI consistency issues in mcp, logs, and init commands#30158
pelikhan merged 4 commits intomainfrom
copilot/fix-cli-consistency-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

Four inconsistencies found by automated CLI inspection affecting mcp, logs, and init commands.

Changes

  • gh aw mcp --help: Bullet list described add as "Add an MCP tool" while the subcommand itself says "Add an MCP server" — unified to "server"

  • mcp list-tools argument ordering: Command used <server> [workflow] (server-first positional) while mcp inspect uses [workflow] --server <server>. Changed list-tools to match inspect's pattern:

    # Before
    gh aw mcp list-tools github weekly-research
    
    # After
    gh aw mcp list-tools weekly-research --server github
    

    --server is marked required via MarkFlagRequired. Updated Use, Args, ValidArgsFunction, examples, unit tests, and integration tests accordingly.

  • gh aw logs --after example: Absolute-date comment used "from before 2024-01-01" while the three relative-date examples above used "older than" — unified to "older than 2024-01-01"

  • gh aw init --codespaces flag display: NoOptDefVal = " " caused pflag to render --codespaces string[=" "] in help output. Removed NoOptDefVal; updated examples to use --codespaces "" for current-repo-only mode. Flag now renders as --codespaces string.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name ortcfg.link GOINSECURE GOMOD GOMODCACHE KccABM5KLdbQdqncnJ/nPDBSfYPxXWId-nF379U/c1ozV8TA--json env /ref/tags/v9.0.0 GO111MODULE sv GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw util GOMODCACHE x_amd64/link env t_NmpAeXU GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE J_/CWrYu2czG7Ca7ylQP4Z8/vCNYLdc7D8RXanEmFBss (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go sRem�� -json GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet sv GOPATH GOPROXY /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git GOMODCACHE 9599055/b407/impapi 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 x_amd64/link bject.type] | @tsv -json GO111MODULE 64/bin/go git conf�� user.email test@example.com /usr/bin/git itmaster_branch3git itmaster_branch3rev-parse 1/x64/bin/bash /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv es.test GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE QYSQDdMsvnnTZDbyx2/zg1-jwF1IRoPasY5xy3c/9ezsDU_VWw7VJguVlRAx env -json GO111MODULE g_.a GOINSECURE GOMOD GOMODCACHE dlddytL/4hunCLEtPVA5WGcy4LnM (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 --jq bject.type] | @tsv -aw/git/ref/tagsgit /opt/hostedtoolcrev-parse ache/node/24.14.--show-toplevel git rev-�� ithub-script/git/ref/tags/v9 ache/node/24.14.1/x64/bin/node bject.type] | @tsv ue.number -trimpath /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/gh --show-toplevel J_/CWrYu2czG7Ca7rev-parse /usr/bin/infocmp--show-toplevel gh api /repos/actions/github-script/git/ref/tags/v9 --jq /opt/hostedtoolcache/go/1.25.8/x64/bin/node xterm-color ingutil.test /usr/bin/git node (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv bility_SameInputSameOutput1415741584/001/stability-test.md -trimpath ache/node/24.14.1/x64/bin/node -p github.com/githuapi -lang=go1.25 git-receive-pack--jq t-40�� k/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md -goversion /usr/bin/git -c=4 -nolocalimports -importcfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv :latest remote /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x--jq -o runs/20260504-143945-35061/test-3695926047 -trimpath /usr/bin/gh -p main -lang=go1.25 gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 go sv -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 git sv --get remote.origin.urrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /ref/tags/v9 epo}/actions/runrev-parse sv git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/pkGOINSECURE k/gh-aw/gh-aw/pkGOMOD 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcGO111MODULE -o _path=\(.*;\)\?\GOINSECURE -trimpath 64/bin/go -p github.com/charm--norc -lang=go1.24 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/pkGOINSECURE **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti-json /opt/hostedtoolcGO111MODULE -o /tmp/go-build406GOINSECURE -trimpath 64/bin/go -p github.com/githu--norc -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -c=4 -nolocalimports -importcfg /tmp/go-build3675513663/b394/importcfg -embedcfg /tmp/go-build3675513663/b394/embedcfg -pack env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9.0.0
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv pkg/mod/github.cGOINSECURE pkg/mod/github.cGOMOD 64/bin/go GOSUMDB GOWORK run-script/lib/n-json /opt/hostedtoolcGO111MODULE -o /tmp/go-build406GOINSECURE -trimpath 64/bin/go -p main -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv che/go-build/b4/GOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK run-script/lib/n-json /opt/hostedtoolcGO111MODULE -o race -trimpath 64/bin/go -p github.com/githurev-parse -lang=go1.25 go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9.0.0 --jq [.object.sha, .object.type] | @tsv prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/gh SameOutput141574git GO111MODULE e/git gh api /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/git g/stats/statvar.git g/stats/spec_tesrev-parse 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv 64/bin/go go /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260504-143945-35061/test-3695926047 resolved$ /usr/bin/git @{u} GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv xterm-color ache/go/1.25.8/x--jq /usr/bin/git -json GO111MODULE e/git-receive-pa--show-toplevel git rev-�� --show-toplevel (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 ache/node/24.14.1/x64/bin/node bject.type] | @tsv /tmp/TestGuardPogit config .test git rev-�� /ref/tags/v9 .test sv /tmp/gh-aw-test-infocmp url /opt/hostedtoolcxterm-color git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /tmp/go-build3675513663/b436/_pkg_.a -trimpath (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv image:v1.0.0 -trimpath /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu--limit -p github.com/githurev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -o s/test.md -importcfg /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -s -w -buildmode=exe /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url r,url,status,conclusion,workflowName,createdAt,s168.63.129.16 -json GO111MODULE 64/bin/go git remo�� GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git ub/workflows GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/aws-actions/configure-aws-credentials/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/TestGuardPogit 5513663/b460/_terev-parse /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git /tmp/go-build367gh -importcfg /usr/bin/infocmpstatus git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/aws-actions/configure-aws-credentials/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git /tmp/TestGuardPogh remote /opt/hostedtoolc/repos/actions/github-script/git/ref/tags/v9 git rev-�� /ref/tags/v9 node sv mpleWorkflow2702git l /usr/bin/git git (http block)
  • https://api.github.com/repos/azure/login/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --show-toplevel go ache/node/24.14.--show-toplevel git rev-�� --show-toplevel ache/node/24.14.1/x64/bin/node /usr/bin/gh /tmp/TestHashConinfocmp go ache/node/24.14.xterm-color gh (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv ithub-script/git/ref/tags/v9 ache/node/24.14.1/x64/bin/node bject.type] | @tsv ue.number -trimpath /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp /tmp/gh-aw-test-infocmp l /usr/bin/infocmpxterm-color infocmp (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git t0 GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a GO111MODULE r: $owner, name:xterm-color git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url /usr/bin/git -json GO111MODULE 64/bin/go git conf�� --get remote.origin.url /usr/bin/git ub/workflows GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv --get remote.origin.url /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-27 GOMOD GOMODCACHE yLNKNaz/um86pbnuaZfPHtRi8CIm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-04 GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-02-03 GOMOD GOMODCACHE go itcu�� -json GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1448723454 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 99706784 GO111MODULE k GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu^remote\..*\.gh-resolved$ env ger.test GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1234567890
    • Triggering command: /usr/bin/gh gh api repos/{owner}/{repo}/actions/runs/1234567890 --jq {databaseId: .id, number: .run_number, url: .html_url, status: .status, conclusion: .conclusion, workflowName: .name, workflowPath: .path, createdAt: .created_at, startedAt: .run_started_at, updatedAt: .updated_at, event: .event, headBranch: .head_branch, -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 1584/001/stabili--limit GO111MODULE ache/go/1.25.8/x--created GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE pjr0ytiJyPJea0aY4M/d4YC-sPlWkwuP--jq env -json GO111MODULE 8b8c43d2b1e0f9efe38db889975a7e052c2205316aff0f7aff33d79a7bcab282-d GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 99706784 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 1448723454 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE x2/zg1-jwF1IRoPasY5xy3c/9ezsDU_VWw7VJguVlRAx (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE util.test GOINSECURE GOMOD GOMODCACHE util.test 6755�� 1448723454 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env outil.test GO111MODULE ortcfg.link GOINSECURE GOMOD GOMODCACHE Q9JjIZREDlYiHWP_71/KDaUrle63TPPPS1tZJmA/SqW9rykM-test.v=true (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 /tmp/go-build3675513663/b457/importcfg -pack Ww7VJguVlRAx env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3675513663/b404/cli.test /tmp/go-build3675513663/b404/cli.test -test.testlogfile=/tmp/go-build3675513663/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true **/*.ts **/*.json --ignore-path go env -json GOCACHE 64/bin/go tierignore GO111MODULE 64/bin/go go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE ser.test GOINSECURE GOMOD GOMODCACHE ser.test 6755�� -json GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv 1833546360 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build3675513663/b463/importcfg -pack /tmp/go-build3675513663/b463/_testmain.go env ub/workflows GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ub/workflows GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/google-github-actions/auth/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git ons-test33695200git go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git /tmp/go-build367git -trimpath 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE outil.test GOINSECURE GOMOD GOMODCACHE outil.test 6755�� -json GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env 1559375669 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo -importcfg /tmp/go-build3675513663/b438/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/semverutil/semverutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/semverutil/semverutil_test.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/node/24.14.1/x64/bin/bash GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name /tmp/go-build406GOINSECURE -trimpath 64/bin/go -p github.com/githu-20 -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 1559375669 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3945-35061/test-4205572499/.github/workflows GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuother (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits May 4, 2026 14:34
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/50d02a1b-203a-470c-8858-cf3434479d2e

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…logs wording, init codespaces flag

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/50d02a1b-203a-470c-8858-cf3434479d2e

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CLI consistency issues in command help text fix: 4 CLI consistency issues in mcp, logs, and init commands May 4, 2026
Copilot AI requested a review from gh-aw-bot May 4, 2026 14:46
@pelikhan pelikhan marked this pull request as ready for review May 4, 2026 17:22
Copilot AI review requested due to automatic review settings May 4, 2026 17:22
@github-actions github-actions Bot mentioned this pull request May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses four CLI help/syntax consistency issues across the mcp, logs, and init commands, primarily aligning help text and argument/flag patterns.

Changes:

  • Standardizes mcp help text to refer to adding an MCP “server” (not “tool”) and updates mcp list-tools to take an optional [workflow] positional plus a required --server flag.
  • Tweaks logs --after example wording for consistency (“older than”).
  • Fixes init --codespaces help rendering by removing NoOptDefVal and updating examples to require an explicit value (including "").
Show a summary per file
File Description
pkg/cli/mcp.go Updates mcp --help subcommand bullet wording (“server” vs “tool”).
pkg/cli/mcp_list_tools.go Changes list-tools syntax to [workflow] + required --server; updates examples and completion behavior.
pkg/cli/mcp_list_tools_test.go Updates unit tests for new Use string and required --server flag presence.
pkg/cli/logs_command.go Adjusts --after help example wording to “older than …”.
pkg/cli/init_command.go Removes NoOptDefVal from --codespaces and updates help text/examples accordingly.
pkg/cli/init_command_test.go Updates tests to reflect --codespaces NoOptDefVal removal.
pkg/cli/completions_integration_test.go Updates completion integration tests for new mcp list-tools positional argument behavior.
.github/workflows/daily-model-inventory.lock.yml Adds shell(playwright-cli:*) to the Copilot CLI allow-tool list in the lock workflow.

Copilot's findings

Tip

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

  • Files reviewed: 8/8 changed files
  • Comments generated: 4

Comment thread pkg/cli/mcp_list_tools.go
Comment on lines 172 to 175
cmd := &cobra.Command{
Use: "list-tools <server> [workflow]",
Use: "list-tools [workflow]",
Short: "List available tools for a specific MCP server",
Long: `List available tools for a specific MCP server.
Comment thread pkg/cli/mcp_list_tools.go
Comment on lines 183 to 190
- A file path (e.g., "weekly-research.md" or ".github/workflows/weekly-research.md")

Examples:
gh aw mcp list-tools github # Find workflows with 'github' MCP server
gh aw mcp list-tools github weekly-research # List tools for 'github' server in weekly-research.md
gh aw mcp list-tools safe-outputs issue-triage # List tools for 'safe-outputs' server in issue-triage.md
gh aw mcp list-tools playwright test-workflow -v # Verbose output with tool descriptions
gh aw mcp list-tools --server github # Find workflows with 'github' MCP server
gh aw mcp list-tools weekly-research --server github # List tools for 'github' server in weekly-research.md
gh aw mcp list-tools issue-triage --server safe-outputs # List tools for 'safe-outputs' server in issue-triage.md
gh aw mcp list-tools test-workflow --server playwright -v # Verbose output with tool descriptions

Comment thread pkg/cli/completions_integration_test.go Outdated
Comment on lines 136 to 163
@@ -141,15 +155,16 @@ engine: copilot
t.Fatalf("Failed to write test workflow file: %v", err)
}

// Test completion for mcp list-tools second argument (workflow names after server name)
cmd := exec.Command(setup.binaryPath, "__complete", "mcp", "list-tools", "github", "")
// Test completion for mcp list-tools with workflow argument (only 1 positional arg allowed now)
cmd := exec.Command(setup.binaryPath, "__complete", "mcp", "list-tools", "test-mcp", "")
output, err := cmd.CombinedOutput()
// With only 1 positional arg allowed, second arg should show no completions
require.NoError(t, err, "CLI __complete command for mcp list-tools workflow failed: %s", string(output))

Comment thread pkg/cli/init_command.go
Comment on lines 114 to 118
cmd.Flags().StringP("engine", "e", "", "Override AI engine (copilot, claude, codex, gemini, crush)")
_ = cmd.Flags().MarkHidden("engine") // Hide the engine flag from help output (internal use only)
cmd.Flags().Bool("no-mcp", false, "Skip configuring gh-aw MCP server integration for GitHub Copilot Agent")
cmd.Flags().String("codespaces", "", "Create devcontainer.json for GitHub Codespaces with agentic workflows support. Specify comma-separated repository names in the same organization (e.g., repo1,repo2), or use without value for current repo only")
// NoOptDefVal allows using --codespaces without a value (returns empty string when no value provided)
cmd.Flags().Lookup("codespaces").NoOptDefVal = " "
cmd.Flags().String("codespaces", "", "Create devcontainer.json for GitHub Codespaces with agentic workflows support. Specify comma-separated repository names in the same organization (e.g., repo1,repo2), or use with empty value for current repo only")
cmd.Flags().Bool("completions", false, "Install shell completion for the detected shell (bash, zsh, fish, or PowerShell)")
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: 85/100

Excellent test quality

Metric Value
New/modified tests analyzed 4
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 2 (50%)
Duplicate test clusters 0
Test inflation detected No
🚨 Coding-guideline violations 0

Test Classification Details

View all test classifications
Test File Classification Issues Detected
TestCompletionMCPListToolsIntegration completions_integration_test.go:105 ✅ Design Minor: assert.Contains missing message arg
TestCompletionMCPListToolsServerFlagIntegration completions_integration_test.go:142 ✅ Design Edge case: verifies second positional arg rejected; assert.NotContains missing message arg
TestNewInitCommand init_command_test.go:66 ✅ Design Updated to match new flag contract (NoOptDefVal="")
TestNewMCPListToolsSubcommand mcp_list_tools_test.go:321 ✅ Design Verifies Use string and --server flag required annotation

Minor Notes

No flagged tests requiring review. Two minor style notes:

  1. assert.Contains(t, outputStr, "test-mcp") in TestCompletionMCPListToolsIntegration — missing a descriptive message argument (guideline: always pass a message to testify assertions). Consider: assert.Contains(t, outputStr, "test-mcp", "completion output should contain workflow name").

  2. assert.NotContains(t, outputStr, "test-mcp") in TestCompletionMCPListToolsServerFlagIntegration — same issue.

These are style notes only and do not affect the verdict.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 4 tests — integration (//go:build integration): 2 · unit (//go:build !integration): 2
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 4 modified tests verify observable CLI behavioral contracts: tab-completion output, flag definitions, and command interface signatures.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract.

References: §25332983964

🧪 Test quality analysis by Test Quality Sentinel · ● 779.1K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

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. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 4 modified tests enforce observable behavioral contracts.

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 4, 2026

@copillt review all comments

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 4, 2026

@copilot review all comments

… test rename, init comment

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3838de2e-8047-4180-8d77-0e0b08cbfe30

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 4, 2026

@copilot review all comments

Addressed all four review comments in ac72723:

  1. argument_syntax_test.go: Updated expected Use from "list-tools <server> [workflow]""list-tools [workflow]".
  2. findWorkflowsWithMCPServer hint: Updated hint from gh aw mcp list-tools <server> <workflow>gh aw mcp list-tools <workflow-name> --server <server>.
  3. Test rename: TestCompletionMCPListToolsServerFlagIntegrationTestCompletionMCPListToolsNoSecondPositionalArgIntegration with an accurate doc comment describing what it actually validates.
  4. Stale inline comment: Updated the "NoOptDefVal uses a space" comment to "explicit value required; use --codespaces \"\" for current repo only".

Copilot AI requested a review from pelikhan May 4, 2026 17:58
@pelikhan pelikhan merged commit 80b873c into main May 4, 2026
@pelikhan pelikhan deleted the copilot/fix-cli-consistency-issues branch May 4, 2026 17:59
Copilot AI added a commit that referenced this pull request May 4, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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-05-04

4 participants