Skip to content

Fix integration test: check run_ids_or_urls (plural) in audit error envelope#28519

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-integration-cli-mcp-other
Apr 25, 2026
Merged

Fix integration test: check run_ids_or_urls (plural) in audit error envelope#28519
pelikhan merged 2 commits intomainfrom
copilot/fix-integration-cli-mcp-other

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

The integration test TestMCPServer_ErrorCodes_InternalError/audit_invalid_run_id_returns_json was failing because it asserted the presence of run_id_or_url (singular) in the audit tool's JSON error envelope, but the implementation returns run_ids_or_urls (plural).

Change

  • pkg/cli/mcp_server_error_codes_test.go: Update assertion to check for run_ids_or_urls to match the actual error envelope shape produced by registerAuditTool:
// Before
if _, hasRunID := envelope["run_id_or_url"]; !hasRunID { ... }

// After
if _, hasRunID := envelope["run_ids_or_urls"]; !hasRunID { ... }

The implementation in mcp_tools_privileged.go always normalises input (including the deprecated singular run_id_or_url field) into a []string and returns it under run_ids_or_urls in error envelopes. The test was never updated when the field was renamed.

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 fg GOINSECURE hpke GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3251326234 fg x_amd64/link GOINSECURE b/gh-aw/tmp GOMODCACHE x_amd64/link 3091�� rutil.test pkg/mod/github.com/goccy/go-yaml-w x_amd64/vet -p internal/runtimeremote -lang=go1.25 x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 3251326234 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu--limit GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xremote.origin.url (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 --show-toplevel 64/pkg/tool/linuother /usr/bin/git mpiledOutput1869git wDwi/8TvZlM4P0nfrev-parse x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git 88985/b398/_pkg_node RS1g/SSt3JQqVRjk/opt/hostedtoolcache/node/24.14.1/x64/bin/npm fg 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 uts.branch -trimpath /usr/bin/git -p main -lang=go1.25 git conf�� --get remote.origin.url (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 se 88985/b251/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p github.com/segme--version -lang=go1.17 ache/go/1.25.8/x64/pkg/tool/linuremote1 -o 2720-34053/test-2835980967 -trimpath /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 -p main -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuconfig /usr/bin/git 3091110/b226/imptr -trimpath ache/go/1.25.8/x: git rev-�� --show-toplevel ache/go/1.25.8/x12345 /usr/bin/git ApprovalLabelsCogit -trimpath 64/pkg/tool/linu--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 88985/b459/tty.test /usr/bin/git t0 git-receive-packrev-parse ache/node/24.14.--show-toplevel git rev-�� --show-toplevel git /usr/bin/git k/gh-aw/gh-aw/.ggit config /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 /tmp/TestGuardPolicyMinIntegrityOnlymin-integrity_with_repos_array_c3723395152/001 config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/compile git -C /tmp/gh-aw-test-runs/20260425-232720-34053/test-1089127592/custom/workflows rev-parse /usr/bin/git -json GO111MODULE x_amd64/vet 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 --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 88985/b406/_pkg_bash /tmp/go-build185/tmp/gh-aw-test-runs/20260425-232737-36698/test-patch-priority-21948�� 64/pkg/tool/linux_amd64/compile git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git .a /tmp/go-build185rev-parse /opt/hostedtoolc--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 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json /context.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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/linux_amd64/vet /usr/bin/gh -json om/segmentio/encrev-parse 64/pkg/tool/linu--show-toplevel gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts /usr/bin/gh .artifacts[].namgit fg .test gh (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 k/gh-aw/gh-aw/pkg/cli rev-parse /usr/bin/git -json g/catmsg.go x_amd64/compile git -C ansitiveImports2735927877/001 l /usr/bin/git -json GO111MODULE x_amd64/vet 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/linux_amd64/vet /usr/bin/gh hub/workflows GO111MODULE 64/pkg/tool/linu--show-toplevel gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts /usr/bin/gh .artifacts[].namgit fg 64/pkg/tool/linu--show-toplevel gh (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 88985/b113/vet.cfg /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/compile git 8898�� --get 88985/b452/_testmain.go /tmp/go-build18588985/b450/styles.test -json GO111MODULE x_amd64/vet /tmp/go-build18588985/b450/styles.test (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 k/node_modules/.bin/git user.name st/suppress-warn-o k/gh-aw/gh-aw/ac/tmp/go-build2270066248/b001/exe/text-output forks.js rev-�� HEAD st/suppress-warn-w git --bare gin/full-mode-br--experimental-import-meta-resolve ules/.bin/git st/dist/workers//home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/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 } } /tmp/bare-incremgit tions/setup/js/ncommit 1/x64/bin/git 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 ache/node/24.14.1/x64/bin/git user.email tions/setup/js/n--experimental-import-meta-resolve in/git git init�� -q st/suppress-warn--conditions n-dir/git dec7b6eec61f91cf/usr/bin/gh e1c8406a..HEAD k/_temp/uv-pythographql 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 .go test@example.com o k/gh-aw/gh-aw/acgit 2de42772fd4f1cbf-C 2c git rev-�� -cwd.go ache/node/24.14.Test repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } --count k/gh-aw/gh-aw/ac-C k/gh-aw/gh-aw/no/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch . /opt/hostedtoolc--output=/tmp/giowner=github me: String!) { repository(owne-f --require /home/REDACTED/wor-C ache/node/24.14./home/REDACTED/work/gh-aw/gh-aw /opt/hostedtoolcshow /tmp�� k/gh-aw/gh-aw/.github/workflows git 1/x64/bin/node feature | cat /egit git 2363a82a3502f466/home/REDACTED/work/gh-aw/gh-aw/.github/workflows 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 --get remote.origin.url /usr/bin/git ty-test.md fg 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/infocmp 1885746708/.githgit fg 64/pkg/tool/linu--show-toplevel infocmp (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 /tmp/gh-aw-test-runs/20260425-232720-34053/test-758013675/.githu.github/workflows/test.md config /usr/bin/gh remote.origin.urgit GO111MODULE x_amd64/compile gh api /repos/actions/github-script/git/ref/tags/v9 url 0"}} -json GO111MODULE x_amd64/vet /tmp/go-build18588985/b452/testutil.test (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 --show-toplevel X-1PWzdY5nrQ /usr/bin/git 2650666207/001' 2650666207/001' x_amd64/compile git -C /tmp/gh-aw-test-runs/20260425-232720-34053/test-2767448077/.github/workflows l rue,"errors":[],"warnings":[]}] -json GO111MODULE x_amd64/vet infocmp (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 fg 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml/scannerrev-parse GOMODCACHE ylQP4Z8/vCNYLdc7D8RXanEmFBss env RxJB/qfqEIUSRa-L-U7HTRxJB GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 fg 64/pkg/tool/linux_amd64/compile GOINSECURE 3091110/b133/ GOMODCACHE 64/pkg/tool/linuTest User env 3251326234 GO111MODULE x_amd64/compile GOINSECURE b/gh-aw/actions/rev-parse 3091110/b133/sym--show-toplevel x_amd64/compile (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml/ast ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet env 4017067452 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 3091110/b087/symuser.email 64/pkg/tool/linutest@example.com (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE 3091110/b133/ GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 l_test.go 64/pkg/tool/linux_amd64/compile GOINSECURE contextprotocol/rev-parse GOMODCACHE 64/pkg/tool/linux_amd64/compile (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/encoding/asinit GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE fips140/ed25519 3091110/b006/sym--show-toplevel 64/pkg/tool/linux_amd64/compile (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 fg .test GOINSECURE ntio/encoding/js/tmp/test-expr-3314814357.js ache/go/1.25.8/xREDACTED.os .test 8588�� 2767448077 88985/b019/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 3091110/b006/symabis 64/pkg/tool/linux_amd64/vet (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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE e/jsonschema-go/rev-parse GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 xxol/GL-tkTNtkvunLaxVxxol 64/pkg/tool/linux_amd64/link GOINSECURE g/x/crypto/cryptrev-parse GOMODCACHE 64/pkg/tool/linux_amd64/link (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 sonschema/annotations.go 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 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/vet env g_.a @v1.19.2/lexer/l--delta-base-offset 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 boring GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3091110/b225/_pkg_.a 3NxN/fOrMapTM_SttVIFB3NxN 64/pkg/tool/linux_amd64/compile GOINSECURE ce GOMODCACHE 64/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-build18588985/b404/cli.test /tmp/go-build18588985/b404/cli.test -test.testlogfile=/tmp/go-build18588985/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 ache/go/1.25.8/x^remote\..*\.gh-resolved$ /usr/bin/git 2720-34053/test-git main.go ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/scripts/lint_error_messages_test.grev-parse /usr/bin/git architecture-guals /tmp/go-build185-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 .a 88985/b244/vet.cfg k GOSUMDB er 64/bin/go ache/go/1.25.8/x64/pkg/tool/linu-tests sRem�� Tmit7aPmK -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p bufio -lang=go1.25 tcfg (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 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet _bra�� g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD 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 o actions/setup-cli/install.sh..-errorsas GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a 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/vet GOINSECURE GOMOD GOMODCACHE 46MaExS/rs4ruDNpeWLgO0QAw_ap env g_.a 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 -c=4 -nolocalimports -importcfg /tmp/go-build18588985/b440/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil_test.go env g_.a GO111MODULE 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 rty x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env g_.a 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 2720-34053/test-source-field-var-c=4 88985/b289/vet.cfg fg -p main -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linuconfig -o 3091110/b226/importcfg -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p time -lang=go1.25 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 GOMOD GOMODCACHE x_amd64/compile 3091�� 2720-34053/test-source-field-var-p EgAi/JW5fl0E13YyEocudEgAi kflow.lock.yml GOSUMDB GOWORK 64/bin/go ache/go/1.25.8/x64/pkg/tool/linuremote (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 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 workflow list --repo owner/repo --json name,path,state x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 .go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch rdian.md 88985/b041/vet.cfg fg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-tests (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�� tnet/tools/git git ode_modules/.bin/git =receive test@example.com--git-dir=/tmp/bare-incremental-QikvgI /git (dns block)

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

… error envelope

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/abb46bc1-7673-4b15-8206-4292d2bdf125

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Integration: CLI MCP Other Fix integration test: check run_ids_or_urls (plural) in audit error envelope Apr 25, 2026
Copilot AI requested a review from pelikhan April 25, 2026 23:32
@pelikhan pelikhan marked this pull request as ready for review April 25, 2026 23:33
Copilot AI review requested due to automatic review settings April 25, 2026 23:33
@pelikhan pelikhan merged commit bd91ffc into main Apr 25, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/fix-integration-cli-mcp-other branch April 25, 2026 23:34
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

Updates a failing MCP server integration test to assert the correct (plural) run_ids_or_urls field in the audit tool’s JSON error envelope, aligning the test with the current implementation.

Changes:

  • Fix assertion in TestMCPServer_ErrorCodes_InternalError/audit_invalid_run_id_returns_json to check run_ids_or_urls instead of run_id_or_url.
Show a summary per file
File Description
pkg/cli/mcp_server_error_codes_test.go Updates audit error-envelope key assertion to match the implementation’s plural field name.

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 _, hasRunID := envelope["run_id_or_url"]; !hasRunID {
t.Errorf("Expected 'run_id_or_url' field in audit JSON response, got: %s", textContent.Text)
if _, hasRunID := envelope["run_ids_or_urls"]; !hasRunID {
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

The boolean variable name hasRunID no longer matches the key being checked (run_ids_or_urls). Consider renaming it (e.g., hasRunIDsOrURLs / hasRunIDs) to keep the assertion self-explanatory and avoid confusion when reading failures.

Suggested change
if _, hasRunID := envelope["run_ids_or_urls"]; !hasRunID {
if _, hasRunIDsOrURLs := envelope["run_ids_or_urls"]; !hasRunIDsOrURLs {

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
@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 1 (modified subtest)
✅ Design tests (behavioral contracts) 1 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (100%)
Duplicate test clusters 0
Test inflation detected No
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
audit_invalid_run_id_returns_json pkg/cli/mcp_server_error_codes_test.go:155 ✅ Design None

Analysis

This PR makes a minimal, targeted fix: it changes the checked field in the audit tool's JSON error envelope from run_id_or_url (singular) to run_ids_or_urls (plural), aligning the test with the actual API contract.

The modified subtest is a strong behavioral contract test:

  • Runs against the real binary (integration test — //go:build integration ✅)
  • Uses no mock libraries ✅
  • Validates multiple fields in the error envelope (error, run_ids_or_urls, suggestions)
  • Covers a graceful-error path (non-MCP error, JSON envelope returned)
  • All t.Errorf calls include descriptive messages ✅

The 5-point deduction is a minor note: the test uses run_id_or_url (singular) as the input parameter name while testing the output envelope field run_ids_or_urls (plural) — this asymmetry is expected and intentional (input vs output field naming).


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 1 modified test — integration (//go:build integration)

Verdict

Check passed. 0% of new/modified tests are implementation tests (threshold: 30%). The fix correctly updates the test to assert the right field name in the audit error envelope.


📖 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 — the promises it makes to its users and collaborators.

References:

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

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 fix correctly updates an integration test to assert the right field name (run_ids_or_urls) in the audit error envelope.

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.

3 participants