Skip to content

Refactor main_entry integration tests to idiomatic testify assertions#31259

Merged
pelikhan merged 2 commits into
mainfrom
copilot/improve-test-quality-main-entry-test
May 9, 2026
Merged

Refactor main_entry integration tests to idiomatic testify assertions#31259
pelikhan merged 2 commits into
mainfrom
copilot/improve-test-quality-main-entry-test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

cmd/gh-aw/main_entry_test.go relied entirely on manual if checks with t.Error*/t.Fatal*, making failures noisy and inconsistent with repository test conventions. This PR converts the file to testify assertions while preserving existing test behavior and coverage intent.

  • Assertion framework adoption

    • Added assert and require imports from github.com/stretchr/testify.
    • Replaced manual error/result checks across all top-level tests and subtests.
  • Gating vs validation semantics

    • Applied require.* where execution must stop on failure (e.g., command lookup, command execution, type assertions needed for follow-on checks).
    • Applied assert.* for behavioral/output validations to keep multi-check subtests informative.
  • Readability and failure signal quality

    • Replaced string/manual condition checks with typed assertions (Contains, NotEmpty, NotNil, Equal, Error, NoError, etc.).
    • Added descriptive assertion messages to improve triage context without changing test logic.
mcpCmd, _, _ := rootCmd.Find([]string{"mcp"})
require.NotNil(t, mcpCmd, "mcp command should be found")

inspectCmd, _, _ := mcpCmd.Find([]string{"inspect"})
require.NotNil(t, inspectCmd, "mcp inspect command should be found")

assert.NotEmpty(t, inspectCmd.Use, "mcp inspect command should have usage text")
assert.NotEmpty(t, inspectCmd.Short, "mcp inspect command should have a short description")

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 + "/" + .name _modules/.bin/sh (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name 64/pkg/tool/linux_amd64/vet (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 (http block)
  • https://api.github.com/orgs/owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/owner/actions/secrets --jq .secrets[].name on' --ignore-path ../../../.pret.prettierignore (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/owner/actions/secrets --jq .secrets[].name ath ../../../.pr**/*.json ache/go/1.25.8/x--ignore-path bject.type] | @t../../../.prettierignore 3913-15326/test-sh 5150867/b269/vet-c 5150867/b070/gh-"prettier" --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path ../../../.prettierignore node er ../pkg/workflow/js/**/*.json' --ignore-path ../../../.prettierignore --package-lock-only n-dir/node t0 /tmp/go-build415init 1/x64/bin/node git (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 on' --ignore-path ../../../.prettierignore (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name th .prettierigno--ignore-path ache/go/1.25.8/x.prettierignore ode_modules/.bin--log-level=error 3913-15326/test-sh (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 -unreachable=false /tmp/go-build4155150867/b068/vet.cfg Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv te '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path ../../../.prettieriggh infocmp /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ignore-path ../.gh 64/pkg/tool/linuapi bject.type] | @t/repos/actions/github-script/git/ref/tags/v9 /opt/hostedtoolc--jq -V=f�� 64/pkg/tool/linu"prettier" --write '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.pretgh infocmp ache/node/24.14.1/x64/bin/node ithub-script/gitinfocmp 64/pkg/tool/linu-1 (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 354352947 5150867/b118/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv *.json' '!../../../pkg/workflow/js/**/*.json' ---errorsas /usr/bin/git ache/node/24.14.1/x64/bin/node --get-regexp epo}/actions/runapi /usr/bin/gh node ache�� 4128-25239/test-add-source-path-1084638565/.github/workflows **/*.cjs ache/node/24.14.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh **/*.json --ignore-path ../../../.prettixterm-color sh (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 77/001/test-complex-frontmatter-with-tools.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv 162405424/001 /tmp/go-build4155150867/b212/vet.cfg ache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 (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 se 5150867/b024/vet.cfg 64/pkg/tool/linux_amd64/compile ./../.prettieriggit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv g_.a 5150867/b029/vetnonexistent-workflow-ci-test-67890 64/pkg/tool/linu--limit ./../.prettieriginfocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv se 5150867/b027/vet.cfg ache/go/1.25.8/x64/pkg/tool/linu-test.short=true ./../.prettieriginfocmp (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 s,@VERSION@,8.3, (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv 4128-25239/test-1432369612 infocmp /usr/bin/git ithub-script/gitgit 64/pkg/tool/linurev-list bject.type] | @t--count git -C runs/20260509-184128-25239/test-2641486020 show kflows/test-no-expires.lock.yml ignore-path ../.infocmp ache/go/1.25.8/x-1 /usr/bin/infocmpxterm-color node (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv 1626173993/001' 1626173993/001' cal/bin/git r (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv th .prettierigno-errorsas (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 (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 TOKEN"; }; f store TOKEN"; }; f store de/node/bin/git (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 -c=4 -nolocalimports -importcfg /tmp/go-build4155150867/b398/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/actionpins/spec_test.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 Onlyrepos_only_without_min-integrity4148944734/0-errorsas ../../../**/*.json ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile --ignore-path ../../../.pretti-1 name, workflowPaxterm-color ache/go/1.25.8/x64/pkg/tool/linu1 -uns�� 5150867/b428/_pkg_.a /tmp/go-build4155150867/b055/vetREDACTED Name,createdAt,startedAt,updated/tmp/gh-aw-git-clone-1680708482 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv "prettier" --write '../../../**/*.json' '!../../../pkg/workflow/!../../../pkg/workflow/js/**/*.jgh git rgo/bin/sh rror myorg r /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -V=f�� /ref/tags/v9 /usr/bin/git sv ithub-script/gitinfocmp x_amd64/link bject.type] | @txterm-color /bin/sh (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 log.showsignature=false log k -n1 s $k => $v) echodocker-cli-plugin-metadata --end-of-options ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet sRem�� --write **/*.cjs 64/pkg/tool/linux_amd64/link **/*.json --ignore-path ../../../.prettixterm-color 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv vaScript3319690877/001/test-frontmatter-with-arr-test.timeout=10m0s ../../../**/*.json r: $owner, name: $name) { hasDiscussionsEnabled } } --ignore-path ../../../.pretti-1 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv 5150867/b395/embedcfg /tmp/go-build4155150867/b222/vetowner=github (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 g_.a 5150867/b025/vetnonexistent-workflow-test-12345 ache/go/1.25.8/x--limit ./../.prettieriggit tdrain_test (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv se 5150867/b031/vet.cfg .cfg ./../.prettieriginfocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv se 5150867/b036/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet ./../.prettieriginfocmp (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 se 5150867/b041/vet.cfg 64/pkg/tool/linux_amd64/vet ./../.prettieriginfocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv .js' --ignore-path .prettierignoremote.origin.url ache/node/24.14.--jq /usr/bin/gcc .md md /opt/hostedtoolcxterm-color gcc tion�� -x c 1/x64/bin/node ignore resolved$ /opt/hostedtoolcprintf '%s' "$1" node (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 341291223 /tmp/go-build4155150867/b268/vetowner=github 1/x64/bin/node (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 -bool -buildtags ache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc /opt/hostedtoolc--package-lock-only t-18�� bility_SameInputSameOutput3044595373/001/stability-test.md -trimpath 5150867/b436/vet.cfg -p github.com/aymanbranch -lang=go1.24 /tmp/go-build4155150867/b433/log--jq (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 --write **/*.cjs /opt/hostedtoolcache/uv/0.11.12/x86_64/node **/*.json --ignore-path ../../../.prettixterm-color node /hom�� 037/001 scripts/**/*.js ache/node/24.14.1/x64/bin/node .prettierignore --log-level=erro-c (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 runs/20260509-183913-15326/test-3213582010/.github/workflows -buildtags ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile l -ifaceassert -nilfunc ache/go/1.25.8/x--package-lock-only -ato�� 5150867/b464/_pkg_.a -buildtags ache/node/24.14.1/x64/bin/node -errorsas b/gh-aw/pkg/timemaintenance -nilfunc git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/azure/login/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv prettier --write 0698569/b395/vet.cfg =receive **/*.json --ignore-path (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 -bool -buildtags ache/go/1.25.8/x64/pkg/tool/linux_amd64/link -errorsas -ifaceassert -nilfunc ache/go/1.25.8/x--package-lock-only -ato�� 5150867/b458/testutil.test -buildtags 5150867/b458/importcfg.link -errorsas -ifaceassert -nilfunc m2xpu7MOJIw7R/iLX4908EimRzvG1AHI--jq (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv 3 --write 0698569/b307/vet.cfg **/*.ts **/*.json --ignore-path npm run 95358434/001 --silent ache/node/24.14.1/x64/bin/node l -tests bject.type] | @t. ache/node/24.14.1/x64/bin/node (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 rt.go rt_test.go 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv s --write .cfg !../../../pkg/woinfocmp --ignore-path erignore /home/REDACTED/.cache/go-build/b8/b86a14ccc6aa3ea6remote.origin.url vers�� RequiresMinIntegrity1973788765/001 /usr/bin/git ache/node/24.14.1/x64/bin/node ignore-path ../.infocmp x_amd64/vet bject.type] | @txterm-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 sole.test (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv 2835331200/.github/workflows on 64/pkg/tool/linux_amd64/link /../../.prettierinfocmp erignore .cfg 64/pkg/tool/linux_amd64/link -c npx prettier --write '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json git 1/x64/bin/node --get remote.origin.urapi 5150867/b475/wor/repos/actions/github-script/git/ref/tags/v9 sh (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 2052938262 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv agent-performance-analyzer.md on 64/pkg/tool/linux_amd64/vet /../../.prettiergh erignore sv 64/pkg/tool/linu--json -c npx prettier --w--workflow node k/gh-aw/gh-aw/no--limit tOrdering9423523infocmp x_amd64/vet sv sh (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 >=2026-05-02 (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 >=2026-04-09 (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 >=2026-02-08 (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 credential.username 64/pkg/tool/linux_amd64/vet nore fflib (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 b3e165d14978af23-nolocalimports 64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name --jq bin/node mpleWorkflow2321infocmp master /usr/bin/gh erignore ache�� */*.ts' '**/*.json' --ignore-path ../../../.pret.prettierignore --jq nfig/composer/vendor/bin/bash /ref/tags/v9 --jq sv gh (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 .cfg 64/pkg/tool/linux_amd64/vet nore (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 .cfg x_amd64/compile nore (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name --jq de_modules/.bin/sh k/gh-aw/gh-aw/pkgh k/gh-aw/gh-aw/pkapi logs/runs.json"}/repos/actions/github-script/git/ref/tags/v9 gh m/_n�� */*.ts' '**/*.json' --ignore-path ../../../.prettierignore --jq h /ref/tags/v9 r sv gh (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, (http block)
    • 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, h4048599349/001' h4048599349/001' modules/@npmcli/run-script/lib/node-gyp-bin/sh g_.a (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 .cfg 64/pkg/tool/linux_amd64/vet nore (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg x_amd64/compile nore (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name 5150867/b449/importcfg ules/.bin/sh Uuyq/QFLXdVYlLIMinfocmp l 0"}} 12/ILkTkPCl1Nvk0PE6keAb/DRhAh3BPremote.origin.url m/_n�� */*.ts' '**/*.json' --ignore-path ../../../.prettierignore 5150867/b467/imp--jq 728fc56bc7765e1bc14bf329cfc05061f50a5190689b416e-d k/gh-aw/gh-aw/pk/usr/bin/git r /opt/hostedtoolc-v infocmp (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 credential.username 64/pkg/tool/linux_amd64/vet nore (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 .cfg 64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name /bin/sh 64/bin/sh /ref/tags/v9 (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 .cfg 64/pkg/tool/linux_amd64/vet nore (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 .cfg 64/pkg/tool/linu-nolocalimports (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name /usr/lib/git-core/git de/node/bin/sh --all-progress-igit l /opt/hostedtoolcuser.name erignore -1 */*.ts' '**/*.json' --ignore-patremote.origin.url node tions/setup/js/node_modules/.bin/node /tmp/TestHashCongit s/test.md /usr/bin/git infocmp (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 credential.username 64/pkg/tool/linux_amd64/vet nore (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 user.email 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name --jq 1/x64/bin/sh k/gh-aw/gh-aw/.ggit (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 credential.username 64/pkg/tool/linux_amd64/vet nore rt/yaml (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 .cfg 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name --jq k/gh-aw/gh-aw/actions/setup/node_modules/.bin/sh--ignore-path workflow/data/acgit -q /usr/bin/git erignore api mLsRemoteWithRealGitcustom_branch2772241186/001' mLsRemoteWithRealGitcustom_branch2772241186/001' tions/setup/node_modules/.bin/node /ref/tags/v9 config sv gh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -c=4 -nolocalimports -importcfg /tmp/go-build4155150867/b432/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/doc.go /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/logger.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 (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 (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build4155150867/b405/cli.test /tmp/go-build4155150867/b405/cli.test -test.testlogfile=/tmp/go-build4155150867/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
    • Triggering command: /tmp/go-build1980698569/b405/cli.test /tmp/go-build1980698569/b405/cli.test -test.testlogfile=/tmp/go-build1980698569/b405/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true /ref/tags/v9.0.0sh 5150867/b049/vet-c sv infocmp ode_�� ithub-script/git/ref/tags/v9 ache/go/1.25.8/x--jq bject.type] | @tsv (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 sistency_GoAndJavaScript3319690877/001/test-frontmatter-with-env-template-expressions.md 5150867/b405/_testmain.go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.8/x--jq -o runs/20260509-183913-15326/test-3027447179 -importcfg kflows/test-expires.lock.yml -s -w -buildmode=exe git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv mplied **/*.cjs 0698569/b461/vet.cfg ntent.md set ../../../.pretti: sh -c licyBlockedUsersCommaSeparatedCompiledOutput2573000925/001 infocmp (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 LsRemoteWithRealGitcustom_branch1626173993/001' LsRemoteWithRealGitcustom_branch1626173993/001' x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv re --log-level=error ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile sv SameOutput304459/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /tmp/go-build415-atomic ache/go/1.25.8/x-bool basename /pre�� (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv '**/*.ts' '**/*.remote.origin.url --quiet bject.type] | @tsv riBS/wpOGCmpr1dcgh -buildtags "warnings":[]}] infocmp -1 .js' --ignore-pa--repo ache/go/1.25.8/xowner/repo tions/setup/node_modules/.bin/node 999 5150867/b419/_teapi /opt/hostedtoolc/repos/actions/github-script/git/ref/tags/v9 infocmp (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 (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-build4155150867/b462/importcfg -pack /tmp/go-build4155150867/b462/_testmain.go tion�� --local --get 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 '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json ..feature-branch ode_modules/.bin/sh '/tmp/TestParseD/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet '/tmp/TestParseD-atomic 5150867/b444/sem-bool gh api Gitmaster_branch-errorsas Gitmaster_branch-ifaceassert sh t0 -buildtags ache/go/1.25.8/x/tmp/compile-all-instructions-test-706762767 gh (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json /opt/hostedtoolcache/go/1.25.8/xcurrent (local c--ignore-path ode '/tmp/TestParsegh '/tmp/TestParseapi 1/x64/bin/node gh 8d51�� : .head_branch, lGitmaster_branch4048599349/001' odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh == 'true' -buildtags ache/go/1.25.8/x/repos/actions/github-script/git/ref/tags/v9 gh (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 341291223 l (http block)
    • Triggering command: /usr/bin/gh gh api /repos/google-github-actions/auth/git/ref/tags/v2 --jq [.object.sha, .object.type] | @tsv prettier --write /opt/hostedtoolcache/node/24.14.1/x64/bin/node (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 te 'scripts/**/*.js' --ignore-pa-errorsas .cfg 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv /ref/tags/v9 ache/go/1.25.8/x64/pkg/tool/linu^remote\..*\.gh-resolved$ tions/setup/node_modules/.bin/sh st-3983830049/.gnode /tmp/go-build415/tmp/js-hash-test-3877212064/test-hash.js (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 (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion /ref/tags/v9 k/gh-aw/gh-aw/pkremote ode-gyp-bin/nodeadd infocmp -1 .js' --ignore-path .prettierignore --log-level=error /tmp/go-build415--jq tions/setup/node_modules/.bin/node -test.paniconexiinfocmp -test.v=true /opt/hostedtoolcxterm-color make (http block)
  • https://api.github.com/repos/owner/repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/owner/repo/actions/secrets --jq .secrets[].name on' --ignore-path ../../../.pret.prettierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/owner/repo/actions/secrets --jq .secrets[].name ath ../../../.pr**/*.json ache/go/1.25.8/x--ignore-path er npx prettier --wsh (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-build4155150867/b440/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/repoutil/repoutil_test.go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo -importcfg /tmp/go-build4155150867/b435/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/example_test.go /home/REDACTED/work/gh-aw/gh-aw/pkg/logger/spec_test.go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state 64/pkg/tool/linu-importcfg (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 on' --ignore-patgo1.25.8 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name ath ../../../.pr**/*.json (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --local core.hooksPath 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch */*.json' '!../.--limit /opt/hostedtoolc100 $name) { hasDiscussionsEnabled } } -bool -buildtags /usr/bin/git 64/pkg/tool/linu12345 /opt�� prettier --write k/gh-aw/gh-aw/node_modules/.bin/sh nore **/*.json --ignore-path node (http block)

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

Copilot AI changed the title [WIP] Improve test quality in cmd/gh-aw/main_entry_test.go Refactor main_entry integration tests to idiomatic testify assertions May 9, 2026
Copilot AI requested a review from gh-aw-bot May 9, 2026 18:43
@pelikhan pelikhan marked this pull request as ready for review May 9, 2026 19:01
Copilot AI review requested due to automatic review settings May 9, 2026 19:01
@pelikhan pelikhan merged commit 351148f into main May 9, 2026
@pelikhan pelikhan deleted the copilot/improve-test-quality-main-entry-test branch May 9, 2026 19:01
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

Refactors cmd/gh-aw/main_entry_test.go integration tests to use idiomatic testify assert/require APIs instead of manual if checks, aiming to improve consistency and failure readability while preserving existing behavior.

Changes:

  • Added testify/assert and testify/require imports for assertion-based testing.
  • Replaced manual t.Error*/t.Fatal* conditionals with assert.*/require.* across top-level tests and subtests.
  • Clarified gating vs. validation by using require for prerequisites and assert for output/behavior checks.
Show a summary per file
File Description
cmd/gh-aw/main_entry_test.go Converts integration tests to testify assertions for clearer, more consistent test failures.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

if r := recover(); r != nil {
t.Errorf("init() panicked: %v", r)
}
assert.Nil(t, recover(), "init() should not panic")
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.

[testify-expert] Improve Test Quality: cmd/gh-aw/main_entry_test.go

4 participants