Skip to content

Preserve error chain in ErrorCollector.FormattedError for multi-error aggregation#27765

Merged
pelikhan merged 4 commits intomainfrom
copilot/fix-formatted-error-chain
Apr 22, 2026
Merged

Preserve error chain in ErrorCollector.FormattedError for multi-error aggregation#27765
pelikhan merged 4 commits intomainfrom
copilot/fix-formatted-error-chain

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 22, 2026

ErrorCollector.FormattedError formatted multi-error output by stringifying collected errors, which dropped wrapped error identity and broke errors.Is/errors.As traversal. This path is used by validation flows, so callers could no longer reliably introspect specific underlying errors.

  • Error aggregation behavior

    • Updated FormattedError(category) to keep the human-readable count header while wrapping errors.Join(c.errors...) with %w.
    • Single-error and zero-error behavior is unchanged.
  • Error chain preservation tests

    • Added focused coverage in error_aggregation_test.go to assert:
      • errors.Is matches a wrapped sentinel error returned through FormattedError.
      • errors.As extracts a wrapped typed error returned through FormattedError.
  • Resulting pattern

    header := fmt.Sprintf("Found %d %s errors:", len(c.errors), category)
    return fmt.Errorf("%s\n%w", header, errors.Join(c.errors...))

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 64/pkg/tool/linux_amd64/vet GOINSECURE g/x/crypto/cryptconfig 6287196/b006/symuser.name 64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 6287196/b241/_pkg_.a r73k/ZR15bOYtzO_sNGC5r73k ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/internal/langurev-parse 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 2747813275/.github/workflows k-ff/hcoMcb4nJlDk1Ubnk-ff ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE b/gh-aw/pkg/giturev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (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/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -c=4 -nolocalimports -importcfg /tmp/go-build1888311829/b390/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/internal/tools/actions-build/main.go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (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 --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/gh 3597738024/.githgit fg 64/pkg/tool/linu--show-toplevel gh repo�� view owner/test-repo /usr/bin/git 153501083/.githunode BHdz/-6z_QJDvZKL/opt/hostedtoolcache/node/24.14.1/x64/bin/npm 64/pkg/tool/linuinstall git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv . -v /opt/hostedtoolcache/go/1.25.8/x64/bin/bash ithub/workflows git kflows/daily-arc--show-toplevel bash --no�� --noprofile /opt/hostedtoolc{{context.GOARCH}} {{context.Compiler}} /usr/bin/git k/gh-aw/gh-aw/.gnode /home/REDACTED/wor/opt/hostedtoolcache/node/24.14.1/x64/bin/npm l-workflow.lock.install git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/gh -json GO111MODULE 64/bin/go gh repo�� view owner/test-repo /usr/bin/git ut3925945361/001node GO111MODULE 64/pkg/tool/linuinstall 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 tagedFiles2838180526/001/workflow.md -trimpath /usr/bin/git -p main -lang=go1.25 git conf�� --get remote.origin.url ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet ted-objects.md -c=4 -nolocalimports 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 in sync with .golangci.yml for consistency show /usr/bin/git --require tions/setup/js/nrev-parse r: $owner, name:--show-toplevel git -C /home/REDACTED/work/gh-aw/gh-aw/.github/workflows config ache/node/24.14.1/x64/bin/git remote.origin.urgit /home/REDACTED/worrev-parse ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv GOMODCACHE go om/org2/repo.git -json GO111MODULE 64/bin/go infocmp -1 xterm-color node /usr/bin/infocmp prettier --check 64/bin/go infocmp (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 6287196/b212/imp-errorsas -trimpath fg -p crypto/internal/diff -lang=go1.25 ache/go/1.25.8/x--name-only (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/linu-buildtags /usr/bin/git se 15932/b057/vet.c\n fg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-tests /usr/bin/git 4401-33052/test-git k/gh-aw/gh-aw/pkrev-parse ache/go/1.25.8/x--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 x_amd64/vet 1/x64/bin/npm --show-toplevel -tests (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_only_defaults_repo3011823016/0remote.origin.urgit rev-parse ache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/compile git t-16�� k/gh-aw/gh-aw/.github/workflows/ace-editor.md git /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv RjYN7sUAg config n-dir/bash remote.origin.urgit FFiles,SFiles,Swrev-parse 1/x64/bin/node ortcfg -C g/timeutil/format.go rev-parse kflows/weekly-blog-post-writer.lock.yml --count tions/setup/js/nrev-parse bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv xterm-color -tests /usr/bin/git ck 'scripts/**/*git GO111MODULE 64/bin/go git -C /tmp/TestGuardPolicyBlockedUsersCommaSeparatedCompiledOutput1989721386/001 remote /usr/bin/git -json git 6f085b31ee0789e7--show-toplevel 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 x_amd64/link /usr/bin/git r.test -trimpath 64/pkg/tool/linu-b git rev-�� --show-toplevel J_/CWrYu2czG7Ca7ylQP4Z8/vCNYLdc7D8RXanEmFBss /usr/bin/git util.test /tmp/go-build356rev-parse gutil.test git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git ithub/workflows rev-parse yml git rev-�� --show-toplevel git /usr/bin/git k/gh-aw/gh-aw/.ggit oFiles,IgnoredOtrev-parse x_amd64/asm git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 5326-87184/test-git GO111MODULE 1/x64/bin/node git rev-�� --show-toplevel go /usr/bin/git SameOutput383731git GO111MODULE /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 8601/parse.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 gset/set.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 api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json nal.go x_amd64/compile GOINSECURE GOMOD bytealg/indexbyt--show-toplevel x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/archie.md x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node ortcfg fg 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� Actor: ${{ github.actor }}, Repo: ${{ github.repository }} 64/pkg/tool/linux_amd64/vet /usr/bin/git y-test.md fg 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv -x c /home/REDACTED/go/bin/git - /home/REDACTED/worrev-parse /home/REDACTED/wor--show-toplevel git ls-f�� --exclude-standard --others /usr/bin/git k/gh-aw/gh-aw st/dist/workers/rev-parse lock.yml git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git init�� GOMODCACHE go /usr/bin/git mLsRemoteWithReagit mLsRemoteWithRearev-parse 64/bin/go git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/compile /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json fg 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� github.token 64/pkg/tool/linuInitial commit /usr/bin/git y-test.md fg 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv -f {{context.GOARCH}} {{context.Compiler}} /opt/hostedtoolcache/uv/0.11.7/x86_64/git unsafe /home/REDACTED/worrev-parse repository(owne--show-toplevel git ls-f�� --exclude-standard --others /usr/sbin/bash ithub/workflows -importcfg /opt/hostedtoolc--show-toplevel bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/gh -json GO111MODULE 64/bin/go gh api /repos/actions/github-script/git/ref/tags/v9 --jq /usr/bin/git -json GO111MODULE 64/bin/go /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 --show-toplevel -dwarf=false /usr/bin/git go1.25.8 -c=4 -nolocalimports git rev-�� s/test.md /tmp/go-build35615932/b420/_testmain.go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -json t/format.go x_amd64/compile /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/.github/workflows show /usr/bin/git l tions/setup/js/nrev-parse r: $owner, name:--show-toplevel git -C k/gh-aw/gh-aw/.github/workflows config 1/x64/bin/bash remote.origin.urgit 7a714ef2b2a60e12rev-parse repository(owne--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv run (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 --count 4171bb75..HEAD $name) { hasDiscussionsEnabled } } README.md ion-test..token-config bin/git git rev-�� HEAD 4171bb75 tnet/tools/git token-test.txt (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv 4171bb75..HEAD --stdout modules/@npmcli/run-script/lib/node-gyp-bin/go README.md ion-test..token--c /git git rev-�� HEAD 4171bb75..HEAD 64/bin/node token-test.txt (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --count 521435cd..HEAD $name) { hasDiscussionsEnabled } } README.md ion-test..token-config _modules/.bin/giuser.name git rev-�� HEAD 521435cd tnet/tools/git token-test.txt ings.cjs k/node_modules/./home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/vet /usr/bin/git -json fg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/lib/git-core/git-remote-https ortcfg fg x_amd64/link /usr/lib/git-core/git-remote-https (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 -e -f /home/REDACTED/.cargo/bin/bash -- unsafe /node_modules/.b--show-toplevel bash --no�� --noprofile go /opt/hostedtoolcache/go/1.25.8/x64/bin/bash k/gh-aw/gh-aw st/dist/workers/rev-parse ml bash (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 --git-dir go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/lib/git-core/git e-analyzer.md GO111MODULE 64/bin/go /usr/lib/git-core/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 --show-toplevel x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile git -C /tmp/gh-aw-test-runs/20260422-044401-33052/test-1559533316 l 64/pkg/tool/linux_amd64/compile 01 GO111MODULE 64/bin/go 64/pkg/tool/linux_amd64/compile (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 k/gh-aw/gh-aw/.github/workflows show /usr/bin/git l 7a714ef2b2a60e12rev-parse cal/bin/git git port�� k/gh-aw/gh-aw/.github/workflows dError chain fix

Agent-Logs-Url: REDACTED 64/pkg/tool/linux_amd64/link remote.origin.urgit 7a714ef2b2a60e12rev-parse k.yml 64/pkg/tool/linux_amd64/link` (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 run l /usr/bin/git --detach GO111MODULE 64/bin/go git -C /tmp/TestGuardPolicyMinIntegrityOnlymin-integrity_only_defaults_repo1780422358/001 remote /usr/bin/gh -json GO111MODULE 64/bin/go gh (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 ons-test2606126024 config ow-with-reaction.lock.yml remote.origin.urgit GO111MODULE x_amd64/compile git -C /tmp/gh-aw-test-runs/20260422-044401-33052/test-1559533316 config ache/node/24.14.1/x64/bin/node remote.origin.urgit GO111MODULE x_amd64/link node (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 k/gh-aw/gh-aw rev-parse kflows/repository-quality-improver.lock.yml --count FFiles,SFiles,Swrev-parse r: $owner, name:--show-toplevel git port�� k/gh-aw/gh-aw/.github/workflows dError chain fix

Agent-Logs-Url: REDACTED ache/go/1.25.8/x64/bin/go l 7a714ef2b2a60e12rev-parse 64/pkg/tool/linu--show-toplevel git` (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 . go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go node /tmp�� /tmp/TestHashConsistency_GoAndJavaScript2091246037/001/test-inlined-imports-enabled-with-body-cogit go /usr/bin/git -json GO111MODULE 64/bin/go 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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2747813275/.github/workflows GO111MODULE il.test GOINSECURE /semver GOMODCACHE il.test (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 6287196/b029/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 6287196/b162/_pkg_.a Kv-X/SrddFjc3EqPBzwz7Kv-X ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE th2/internal GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env mpiledOutput749735443/001 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linu-lang=go1.25 GOINSECURE fips140/check GOMODCACHE 64/pkg/tool/linu-dwarf=false env 1856109314 wDwi/8TvZlM4P0nf-c=4 x_amd64/link GOINSECURE l GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/pkg/tool/linu-importcfg GOINSECURE l/buffer GOMODCACHE 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/timeutil/format_test.go tcfg�� 1559533316 main.go fg GOINSECURE contextprotocol/rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_with_repos=public_1956633020/0remote.origin.url GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_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 GO111MODULE 64/pkg/tool/linu-lang=go1.25 GOINSECURE fips140/hmac GOMODCACHE 64/pkg/tool/linutest@example.com env 1856109314 ahb4/lZep-2Miwcz-nolocalimports fg GOINSECURE able GOMODCACHE ache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/scripts/lint_error_messages_test.go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 om/yosida95/urit-c=4 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env 1559533316 taK6/ikh7gQ1RReQdq87ptaK6 fg GOINSECURE contextprotocol/rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_with_repos=public_1956633020/001 GO111MODULE 64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/asm (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 GOMOD 6287196/b007/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 2747813275/.github/workflows k-ff/hcoMcb4nJlDk1Ubnk-ff ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE b/gh-aw/pkg/giturev-parse 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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 6287196/b235/_pkg_.a DUdE/2oEXO76xEThYfB4YDUdE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE osh-tekuri/jsonsrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 37/001/test-inlined-imports-enabled-with-env-template-expressions-in-body.md GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2747813275/.github/workflows fWCy/na03iXLzDBM34i--fWCy 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 3 --dir test-logs/run-3 fg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/aes/gcm ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet env 6287196/b225/_pkg_.a ho52/RILG8Ja3npv64jHUho52 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE ce GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/pkg/tool/linux_amd64/cgo GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuorigin (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 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 6287196/b245/_pkg_.a 7Ps3/Xuna8G_bMUX3GMM57Ps3 k GOINSECURE t/internal/strininit 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 fg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 6287196/b194/_pkg_.a fg k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-extld=gcc (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env mpiledOutput749735443/001 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name fg 64/pkg/tool/linux_amd64/vet GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 fg 64/pkg/tool/linux_amd64/vet GOINSECURE fips140only 6287196/b029/sym--show-toplevel 64/pkg/tool/linux_amd64/vet env 6287196/b228/_pkg_.a wyMD/ZnqvKWWFy1YdeRMpwyMD ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE l/httpcommon GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-dwarf=false (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env mpiledOutput749735443/001 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (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-build35615932/b419/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.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/vet env .version=b2f9c85--detach 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 6287196/b078/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 6287196/b179/_pkg_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE 6287196/b078/js_rev-parse ache/go/1.25.8/x--show-toplevel ache/go/1.25.8/x64/pkg/tool/linuTest User (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build35615932/b404/cli.test /tmp/go-build35615932/b404/cli.test -test.testlogfile=/tmp/go-build35615932/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)
    • Triggering command: /tmp/go-build1888311829/b404/cli.test /tmp/go-build1888311829/b404/cli.test -test.testlogfile=/tmp/go-build1888311829/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go m/_n�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x--json /usr/bin/git ry=1 -trimpath ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/xrev-parse /usr/bin/git st-3092516989/.gls 15932/b274/vet.c-lh 1/x64/bin/node 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 --show-toplevel git /usr/bin/git ithub/workflows rev-parse kflows/lockfile---show-toplevel git rev-�� --show-toplevel /usr/lib/systemd/systemd-executor /usr/bin/git 27 rver cross-repo-compi/tmp/gh-aw/aw-feature-branch.patch 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 --show-toplevel go /usr/bin/git efaultBranchFromgit efaultBranchFromrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc/tmp/gh-aw/aw-feature-branch.patch 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 57/001/test-empty-frontmatter.md 15932/b026/vet.cfg fg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags 6287�� /tmp/go-build2866287196/b185/_pk-errorsas pkg/mod/github.com/segmentio/enc-ifaceassert fg -p vendor/golang.orrev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linuremote2 (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 .exclude) remote.origin.url er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl. -d ings.cjs 1/x64/lib/node_m--noprofile git -C ithub/workflows rev-parse er: String!, $name: String!) { repository(owner: $owner, name:-f -- ode_modules/vitepush 86_64/git git (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 -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ace-editor.md GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json 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/v1.2.3 --jq [.object.sha, .object.type] | @tsv npx prettier --cGOSUMDB GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go node /hom�� 938142922/001 938142922/002/work 64/bin/go .prettierignore go 64/bin/go go (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/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 x_amd64/vet env Gitmaster_branchremote.origin.url Gitmaster_branch1284560957/001' 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 --check **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti--show-toplevel node 9381�� --check scripts/**/*.js 64/bin/go .prettierignore go 64/bin/go go (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/vet GOINSECURE GOMOD sm_wasm.s x_amd64/vet env lGitmain_branch443650171/001' lGitmain_branch443650171/001' 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/v3.0.0 --jq [.object.sha, .object.type] | @tsv prettier --check 64/bin/go **/*.ts **/*.json --ignore-path /bin/sh -c echo "��� JavaScript formatting GOINSECURE sh 64/bin/go tierignore go 64/bin/go go (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 se 15932/b022/vet.cfg k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet sRem�� /tmp/go-build2866287196/b011/_pkg_.a ache/go/1.25.8/x64/src/net/addrselect.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p runtime -lang=go1.25 ache/go/1.25.8/x12345 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv son -out=gosec-report.json -stdout -exclude-generated -track-suppressions \ -exclude=G101,G115,git aUmmNcV7IrIS me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -d ings.cjs 86_64/git git -C ithub/workflows show /usr/bin/git -- ode_modules/viteremote-https k/gh-aw/gh-aw/acorigin git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ace-editor.md GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE boring/bbig 6287196/b011/sym--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 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 -nolocalimports -importcfg /tmp/go-build35615932/b424/importcfg -pack /tmp/go-build35615932/b424/_testmain.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 fg GOINSECURE a95/uritemplate/rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (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 3650171/001' 3650171/001' x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json age/common.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch A2hZ/xH2WxlwhQRDq8IEgA2hZ GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linushow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch edOutput136513219/001 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 git conf�� --local --get ode_modules/.bin/git cal/bin/git git /git git add . git tions/setup/node_modules/.bin/git -M main bin/git git (dns block)
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git conf�� --local --get ode_modules/.bin/git '/tmp/bare-incr/usr/lib/git-core/git '/tmp/bare-incr--git-dir=/tmp/bare-incremental-Zjy52O /git git add . git tions/setup/node_modules/.bin/git -m Initial commit it git (dns block)

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

Copilot AI and others added 3 commits April 22, 2026 04:47
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b758b343-8fb6-493f-b705-1cbbd8e31b11

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This reverts commit 2133c72.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b758b343-8fb6-493f-b705-1cbbd8e31b11

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ErrorCollector.FormattedError to preserve error chain Preserve error chain in ErrorCollector.FormattedError for multi-error aggregation Apr 22, 2026
Copilot AI requested a review from pelikhan April 22, 2026 04:58
@pelikhan pelikhan marked this pull request as ready for review April 22, 2026 05:10
Copilot AI review requested due to automatic review settings April 22, 2026 05:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes ErrorCollector.FormattedError so that aggregated multi-errors preserve wrapped error identity, allowing callers to correctly use errors.Is/errors.As on formatted aggregate errors.

Changes:

  • Updated ErrorCollector.FormattedError(category) to wrap errors.Join(c.errors...) with %w while retaining the count header.
  • Added tests asserting errors.Is and errors.As traversal works through FormattedError results.
Show a summary per file
File Description
pkg/workflow/workflow_errors.go Preserve error chains in formatted multi-error output by wrapping errors.Join(...) with %w.
pkg/workflow/error_aggregation_test.go Add regression tests verifying errors.Is/errors.As work through FormattedError.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@github-actions github-actions Bot mentioned this pull request Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 80/100

Excellent test quality

Metric Value
New/modified tests analyzed 1
✅ 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 Yes (context: refactoring PR)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
TestErrorCollectorFormattedError_PreservesErrorChain pkg/workflow/error_aggregation_test.go ✅ Design None — verifies error chain behavioral contract

Analysis

TestErrorCollectorFormattedError_PreservesErrorChain is a high-value design test that directly verifies the behavioral contract introduced by this PR: FormattedError must preserve error chains through errors.Is and errors.As when aggregating multiple errors.

The test:

  • Uses a concrete sentinel error and a custom typed error to test two distinct error chain scenarios
  • Asserts errors.Is unwrapping works correctly (sentinelErr is reachable)
  • Asserts errors.As type extraction works correctly (*testFormattedErrorChainType is recoverable)
  • All assertions carry descriptive messages ✅
  • Build tag //go:build !integration is present ✅
  • No mock libraries used ✅

⚠️ Test Inflation Flag (Contextual)

The raw lines ratio is 27 test additions vs 2 production additions (13.5:1), triggering the >2:1 inflation threshold. However, this is a refactoring PR that reduces production code by removing 9 lines. The test additions represent genuine new behavioral coverage for a previously untested contract (FormattedError error chain preservation). The inflation flag is a false positive here — the penalty (−10 pts) is applied mechanically but should not be treated as a quality concern.


Language Support

Tests analyzed:

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

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). The single new test is a high-quality behavioral design test that directly enforces the error chain contract that this PR introduces.


📖 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: §24761362644

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

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: 80/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). The new test TestErrorCollectorFormattedError_PreservesErrorChain is a high-value behavioral design test that directly enforces the error chain contract introduced by this PR.

@pelikhan pelikhan merged commit f004186 into main Apr 22, 2026
139 checks passed
@pelikhan pelikhan deleted the copilot/fix-formatted-error-chain branch April 22, 2026 05:24
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.

ErrorCollector.FormattedError loses error chain when aggregating multiple errors

3 participants