Skip to content

fix: accept single string for tools.github.toolsets and improve type-error hints#29094

Merged
pelikhan merged 5 commits intomainfrom
copilot/improve-error-message-quality
Apr 29, 2026
Merged

fix: accept single string for tools.github.toolsets and improve type-error hints#29094
pelikhan merged 5 commits intomainfrom
copilot/improve-error-message-quality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

toolsets: "default" was rejected with a bare "got string, want array" — no valid values, no example. @pelikhan requested first-class support for the string shorthand.

Changes

String coercion for toolsets/toolset (tools_parser.go)

Both fields now accept a bare string, coerced to a one-element slice. The raw config map is normalized to []any so compiled YAML always emits an array.

# now accepted — equivalent to toolsets: [default]
tools:
  github:
    toolsets: default

Schema update (main_workflow_schema.json)

toolsets changed from type: array to a oneOf (string | array), so the validator accepts the shorthand and produces a useful error (with hint) for genuinely wrong types like integers.

Actionable error hints (schema_errors.go)

  • Added /tools/github/toolsets to knownOneOfFieldHints — surfaces valid toolset names and both syntax forms when a type error is detected.
  • Expanded /engine hint to show the object form (id: copilot, max-turns: 15), not just the string shorthand.

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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ortc�� 1004554/b024/_pkg_.a om/goccy/go-yaml@v1.19.2/lexer/lexer.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE /maps GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu/tmp/go-build3586635598/b112/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 2192273754/.github/workflows b-AbBFuh- ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xremote.origin.url env t2214428116/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x^remote\..*\.gh-resolved$ (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 2192273754/.github/workflows S-MkVro-o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env t2214428116/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x12345 (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go /pre�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv /tmp/TestCollectWorkflowFiles_TransitiveImports2737195814/001 rev-parse /usr/bin/git 41P7GWbPK GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git 1004554/b198/_pknode om/modelcontextp/opt/hostedtoolcache/node/24.14.1/x64/bin/npm .cfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 3965453216/.githgit GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 2597021099 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 1811-33739/test-3194530678 go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -json GO111MODULE x_amd64/compile /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile @/tm�� GOMODCACHE x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE 64/bin/go 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 1811-33739/test-1698169406/.github/workflows llzq/kleu3xr21GcpMTTxllzq .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu^remote\..*\.gh-resolved$ env 1811-33739/test-687158437 aFt_/WeZ-gWqCt5YqbNVEaFt_ 64/pkg/tool/linux_amd64/vet GOINSECURE b/gh-aw/pkg/actirev-parse GOMODCACHE 64/pkg/tool/linux_amd64/vet (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/link /usr/bin/git 1004554/b121/_pktr GO111MODULE ache/go/1.25.8/x: git rev-�� --show-toplevel x2/zg1-jwF1IRoPasY5xy3c/9ezsDU_VWw7VJguVlRAx /usr/bin/git 6635598/b070/_pkgit 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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 6635598/b465/_pkgit go 6635598/b465=> git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git Gf1j/g249MWQPUj8git -buildtags ache/node/24.14.--show-toplevel 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/go-build1511004554/b068/_pkg_.a k/gh-aw/gh-aw/pkg/gitutil/gitutil.go 64/pkg/tool/linux_amd64/vet -p os -lang=go1.25 64/pkg/tool/linux_amd64/vet -o licyMinIntegrityOnlymin-integrity_with_repos=public_4233365751/001 .cfg /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p crypto/ecdsa -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x-buildtags (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260429-121811-33739/test-687158437 6635598/b438/_testmain.go 1/x64/bin/node l github.com/githurev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet t-ha�� ithub/workflows/architecture-guardian.md -goversion /usr/bin/git -c=4 -nolocalimports -importcfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv GOMODCACHE l /usr/bin/git -json son/json.go 64/bin/go git rev-�� --show-toplevel go clusion,workflowName,createdAt,startedAt,updated/tmp/gh-aw-git-clone-3956207381 -json GO111MODULE 64/bin/go /usr/bin/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 /opt/hostedtoolc-buildtags /usr/bin/git 1811-33739/test-git -trimpath es.lock.yml git rev-�� --show-toplevel e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv xterm-color erignore /usr/bin/sh 3002117389 GO111MODULE (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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1511004554/b248/importcfg -pack /home/REDACTED/go/pkg/mod/golang.org/x/text@v0.36.0/internal/format/format.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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1511004554/b002/importcfg -embedcfg /tmp/go-build1511004554/b002/embedcfg 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)
  • 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 x_amd64/vet 6635598/b471/vet.cfg g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linu/tmp/go-build3586635598/b452/_testmain.go /tmp/go-build3586635598/b469/workflow.test g_.a 3GMM57Ps3 x_amd64/link /tmp/go-build3586635598/b469/workflow.test (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 ules/.bin/node git conf�� user.email test@example.com /usr/bin/git -json GO111MODULE 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 /tmp/TestGuardPolicyTrustedUsersRequiresMinIntegrity2667993204/001 remote /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel 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-test.v=true 6635598/b468/vet.cfg g_.a 0/internal/strinrev-parse 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linuremote.origin.url /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link y_with_repos=pubgit sNGC5r73k ache/go/1.25.8/x--show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git -json GO111MODULE modules/@npmcli/--show-toplevel git -C /tmp/compile-instructions-test-1test-logs/run-2 rev-parse /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go /opt/hostedtoolcache/node/24.14.1/x64/bin/node (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmaster_branch1613751673/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmaster_branch1613751673/001' g_.a -p regexp -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x^remote\..*\.gh-resolved$ -o g/cli -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p golang.org/x/texrev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260429-121811-33739/test-687158437 -importcfg ache/node/24.14.1/x64/bin/node -s -w -buildmode=exe git t-20�� bility_SameInputSameOutput3756293940/001/stability-test.md -extld=gcc /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -m initial commit /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/TestGuardPolicyTrustedUsersRequiresMinIntegrity2667993204/001 (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 ons-test502290857 rev-parse ow-without-reaction.lock.yml -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags 0"}} -errorsas -ifaceassert layTitle git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --bare --initial-branch=master /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel (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 . st/dist/workers/forks.js $name) { hasDiscussionsEnabled } } -b full-mode-branch--experimental-import-meta-resolve nfig/composer/ve--require git diff�� --binary 9ac531f6e55362d6--conditions ache/go/1.25.8/xdevelopment full2.txt ode_modules/vite-C 1/x64/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . st/dist/workers/forks.js bin/git -b 6080687a k/gh-aw/gh-aw/acuser.email git diff�� --binary (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel go /usr/bin/infocmp--show-toplevel git rev-�� tmp/TestGetNpmBinPathSetup_GorootOrdering3769371719/001/go/1.25.0/x64"; export PATH="$(find "/tm/usr/bin/gh infocmp /usr/bin/git xterm-color go /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch -output.go git r: $owner, name: $name) { hasDiscussionsEnabled } } --is-ancestor f66ee3ad3c6f2a1b-C odules/npm/node_/home/REDACTED/work/gh-aw/gh-aw 1/x64/bin/node ve . tions/setup/js/node_modules/vitest/suppress-warnings.cjs r: $owner, name: $name) { hasDiscussionsEnabled } } -exist mp es/.bin/git tions/setup/js/nshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch ithub/workflows main ock.yml ules/.bin/git git ache/node/24.14./home/REDACTED/work/gh-aw/gh-aw/.github/workflows /tmp/go-build415rev-parse --qu�� ithub/workflows git repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } feature$(whoami)git e/git DiscussionsEnabl/home/REDACTED/work/gh-aw/gh-aw /opt/hostedtoolcshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch --show-toplevel git r: $owner, name: $name) { hasDiscussionsEnabled } } --show-toplevel go /usr/bin/git git rev-�� --show-toplevel /usr/bin/git r: $owner, name: $name) { hasDiscussionsEnabled } } 2243-59437/test-git ^remote\..*\.gh--C /usr/bin/git 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 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git g_.a LZuHOSZyr stants.test git (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 --show-toplevel go ps -json GO111MODULE ache/go/1.25.8/x--show-toplevel ps rev-�� git go /usr/bin/git '**/*.ts' '**/*.git GO111MODULE 1/x64/lib/node_m--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 se 6635598/b113/vet.cfg /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260429-121811-33739/test--errorsas show om/myorg/myrepo.git -json GO111MODULE x_amd64/compile git (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 GOMODCACHE (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 /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-2 remote /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260429-121811-33739/test-3709537530/custom/workflows config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/compile 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 --bare l e/git .github/workflowgit GO111MODULE 64/bin/go e/git -C /tmp/TestGuardPolicyMinIntegritytest-logs/run-12346 rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-22 GOMOD GOMODCACHE 64/pkg/tool/linu-trimpath env g_.a GO111MODULE 64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE NKQxPfr/feDwSjXS-dwarf=false (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-03-30 GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu--auto (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-01-29 GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url env g_.a rotocol/go-sdk@v1.5.0/internal/json/json.go 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/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name l_test.go 64/pkg/tool/linux_amd64/compile GOINSECURE a20poly1305 GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a R30X4Bcts ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE %H %ct %D (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE pproxy GOMODCACHE ache/go/1.25.8/xtest@example.com ortc�� 3709537530/custom/workflows O_2Lfc9jA ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE 1004554/b013/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE ache/node/24.14.1/x64/bin/node GOINSECURE GOMOD GOMODCACHE go t-75�� sistency_GoAndJavaScript932984437/001/test-frontmatter-with-env---thin GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE 1/x64/bin/node (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 UHEwN-QbQ 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a CLJOlIPxV x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 z-hV-eFae 64/pkg/tool/linux_amd64/vet GOINSECURE a20 GOMODCACHE 64/pkg/tool/linutest@example.com env 2192273754 GFI5vTWRl x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name 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 env -json GO111MODULE e/git GOINSECURE GOMOD GOMODCACHE e/git (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 KmEF_rn9z 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env e-analyzer.md v7mHHZTds x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE js.o 64/src/syscall/j/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/archie.md 64/pkg/tool/linux_amd64/vet env 2192273754/.github/workflows S-MkVro-o x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE 0760867/b404/cli.test GOINSECURE GOMOD GOMODCACHE 0760867/b404/cli.test e=/t�� t0 GO111MODULE e/git m0s GOMOD (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 h00yucQ7c 64/pkg/tool/linux_amd64/compile GOINSECURE /norm GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a aTWjRYknE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 InX8DV7o_ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xTest User env 3709537530/custom/workflows Y9sJvruy0 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE e/rtcov GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /snap/bin/sh GOINSECURE GOMOD GOMODCACHE sh (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 m0O72i2Jk 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env 1050803663/.github/workflows Ffa_H-Eee ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE %H %ct %D (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 dAR9m3zY_ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env plorer.md qrk06zUvD ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE /home/REDACTED/.local/bin/sh GOINSECURE GOMOD GOMODCACHE sh (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 8kq6Gg-gh 64/pkg/tool/linux_amd64/link GOINSECURE ack GOMODCACHE 64/pkg/tool/linutest@example.com env 1050803663/.github/workflows Hgqea9f-D ortcfg.link GOINSECURE GOMOD GOMODCACHE D1vb8bV6YvrCyz0kYU/UimiJ_lt2omPMBb08Enn/rF_9p0J54_DTfFj6d_uS (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 dq87ptaK6 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env ortcfg RG6vPflge ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE eader GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu/tmp/file-tracker-test1282399244/test2.lock.yml (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE e/git-upload-pack GOINSECURE GOMOD GOMODCACHE sh (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 rrG8ct2Bi 64/pkg/tool/linux_amd64/vet GOINSECURE bidirule GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1050803663/.github/workflows cu5AAtlhm k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 LamLkoYmy ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE pguts GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags env 3709537530/custom/workflows N5EVshPW9 k GOINSECURE er GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-tests (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/asm 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 6 .o 64/src/runtime/axterm-color 64/pkg/tool/linux_amd64/vet env -json .cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xTest User (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3586635598/b404/cli.test /tmp/go-build3586635598/b404/cli.test -test.testlogfile=/tmp/go-build3586635598/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -importcfg /tmp/go-build1511004554/b232/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/jsonrpc/jsonrpc.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build2290760867/b404/cli.test /tmp/go-build2290760867/b404/cli.test -test.testlogfile=/tmp/go-build2290760867/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 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/x64/pkg/tool/linux_amd64/compile /usr/bin/git ExpressionCompilgit wyMD/ZnqvKWWFy1Yrev-parse 1004554/b236=> git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git ithub/workflows -trimpath /opt/hostedtoolc/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 ck '**/*.cjs' '*git GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/git tions-lock.json du 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 XU8RCguzS GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE 1004554/b029/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ranc�� 1004554/b155/_pkg_.a rg/x/oauth2@v0.35.0/internal/doc.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE ntio/encoding/is-test.run=TestAuditDiffToolErrorEnvelopeHelperProcess ache/go/1.25.8/x64/src/internal/runtime/sys/empt-test.paniconexit0 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json f 64/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/compile GOINSECURE GOMOD GOMODCACHE Bb08Enn/rF_9p0J54_DTfFj6d_uS env Gitmain_branch189486622/001' Gitmain_branch189486622/001' x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/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 2/compile.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 nZZzdgr/Win8VWOQconfig 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/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 x_amd64/compile env -json ag.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 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 report.md om/segmentio/asm@v1.1.3/cpu/arm/arm.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE lite GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ortc�� 3940/001/stability-test.md om/modelcontextprotocol/go-sdk@v1.5.0/oauthex/auth_meta.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE ntio/asm/cpu/armrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linumyorg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv on' --ignore-path ../../../.pret.prettierignore GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/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 go-sdk/mcp GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-goversion ortc�� 1/001/test-frontmatter-with-env-template-expressions.md om/segmentio/asm@v1.1.3/cpu/x86/-nolocalimports k GOINSECURE 1004554/b036/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil_test.go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE sh -c "prettier" --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore GOPROXY /usr/bin/gcc GOSUMDB GOWORK 64/bin/go gcc (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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env i1ql3kueA GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xrepos/{owner}/{repo}/actions/runs/12346/artifacts (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo d7edea77daf18c37-d GOINSECURE GOMOD GOMODCACHE go /pre�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -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/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE /prettier GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 3709537530/custom/workflows Y9sJvruy0 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE e/rtcov GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env ortcfg 1y8b/MRa4ogkVnm9ohNRO1y8b ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x1 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch /tmp/TestGuardPolicyMinIntegrityOnlymin-integrity_with_repos_array_c3494996701/001 remote /usr/bin/git h ../../../.pretdocker GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260429-122243-59437/test-571902787/custom/workflows config /usr/bin/git remote.origin.urinfocmp GO111MODULE 64/bin/go git (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-vpY9af /git (dns block)

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

…r hints

- Coerce `toolsets: "default"` (string) to `["default"]` (array) in parseGitHubTool,
  also normalizing the raw map so compiled YAML always emits an array
- Same coercion for the singular `toolset` field
- Update JSON schema to accept string or array via oneOf for toolsets
- Add knownOneOfFieldHints entry for /tools/github/toolsets with valid names and examples
- Expand /engine hint to also show the object form (id/max-turns)
- Add tests for string coercion and new hints

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bfb8f836-56a1-4a2d-8e0d-d3d2a37573e2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve error messages for tools.github.toolsets type errors fix: accept single string for tools.github.toolsets and improve type-error hints Apr 29, 2026
Copilot AI requested a review from pelikhan April 29, 2026 12:27
"maxItems": 20
"description": "GitHub MCP server toolset name(s) to enable. Accepts a single toolset name (string) or an array of toolset names.",
"oneOf": [
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot refactor into shared type

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 0232f2e. The toolset enum is now defined once as $defs/github_toolset_name and both the string and array-items branches use $ref: "#/$defs/github_toolset_name".

Replace the duplicated enum list in the toolsets oneOf with a single
$ref: #/$defs/github_toolset_name definition, keeping the enum in one place.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/9b625687-0bb7-4a76-bf07-f5fae9e9dd92

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review April 29, 2026 12:48
Copilot AI review requested due to automatic review settings April 29, 2026 12:48
Copilot AI requested a review from pelikhan April 29, 2026 12:48
@github-actions github-actions Bot mentioned this pull request Apr 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for tools.github.toolsets being specified as a single string (shorthand), improves JSON schema validation to accept the shorthand, and enhances oneOf-type error messages with actionable hints.

Changes:

  • Coerce tools.github.toolsets / legacy toolset from a single string into a 1-element slice during parsing (and normalize the raw map to an array).
  • Update main_workflow_schema.json so toolsets accepts either a string or an array, and factor toolset names into a shared $defs enum.
  • Improve schema oneOf type-conflict hints for /engine and add hints for /tools/github/toolsets, plus tests and docs updates.
Show a summary per file
File Description
pkg/workflow/tools_types_test.go Adds tests for string→slice coercion and raw-map normalization behavior.
pkg/workflow/tools_parser.go Implements string coercion + raw-map normalization for toolsets/toolset.
pkg/parser/schemas/main_workflow_schema.json Allows toolsets as string or array and introduces $defs.github_toolset_name.
pkg/parser/schema_errors_test.go Adds test coverage for improved oneOf hinting output.
pkg/parser/schema_errors.go Adds/expands oneOf type-conflict hints for /engine and /tools/github/toolsets.
docs/src/content/docs/reference/frontmatter-full.md Documents the new toolsets shorthand and array form.

Copilot's findings

Tip

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

  • Files reviewed: 6/6 changed files
  • Comments generated: 5


# Option 2: Array of GitHub MCP server toolset names to enable specific groups of
# GitHub API functionalities
toolsets: []
Comment thread pkg/workflow/tools_types_test.go Outdated
Comment on lines +268 to +289
configMap := toolsMap["github"].(map[string]any)
tools := NewTools(toolsMap)
config := tools.GitHub

if config == nil {
t.Fatal("expected non-nil config")
}

if len(config.Toolset) != 1 {
t.Fatalf("expected 1 toolset, got %d", len(config.Toolset))
}
if config.Toolset[0] != "default" {
t.Errorf("expected toolset 'default', got %q", config.Toolset[0])
}

// Verify raw map is normalized to an array for JSON rendering
normalized, ok := configMap["toolsets"].([]any)
if !ok {
t.Errorf("expected raw configMap[toolsets] to be []any after coercion, got %T", configMap["toolsets"])
} else if len(normalized) != 1 || normalized[0] != "default" {
t.Errorf("expected normalized raw toolsets to be [default], got %v", normalized)
}
Comment on lines 3563 to +3574
"toolsets": {
"type": "array",
"description": "Array of GitHub MCP server toolset names to enable specific groups of GitHub API functionalities",
"items": {
"type": "string",
"description": "Toolset name",
"enum": [
"all",
"default",
"action-friendly",
"context",
"repos",
"issues",
"pull_requests",
"actions",
"code_security",
"dependabot",
"discussions",
"experiments",
"gists",
"labels",
"notifications",
"orgs",
"projects",
"search",
"secret_protection",
"security_advisories",
"stargazers",
"users"
]
},
"minItems": 1,
"$comment": "At least one toolset is required when toolsets array is specified. Use null or omit the field to use all toolsets.",
"maxItems": 20
"description": "GitHub MCP server toolset name(s) to enable. Accepts a single toolset name (string) or an array of toolset names.",
"oneOf": [
{
"$ref": "#/$defs/github_toolset_name",
"description": "A single GitHub MCP server toolset name (shorthand for a one-element array)"
},
{
"type": "array",
"description": "Array of GitHub MCP server toolset names to enable specific groups of GitHub API functionalities",
"items": {
"$ref": "#/$defs/github_toolset_name"
"$ref": "#/$defs/github_toolset_name"
},
"minItems": 1,
"$comment": "At least one toolset is required when toolsets array is specified. Use null or omit the field to use all toolsets.",
Comment thread pkg/parser/schema_errors.go Outdated
var knownOneOfFieldHints = map[string]string{
"/engine": "Valid engine names: claude, codex, copilot, gemini.\n\nExample:\nengine: copilot",
"/engine": "Valid engine names: claude, codex, copilot, gemini.\n\nExample:\nengine: copilot\n# or with options:\nengine:\n id: copilot\n max-turns: 15",
"/tools/github/toolsets": "Valid toolsets: all, default, action-friendly, repos, issues, pull_requests, actions, code_security.\n\nExample:\ntools:\n github:\n toolsets: default\n # or as an array:\n toolsets: [default, repos]",
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 90/100

Excellent test quality

Metric Value
New/modified tests analyzed 4
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (100%)
Duplicate test clusters 0
Test inflation detected Yes (structural — small prod changes, new test coverage)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Notes
engine hint includes object form example pkg/parser/schema_errors_test.go ✅ Design Verifies error message contains actionable object-form example
toolsets field with number type produces actionable message pkg/parser/schema_errors_test.go ✅ Design Verifies error message for type mismatch on toolsets field
coerces single string toolsets to slice pkg/workflow/tools_types_test.go ✅ Design Verifies string→slice coercion behavior (plural key)
coerces single string toolset (singular) to slice pkg/workflow/tools_types_test.go ✅ Design Verifies string→slice coercion behavior (singular key)

Language Support

Tests analyzed:


Inflation Note

Both test files exceed the 2:1 line-added ratio:

  • schema_errors_test.go: 18 test lines / 2 prod lines (~9:1)
  • tools_types_test.go: 62 test lines / 14 prod lines (~4.4:1)

This is a structural artifact: the production changes are small targeted fixes while the corresponding tests necessarily exercise more code paths. The tests themselves are not bloated — they are thorough and cover the new behavior directly.


Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 4 new tests verify observable behavioral contracts — error message content and type coercion output — with both happy-path and error/edge-case coverage.

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

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

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 90/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 4 new tests verify behavioral contracts with proper error/edge-case coverage.

…s field

Records the design decision to accept a bare string for
tools.github.toolsets and coerce it to a one-element array,
along with the oneOf schema update and actionable error hints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: b9ca171

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (>100 new lines in pkg/) but does not have a linked Architecture Decision Record (ADR).

AI has analyzed the PR diff and generated a draft ADR to help you get started:

📄 Draft ADR: docs/adr/29094-lenient-string-coercion-for-toolsets-field.md

What to do next

  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete the missing sections — add context the AI couldn't infer, refine the decision rationale, and list real alternatives you considered
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-29094: Lenient String Coercion for tools.github.toolsets Field

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.


📋 Draft ADR Preview

The generated ADR covers the following design decision:

Decision: Accept a bare string for tools.github.toolsets (and toolset) and coerce it to a one-element slice at parse time. The JSON schema uses oneOf (string | array). A field-specific hint surfaces valid toolset names and syntax examples when validation fails.

Alternatives analyzed:

  • Improve error message only (keep strict type: array) — rejected because users still must change valid-intent YAML
  • Accept string only, deprecate array form — rejected because it breaks multi-toolset configurations

Key consequences captured:

  • (+) Natural scalar syntax (toolsets: default) now works for single-toolset configs
  • (+) Type-error hints now list valid toolset names and both syntax forms
  • (−) Parser has two code paths for the same field; raw config map is mutated during parsing
📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number (e.g., 29094-lenient-string-coercion-for-toolsets-field.md for PR #29094).

🔒 This PR cannot merge until an ADR is linked in the PR body.

References:

Note

🔒 Integrity filter blocked 1 item

The following item was blocked because it doesn't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · ● 231.8K ·

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments

- Fix docs example: toolsets: [] → toolsets: [default] (empty array fails minItems: 1)
- Fix tests: assert normalized form via tools.ToMap() instead of input map mutation
- Add deprecated toolset (singular) property to JSON schema so the parser's accepted key passes schema validation
- Fix $comment: remove incorrect null guidance (null isn't in the oneOf)
- Complete toolset list in schema_errors.go hint (dependabot, discussions, experiments, gists, labels, notifications, orgs, projects, search, secret_protection, security_advisories, stargazers, users)

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dae9dfa1-2326-4172-9b7d-22847e5669f9

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

Copilot AI commented Apr 29, 2026

@copilot review all comments

Addressed all reviewer comments in 4a70324:

  • Docs (frontmatter-full.md): toolsets: []toolsets: [default] (empty array fails minItems: 1)
  • Tests (tools_types_test.go): replaced in-place input-map mutation checks with assertions on tools.ToMap() output
  • Schema (main_workflow_schema.json): added deprecated toolset (singular) property with the same oneOf as toolsets, so the key the parser accepts also passes schema validation; fixed $comment to remove the incorrect null guidance
  • Error hint (schema_errors.go): expanded the /tools/github/toolsets hint to include all toolset names that appear in $defs/github_toolset_name

@pelikhan pelikhan merged commit ea8a18e into main Apr 29, 2026
@pelikhan pelikhan deleted the copilot/improve-error-message-quality branch April 29, 2026 13:20
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.

[syntax-error-quality] Error message quality: tools.github.toolsets type errors lack actionable guidance

3 participants