Skip to content

Fix lint-go failure and enrich CGO failure issues with direct job links and expiration markers#28615

Merged
pelikhan merged 2 commits intomainfrom
copilot/cgo-fix-workflow-failure
Apr 26, 2026
Merged

Fix lint-go failure and enrich CGO failure issues with direct job links and expiration markers#28615
pelikhan merged 2 commits intomainfrom
copilot/cgo-fix-workflow-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

lint-go was failing due to testifylint requiring require.* for error assertions. Separately, CGO failure issues lacked direct links to failing jobs and the gh-aw-expires XML marker needed for automatic expiry.

Changes

pkg/gitutil/spec_test.go — fix testifylint violations

  • assert.NoErrorrequire.NoError at the two error-check sites flagged by testifylint

.github/workflows/cgo.yml — enrich notify-failure issue body

  • Direct job links: calls listJobsForWorkflowRun to resolve each failing job's html_url, rendering [`lint-go`](https://github.com/.../job/73090311811) instead of plain `lint-go`
  • XML expiration footer: appends the gh-aw-expires comment so the ephemeral cleanup system can auto-close the issue:
    > - [x] expires <!-- gh-aw-expires: 2026-04-26T21:01:21.519Z --> on Apr 26, 2026, 9:01 PM UTC
    
    Falls back to plain-text job name if a job ID cannot be resolved.

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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 8429372/b128/_pkg_.a nTLC/e3WDbj-6Hz_OhJqGnTLC cfg GOINSECURE /go-yaml/parser GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3318498997 GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg env 8429372/b212/_pkg_.a GO111MODULE cfg GOINSECURE nal/fips140tls GOMODCACHE ache/go/1.25.8/x12346 (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3318498997 GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env ChhS-MVF4 3cxW/IBlaqeSprCJhOYFQ3cxW ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuTest User (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 gh-aw.wasm ./cm-errorsas GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 /tmp/TestCollectWorkflowFiles_WithImports1085287626/001 rev-parse /usr/bin/git b/workflows GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/xTest User /usr/bin/git 8429372/b167/_pknode GO111MODULE k 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 1254-34156/test-877272334 x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/vet 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 1254-34156/test-3732183796/.github/workflows 79XR/6YQuLpx94_gDFryr79XR ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p 8429372/b202/importcfg -trimpath 64/pkg/tool/linux_amd64/link -I /tmp/go-build226rev-parse -I 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/compile /usr/bin/git DefaultBranchFrotr DefaultBranchFro\n ache/go/1.25.8/x: git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linumyorg /usr/bin/git /tmp/go-build226git k/gh-aw/gh-aw/pkrev-parse /opt/hostedtoolc--show-toplevel 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-upload-pack /usr/bin/git bility_SameInputgit go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git runs/20260426-17git show /usr/bin/git git (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 &#39;/tmp/TestParseDgo1.25.8 &#39;/tmp/TestParseD-c=4 /opt/hostedtoolc-nolocalimports -p github.com/githurev-parse -lang=go1.25 /opt/hostedtoolc/tmp/go-build716377726/b469/_testmain.go -ato�� architecture-guardian.md -buildtags /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.8/x-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv qOdVA88qG k/gh-aw/gh-aw/pkg/semverutil/semverutil_test.go ache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc rtcfg t-65�� g/typeutil/convert.go g/typeutil/convert_test.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -json act.go 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv 4NdI/8Q9GQkqehLXaA5BM4NdI (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 --show-toplevel ache/go/1.25.8/xremote /usr/bin/git /ref/tags/v9 -trimpath sv git rev-�� --show-toplevel e/git /usr/bin/git /tmp/go-build226git -trimpath 377726/b416/vet.--show-toplevel 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 -json son/json.go 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 api /repos/actions/github-script/git/ref/tags/v9 --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)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (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 --show-toplevel 64/pkg/tool/linu-trimpath /usr/bin/infocmp g_.a DfcRFzBGz 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linu.github/workflows/test.md /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet y_only_defaults_git cfg tants.test /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 /tmp/TestGuardPolicyTrustedUsersCompiledOutput769275179/001 rev-parse ache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/asm /usr/bin/git t-17�� k/gh-aw/gh-aw/.github/workflows/ace-editor.md ^remote\..*\.gh-resolved$ /usr/bin/git -json 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 --git-dir 64/pkg/tool/linu-trimpath /usr/bin/gh g_.a bbyq8rTOi 64/pkg/tool/linu--show-toplevel gh run download 3 /usr/bin/gh test-logs/run-3 GO111MODULE test gh (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 Y6rm/lQPve2iiN0sXNfGsY6rm =master /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p golang.org/x/texrev-parse -lang=go1.25 377726/b423/importcfg -ato�� licyMinIntegrityOnlymin-integrity_with_explicit_repo3112007904/001 k/gh-aw/gh-aw/pkg/gitutil/gitutil_test.go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv 1254-34156/test-1539054241 -trimpath _.a -p main -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -C 377726/b447/_pkg_.a rev-parse ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -c=4 -nolocalimports -importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ry=1 l e/git --detach GO111MODULE 64/bin/go e/git rev-�� --show-toplevel go /usr/bin/git cp .github/aw/acgit GO111MODULE x_amd64/compile /usr/bin/git (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 /tmp/gh-aw-test-runs/20260426-171254-34156/test-534874746/.github/workflows rev-parse /usr/bin/git 1891599709/001&#39; 1891599709/001&#39; x_amd64/compile git init�� GOMODCACHE x_amd64/compile 0&#34;}} -json 8601/parse.go layTitle git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv user.email ings.cjs n-dir/git user.name st/suppress-warnrun tions/setup/js/n/tmp/go-handler-test-5V2AT7/slow.go forks.js rev-�� HEAD st/suppress-warnings.cjs (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node $name) { hasDiscussionsEnabled } } user.email tions/setup/js/ncheckout k/node_modules/.-b git init�� -q (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node ndor/bin/git user.email tions/setup/js/n--experimental-import-meta-resolve es/.bin/node git init�� -q st/suppress-warn--conditions ache/node/24.14.development a2816ce9d25e66e7/usr/bin/gh e64d2b8e..HEAD /git st/dist/workers/-f (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch user.email test@example.com r: $owner, name: $name) { hasDiscussionsEnabled } } --require 1140f3bb1810fed5-C 18 1/x64/bin/node ve HEAD tions/setup/js/node_modules/viteowner=github r: $owner, name: $name) { hasDiscussionsEnabled } } -exist b2fa7d41a1a311d8-C ode-gyp-bin/git tions/setup/js/nshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch ithub/workflows -m ock.yml 1/x64/lib/node_mgit git n-dir/git go run ithub/workflows git repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } feature$(whoami)git mp modules/@npmcli//home/REDACTED/work/gh-aw/gh-aw go (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 -2343164471/base.md -2343164471/new.md /usr/bin/git itmain_branch162git itmain_branch162rev-parse 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/vet /usr/bin/git 2308044738/.githgit qrk06zUvD 64/pkg/tool/linu--show-toplevel 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 ithub/workflows/archie.md rev-parse /usr/bin/git yphen3902170220/git yphen3902170220/rev-parse x_amd64/asm git -C /tmp/gh-aw-test-runs/20260426-171254-34156/test--errorsas config om/owner/repo.git remote.origin.urgit GO111MODULE x_amd64/compile 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 --git-dir go /usr/bin/git -json GO111MODULE x_amd64/asm git rev-�� --show-toplevel x_amd64/asm /usr/bin/git -json /color.go x_amd64/compile git (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 EocudEgAi 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2393962522/.github/workflows GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linu-importcfg GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/typeutil/convert_test.go ortc�� 8429372/b137/_pkg_.a rg/x/text@v0.36.0/internal/language/compact/compact.go cfg GOINSECURE (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 b-AbBFuh- 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a GO111MODULE x_amd64/link GOINSECURE tdrain GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 JmzP4TwGo 64/pkg/tool/linux_amd64/compile GOINSECURE %H %ct %D (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 VGplouFzy 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE sY5xy3c/9ezsDU_VWw7VJguVlRAx env 3274038944 GO111MODULE cfg GOINSECURE onpins GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3318498997 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (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 n8hJV-ZkR 64/pkg/tool/linux_amd64/vet GOINSECURE HHu6JiQ2NciaV/T4init GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2393962522/.github/workflows GO111MODULE cfg GOINSECURE /unix GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 ASggpb24G 64/pkg/tool/linux_amd64/vet GOINSECURE 8429372/b013/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env ortcfg GO111MODULE cfg GOINSECURE hlite 8429372/b013/sym--git-dir ache/go/1.25.8/x64/pkg/tool/linuconfig (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 onpins.test GOINSECURE GOMOD GOMODCACHE onpins.test 1637�� 2393962522/.github/workflows om/modelcontextprotocol/go-sdk@v1.5.0/internal/mcpgodebug/mcpgodebug.go cfg GOINSECURE /execenv GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE test GOINSECURE 8429372/b013/ GOMODCACHE test 1637�� -json g/semverutil/semverutil.go cfg GOINSECURE 8429372/b092/ ache/go/1.25.8/x--show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-importcfg (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 tdrain.test (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE /atomic GOMODCACHE 64/pkg/tool/linux_amd64/compile ortc�� 3649329605 g/fileutil/fileutil.go k GOINSECURE util 8429372/b021/sym--show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-extld=gcc (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet ortc�� 8429372/b083/_pkg_.a om/modelcontextprotocol/go-sdk@v1.5.0/internal/xcontext/xcontext.go cfg GOINSECURE randutil GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE til.test GOINSECURE 8429372/b012/ GOMODCACHE til.test 1637�� 3649329605/custom/workflows in/yaml/v3@v3.0.4/apic.go cfg GOINSECURE GOMOD 8429372/b012/sym/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/ai-moderator.md ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 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 --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 64/pkg/tool/linux_amd64/vet env ortcfg GO111MODULE cfg GOINSECURE 8429372/b011/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build716377726/b404/cli.test /tmp/go-build716377726/b404/cli.test -test.testlogfile=/tmp/go-build716377726/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE g/sig_other.s (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 64/pkg/tool/linu^remote\..*\.gh-resolved$ /usr/bin/git _.a tmain.go ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git ithub/workflows 8429372/b235/emb-lh e/git git (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 8429372/b166/_pkg_.a OrxA/H0_eRK5a-bqX4Ap2OrxA cfg GOINSECURE fips140/rsa GOMODCACHE go env 2291/001/stability-test.md NED5/7tbAQfilcefdiXaaNED5 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuorigin (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 -json 1.5.0/internal/mcpgodebug/mcpgodebug.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE jsonrpc2 GOMODCACHE x_amd64/vet (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile 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 -json o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile byte�� Gitmain_branch1629408041/001&#39; Gitmain_branch1629408041/001&#39; x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE 4-oiIa1/9KqfPfOCpIDAkxslPM8J env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 11/001/test-empty-frontmatter.md GO111MODULE rtcfg.link GOINSECURE GOMOD 8429372/b047/sym--show-toplevel 9Ym34G_sfJyM6o-Ioz/mT-tLcfK0hMgkSLlQ1ZG/V_z3kiodconfig env -json SK0W/BJGJRDpSI4wKt0zQSK0W _.a GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x12345 (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 fips140/alias GOMODCACHE ache/go/1.25.8/x-tests env 8429372/b093/_pkg_.a 3oGe/PFmiX04DWzK7JGiP3oGe cfg 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 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json a x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state x_amd64/link GOINSECURE tdrain GOMODCACHE x_amd64/link env 1254-34156/test-add-source-path--test.timeout=10m0s GO111MODULE ow.lock.yml GOINSECURE g/x/crypto/chach-1 ache/go/1.25.8/xxterm-color g2/XhJDf54YAm-TVRIQEcng/1ndInNVr0Ji0fapdNGIB (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 -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch -json g/semverutil/semverutil.go cfg GOINSECURE 8429372/b092/ ache/go/1.25.8/x--show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-importcfg ranc�� 8429372/b250/_pkg_.a GO111MODULE x_amd64/link GOINSECURE b/gh-aw/pkg/acti-1 ache/go/1.25.8/xxterm-color x_amd64/link (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� ndor/bin/git git ode_modules/.bin/git =receive test@example.com--git-dir=/tmp/bare-incremental-FAzy3W /git (dns block)

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

…ailure issues

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/95962bd0-20f1-49c8-a58d-637aa18b47ee

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CGO workflow failure by updating failing job links Fix lint-go failure and enrich CGO failure issues with direct job links and expiration markers Apr 26, 2026
Copilot AI requested a review from pelikhan April 26, 2026 17:21
@pelikhan pelikhan marked this pull request as ready for review April 26, 2026 17:28
Copilot AI review requested due to automatic review settings April 26, 2026 17:28
@pelikhan pelikhan merged commit 7042dd2 into main Apr 26, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/cgo-fix-workflow-failure branch April 26, 2026 17:28
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

Fixes Go linting failures by aligning error assertions with testifylint expectations, and enhances CGO failure issue reporting to include direct failing job links and an expiry marker; additionally updates generated docs and the agent factory status page.

Changes:

  • Updated Go tests to use require.NoError where an error is required for subsequent assertions.
  • Enhanced CGO notify-failure issue creation to attempt to resolve failing job html_urls and append a gh-aw-expires marker.
  • Updated docs: expanded deployment_status reference example content and added “Deployment Incident Monitor” to the status table.
Show a summary per file
File Description
pkg/gitutil/spec_test.go Switches targeted assert.NoError calls to require.NoError to satisfy testifylint.
.github/workflows/cgo.yml Adds job lookup + job-link rendering and an expiry footer line to CGO failure issues.
docs/src/content/docs/reference/frontmatter-full.md Updates generated schema-derived YAML examples and text.
docs/src/content/docs/agent-factory-status.mdx Adds “Deployment Incident Monitor” workflow to the published status list.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

docs/src/content/docs/reference/frontmatter-full.md:4790

  • This change introduces UK spelling (“customise”) in the generated reference, but the rest of the docs predominantly use US spelling (“customize”). For consistency across the documentation set, consider updating the source schema text so the generated output uses “customize”.
    # fallback-to-issue. Object form: { policy, exclude } to customise the
  • Files reviewed: 4/4 changed files
  • Comments generated: 7

Comment thread .github/workflows/cgo.yml
Comment on lines 1718 to +1766
const failedJobs = Object.entries(needs)
.filter(([, job]) => job.result === 'failure')
.map(([name]) => name);

if (failedJobs.length === 0) {
core.info('No jobs failed. Nothing to do.');
return;
}

core.info(`Failed jobs: ${failedJobs.join(', ')}`);

// Check for an existing open CGO failure issue to avoid duplicates
const existingIssues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'cgo-failure',
state: 'open',
});

if (existingIssues.data.length > 0) {
core.info(`Existing CGO failure issue #${existingIssues.data[0].number} is still open. Skipping.`);
return;
}

// Ensure required labels exist, creating them if missing
for (const [label, color] of [['cookie', 'e4e669'], ['cgo-failure', 'b60205']]) {
try {
await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label });
} catch (e) {
if (e.status === 404) {
await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label, color });
}
}
}

// Fetch all jobs for this run to get direct job links
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});

// Build a map from job name to job URL for failed jobs
const jobUrlMap = {};
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

failedJobs is derived from needs keys (job IDs), but listJobsForWorkflowRun returns per-job entries whose name is the display name (and matrix-expanded names). For jobs with a custom name: or matrix jobs (e.g. cross-platform-build uses name: Build & Test on ...), failedJobs.includes(job.name) will never match, so links will be missing even when a failing job URL exists. Consider building the failed-job list directly from jobsResponse.data.jobs (filter by conclusion === 'failure') or introduce a mapping strategy that handles custom/matrix job names.

Copilot uses AI. Check for mistakes.
Comment on lines 484 to +495
deployment_status:
{}
# Filter to specific deployment states (compiled into if condition). Use a string
# for one state or an array for multiple states.
# (optional)
# This field supports multiple formats (oneOf):

# Option 1: string
state: "error"

# Option 2: array
state: []
# Array items: string
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

The deployment_status YAML example is not valid YAML because it repeats the state key twice in the same mapping. Also, the array example uses an empty array (state: []), but the schema requires at least one item (minItems: 1). Adjust the example/generator to show the two oneOf options without duplicate keys (e.g., separate example blocks or commented alternatives) and use a non-empty array example.

See below for a potential fix:

  # Option 2: object with string state
  deployment_status:
    # Filter to specific deployment states (compiled into if condition). Use a string
    # for one state or an array for multiple states.
    # (optional)
    state: "error"

  # Option 3: object with array state
  deployment_status:
    # Filter to specific deployment states (compiled into if condition). Use a string
    # for one state or an array for multiple states.
    # (optional)
    state:
      # Array items: string
      - "error"
      - "failure"

Copilot uses AI. Check for mistakes.

# Controls protected-file protection. String form: blocked (default), allowed, or
# fallback-to-issue. Object form: { policy, exclude } to customize the
# fallback-to-issue. Object form: { policy, exclude } to customise the
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

This change introduces UK spelling (“customise”) in the generated reference, but the rest of the docs predominantly use US spelling (“customize”). For consistency across the documentation set, consider updating the source schema text so the generated output uses “customize”.

This issue also appears on line 4790 of the same file.

Suggested change
# fallback-to-issue. Object form: { policy, exclude } to customise the
# fallback-to-issue. Object form: { policy, exclude } to customize the

Copilot uses AI. Check for mistakes.
# (optional)
defaults:
# Behavior when no files match: 'error' (default) or 'ignore'
# Behaviour when no files match: 'error' (default) or 'ignore'
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

This line uses UK spelling (“Behaviour”) while the same document (and most other docs) use “Behavior”. For consistency, update the source schema/generator text to use a single spelling variant across the docs.

Suggested change
# Behaviour when no files match: 'error' (default) or 'ignore'
# Behavior when no files match: 'error' (default) or 'ignore'

Copilot uses AI. Check for mistakes.
Comment on lines 482 to +495

# Option 2: object
deployment_status:
{}
# Filter to specific deployment states (compiled into if condition). Use a string
# for one state or an array for multiple states.
# (optional)
# This field supports multiple formats (oneOf):

# Option 1: string
state: "error"

# Option 2: array
state: []
# Array items: string
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

The PR description focuses on lint-go/CGO workflow changes, but this PR also changes generated documentation content in frontmatter-full.md and the workflow status page. Please either update the PR description to mention the docs updates (and why they’re needed) or split them into a separate PR to keep the change intent clear.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/cgo.yml
Comment on lines +1753 to +1767
// Fetch all jobs for this run to get direct job links
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});

// Build a map from job name to job URL for failed jobs
const jobUrlMap = {};
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

github.rest.actions.listJobsForWorkflowRun requires the actions: read permission, but this job sets permissions to only issues: write. As written, this API call will fail (403) and the notify step will error. Add actions: read to the notify-failure job permissions (and keep issues: write).

Suggested change
// Fetch all jobs for this run to get direct job links
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});
// Build a map from job name to job URL for failed jobs
const jobUrlMap = {};
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
}
// The notify job may not have `actions: read`, so avoid the Actions API here.
// Failed jobs will be listed by name, and the workflow run link below remains available.
const jobUrlMap = {};

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/cgo.yml
Comment on lines +1754 to +1766
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});

// Build a map from job name to job URL for failed jobs
const jobUrlMap = {};
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

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

The workflow currently assumes listJobsForWorkflowRun will always succeed. If that REST call fails (permissions, transient GitHub API failure, pagination edge cases), the script will throw and no failure issue gets created. Wrap the job-list fetch/build in a try/catch and fall back to rendering plain job names (or the run URL) when job URLs can't be resolved.

Suggested change
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});
// Build a map from job name to job URL for failed jobs
const jobUrlMap = {};
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
const jobUrlMap = {};
try {
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});
// Build a map from job name to job URL for failed jobs
for (const job of jobsResponse.data.jobs) {
if (failedJobs.includes(job.name)) {
jobUrlMap[job.name] = job.html_url;
}
}
} catch (e) {
core.warning(`Unable to resolve direct job links for workflow run ${context.runId}; falling back to plain job names. ${e.message}`);

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 95/100

Excellent test quality

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

Test Classification Details

Test File Classification Issues Detected
TestSpec_PublicAPI_FindGitRoot pkg/gitutil/spec_test.go:275 ✅ Design None — assert.NoErrorrequire.NoError for critical setup step
TestSpec_PublicAPI_ReadFileFromHEADWithRoot pkg/gitutil/spec_test.go:296 ✅ Design None — assert.NoErrorrequire.NoError for critical setup step

Analysis Summary

The test changes in this PR are a quality improvement: two assert.NoError calls on setup steps were upgraded to require.NoError. This is correct per the project guideline — require.* stops the test immediately if setup fails, preventing misleading downstream assertion failures. No new tests were introduced; the existing tests already cover behavioral contracts with table-driven test cases and proper assertion messages.

The -5 pts deduction reflects the minor note that the test file gained 3 lines while the production file (spec.go) gained none — technically an infinite ratio — but this is clearly a quality fix, not inflation, so only a minimal deduction is applied.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 2 modified sub-tests — unit (//go:build !integration)

Verdict

Check passed. 0% of new/modified tests are implementation tests (threshold: 30%). The changes improve test correctness by applying the require vs assert discipline correctly.


📖 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

References: §24962677667

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

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: 95/100. Test quality is excellent — 0% of new/modified tests are implementation tests (threshold: 30%). The changes correctly apply require.NoError for setup assertions per project guidelines.

@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
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.

[CGO] Workflow failure on main - Run #1540

3 participants