Skip to content

feat: right-size schema-consistency-checker with max-turns cap and pre-computed schema diff#28833

Merged
pelikhan merged 3 commits intomainfrom
copilot/deep-report-right-size-schema-checker
Apr 28, 2026
Merged

feat: right-size schema-consistency-checker with max-turns cap and pre-computed schema diff#28833
pelikhan merged 3 commits intomainfrom
copilot/deep-report-right-size-schema-checker

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

The Schema Consistency Checker was consuming 8.1M tokens/run across 138 unconstrained turns (~14.9% cache hit rate), making it the highest per-run cost workflow in the repo. Most turns were spent on repetitive data-gathering (reading schema files, grepping Go structs, etc.) that can be done deterministically before the agent starts.

Changes

max-turns: 60 cap

engine:
  id: claude
  max-turns: 60  # was: unconstrained (138 turns observed)

Deterministic pre-agent-step

Adds a pre-agent-steps bash script that runs before the Claude session and writes /tmp/gh-aw/agent/schema-diff.json containing:

  • All top-level schema fields (jq from main_workflow_schema.json)
  • All yaml:"..." struct tags from pkg/parser/*.go and pkg/workflow/*.go
  • All frontmatter keys used across .github/workflows/*.md
  • Schema field types
  • Pre-computed gap diffs: in_schema_not_parser, in_parser_not_schema, in_schema_not_workflow, in_used_not_schema

This eliminates the ~40–60 turns the agent was spending on field enumeration.

Prompt updates

  • New Step 0 directs the agent to cat /tmp/gh-aw/agent/schema-diff.json as its first action
  • Step 2 strategy-selection guidance now includes a concrete bash snippet (date +%j mod 10)
  • Efficiency guidelines updated to reinforce starting from pre-computed data rather than re-reading source files

Target: ≤3M tokens/run (down from 8.1M), ~5M tokens/week reduction at weekly cadence.

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/compile GOINSECURE t/internal GOMODCACHE 64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo 6325�� 3761508075/.github/workflows 2536863/b024/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • 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 h ../../../.pret.prettierignore 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 --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git thub/workflows 7gve/JS7DQw3o9Rurev-parse 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 1726-33389/test-node 2536863/b119/vet/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 xterm-color go /usr/bin/sh 2893286600/.githgit GO111MODULE 64/pkg/tool/linu--show-toplevel sh -c printf '%s' "$1" sh /usr/bin/git -json GO111MODULE ache/go/1.25.8/xinstall 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 1726-33389/test-1033241738 --jq 2536863/b474/vet.cfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/api-consumption-report.md go /usr/bin/git re GO111MODULE 64/bin/go git conf�� user.email test@example.com /usr/bin/git -json GO111MODULE ode_modules/.bin--show-toplevel 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 1726-33389/test-1601117718/.gith--detach 2536863/b273/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p github.com/goccy--version -lang=go1.21 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile 359 1726-33389/test-2854064384 /tmp/go-build3632536863/b007/vet.cfg 64/pkg/tool/linux_amd64/vet go1.25.8 -c=4 -nolocalimports 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 ache/go/1.25.8/x64/pkg/tool/linu--auto /usr/bin/git se 2536863/b237/vet\n ache/go/1.25.8/x: git rev-�� --show-toplevel ache/go/1.25.8/xconfig /usr/bin/git /tmp/go-build282git -trimpath /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git sistency_WithImpgit remote.origin.urrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git runs/20260428-01git s/2/artifacts /opt/hostedtoolc--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 P9ch/sR1tjYVSqOEgo1.25.8 -buildtags /opt/hostedtoolc-nolocalimports -errorsas -ifaceassert -nilfunc /opt/hostedtoolc/tmp/go-build3632536863/b469/_testmain.go 2536�� g/cli 2536863/b420/_testmain.go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.8/x-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260428-011726-33389/test-2854064384 -buildtags ache/node/24.14.1/x64/bin/node l -ifaceassert -nilfunc git t-74�� bility_SameInputSameOutput3235152531/001/stability-test.md -tests /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ithub/workflows/archie.md -tests /usr/bin/git plate-expressiongit GO111MODULE x_amd64/compile git rev-�� --show-toplevel x_amd64/compile ache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go /tmp/go-build3632536863/b441/sliceutil.test (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/hostedtoolcconfig /usr/bin/git -unreachable=falgit /tmp/go-build363rev-parse 2536863/b309/vetHEAD git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git faultBranchFromLgit faultBranchFromLrev-parse /opt/hostedtoolc--show-toplevel 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 ithub/workflows/git GO111MODULE /opt/hostedtoolcHEAD git rev-�� --show-toplevel go /usr/bin/git FieldEnforcementgit GO111MODULE e/git 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/asm GOINSECURE 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 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 GO111MODULE 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 .github/workflows GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv ry=1 64/pkg/tool/linux_amd64/vet 2536863/b469/_pkg_.a mLsRemoteWithReagit mLsRemoteWithRearev-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/vet 2954161/b212/_pkgit GO111MODULE 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv GOMODCACHE go /usr/bin/infocmp 30/001/test-frongit GO111MODULE ache/go/1.25.8/x--show-toplevel infocmp -1 xterm-color go /usr/bin/git '**/*.ts' '**/*.git GO111MODULE ache/go/1.25.8/x--show-toplevel 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/TestGuardPolicyTrustedUsersRequiresMinIntegrity4006310623/001 remote ache/node/24.14.1/x64/bin/node ted/golang/pkg/fgit GO111MODULE x_amd64/vet git t-17�� k/gh-aw/gh-aw/.github/workflows/ai-moderator.md x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --git-dir 64/pkg/tool/linu-dwarf=false 2536863/b468/vet.cfg ortcfg GO111MODULE 64/pkg/tool/linu--show-toplevel gh run download 5 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile test-logs/run-5 V4ci/NWzImF-917Hrev-parse 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 1159508010/001' 1159508010/001' 64/bin/go git -C /tmp/compile-all-instructions-test-2771241457/.github/workflows config /usr/bin/gh remote.origin.urgit GO111MODULE 64/bin/go gh (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv L0nF/R3iUEqf5PFeb3NCkL0nF -buildtags /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet 2536�� licyMinIntegrityOnlymin-integrity_with_repos_array_c3453245550/001 2536863/b424/_testmain.go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link 001' 001' 64/bin/go /opt/hostedtoolcache/go/1.25.8/x-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/20260428-011726-33389/test-2854064384 -trimpath 1/x64/bin/node -p github.com/githurev-parse -lang=go1.25 2536863/b450/styles.test t-ha�� ithub/workflows/api-consumption-report.md test@example.com (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv run l ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet --detach /color.go x_amd64/compile ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 t0 rev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --pack_header=2,3 -q om/testorg/testrepo.git -json GO111MODULE 64/bin/go git rev-�� s/test.md go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv user.email ings.cjs 1/x64/bin/git cjs st/suppress-warnrun de_modules/.bin//tmp/go-handler-test-v46QOm/slow.go forks.js rev-�� HEAD st/suppress-warnings.cjs k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/git --bare full mode test ache/node/24.14.git rev-parse --abbrev-ref HEAD st/dist/workers/forks.js (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . tions/setup/js/node_modules/vite--stdout $name) { hasDiscussionsEnabled } } /tmp/bare-incremgit . /git git init�� -q st/suppress-warnings.cjs n-dir/git -m ode_modules/vite-C ache/node/24.14./home/REDACTED/work/gh-aw/gh-aw/.github/workflows st/dist/workers/config (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node _modules/.bin/git /tmp/bare-increm/opt/hostedtoolcache/node/24.14.1/x64/bin/node tions/setup/js/n--experimental-import-meta-resolve k/gh-aw/gh-aw/ac--require git init�� -q st/suppress-warn--conditions k/_temp/uv-pythodevelopment b27900be771c8621/usr/bin/gh 4c948886..HEAD t st/dist/workers/-f (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch .go git r: $owner, name: $name) { hasDiscussionsEnabled } } HEAD b6621f3f7f405a14-C es/.bin/git 1/x64/bin/node ve -q tions/setup/js/node_modules/vitest/suppress-warnings.cjs r: $owner, name: $name) { hasDiscussionsEnabled } } -exist 6a82e829a9d368ae-C bin/git tions/setup/js/nshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs ock.yml node --conditions development go run ithub/workflows git repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } featurewhoami ings.cjs p/bin/git /opt/hostedtoolcshow (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/vet /usr/bin/git ortcfg GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git 2954161/b196/_pkgit HJpH/bR5uMPu5Fr3rev-parse x_amd64/compile 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 /usr/bin/git -json GO111MODULE tions/setup/js/n--show-toplevel /usr/bin/git conf�� WorkflowFiles_TransitiveImports4084954212/001 ^remote\..*\.gh-resolved$ /usr/bin/git itbranch_with_hygit itbranch_with_hyrev-parse ache/go/1.25.8/x--show-toplevel /usr/bin/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 /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-2 2536863/b441/_testmain.go /usr/bin/git -json g/catmsg.go x_amd64/compile git -C /tmp/gh-aw-test-runs/20260428-011726-33389/test--errorsas l /usr/bin/git -json GO111MODULE x_amd64/vet 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 :latest --revs /usr/bin/git --thin --delta-base-offrev-parse -q git -C /tmp/TestGuardPolicyBlockedUsersCommaSeparatedCompiledOutput2634554715/001 remote om/owner/repo.git h ../../../.pretgit GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-3 remote /usr/bin/git -json age.go x_amd64/compile git rev-�� --show-toplevel x_amd64/compile ache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/vet 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 v1.0.0 git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen4165718414rev-parse /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -o /tmp/go-build1683565652/b469/workflow.test l /usr/bin/git -s -w -buildmode=exe 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-21 GOMOD GOMODCACHE x_amd64/compile ortc�� tmatter-with-nested-objects.md .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 2954161/b036/ GOMODCACHE 64/pkg/tool/linutest@example.com (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-29 GOMOD GOMODCACHE 64/pkg/tool/linu-buildtags ortc�� tmatter-with-arr-errorsas .cfg 64/pkg/tool/linu-nilfunc GOINSECURE 2954161/b007/ GOMODCACHE 64/pkg/tool/linufeature-branch (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-28 GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com ortc�� ned-imports-enabled-with-env-template-expressions-in-body.md om/goccy/go-yaml@v1.19.2/lexer/lexer.go 64/pkg/tool/linux_amd64/vet ata/action_pins.git GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (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 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE 2954161/b011/sysconfig ache/go/1.25.8/xuser.name 64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 gLhb/hBEUOkjpLNrZf4ikgLhb x_amd64/compile GOINSECURE g/x/crypto/chach/tmp/js-hash-test-3346666219/test-hash.js GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/asm env -json 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/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE ntdrain.test GOINSECURE ntio/asm/ascii 2954161/b011/sym--git-dir ntdrain.test 6325�� 3761508075 2536863/b022/vet.cfg .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (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/bin/go GOINSECURE GOMOD GOMODCACHE go env agent-persona-explorer.md 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/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linu-nolocalimports GOINSECURE b/gh-aw/pkg/consrev-parse GOMODCACHE 64/pkg/tool/linu/tmp/go-build3632536863/b459/_testmain.go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg ionpins.test GOINSECURE ntio/asm/keyset 2954161/b011/symuser.email ionpins.test 6325�� 3761508075/.github/workflows 2536863/b024/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env .js' --ignore-path .prettierignore 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/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name zm1t/ybsydLQ-bM8eUCGDzm1t 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 O_e3/jNiaaPEe3F5AUUx1O_e3 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE g/x/crypto/interrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name 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)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE 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 stmain.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE fips140/tls13 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-test.v=true (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 1297727565 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/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE 2954161/b011/rt0init ache/go/1.25.8/x64/src/runtime/r--show-toplevel 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE .cfg GOINSECURE fips140/mlkem 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/4/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/cgo GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/cgo env 1297727565 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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/nistec 2954161/b006/sym--git-dir 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 V4ci/NWzImF-917Hk3aRqV4ci 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 eyset.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/vet env g_.a @v1.19.2/token/token.go x_amd64/vet GOINSECURE GOMOD GOMODCACHE 9B8vwjI/_jU1qxM0sgM1d_TR1DWb (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE 64/pkg/tool/linu^remote\..*\.gh-resolved$ env gh-aw.wasm ($(du -h gh-aw.wasm | cut -f1))" SK0W/BJGJRDpSI4wKt0zQSK0W x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3632536863/b404/cli.test /tmp/go-build3632536863/b404/cli.test -test.testlogfile=/tmp/go-build3632536863/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-build1683565652/b404/cli.test /tmp/go-build1683565652/b404/cli.test -test.testlogfile=/tmp/go-build1683565652/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/x--json /usr/bin/git ApprovalLabelsCogit stmain.go ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git ithub/workflows -buildtags 2536863/b427/imp/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/gh -json GO111MODULE 1/x64/bin/node gh --ve�� erignore go /usr/bin/git ithub/workflows/du GO111MODULE ache/node/24.14./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 se 2536863/b004/vet.cfg tartedAt,updatedAt,event,headBranch,headSha,displayTitle -I /tmp/go-build282rev-parse -I x_amd64/vet 2954�� /tmp/go-build2822954161/b070/_pkg_.a pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/jsonrpc/jsonrpc.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p io/fs -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linumyorg (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 86_64/node GOINSECURE GOMOD GOMODCACHE go 1/x6�� y_with_repos_array_c3722234142/001 GO111MODULE 1/x64/bin/node 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 Gitmain_branch1369007486/001' Gitmain_branch1369007486/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/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go 3755�� -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/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env lGitmain_branch1369007486/001' lGitmain_branch1369007486/001' x_amd64/vet GOINSECURE eutil 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 o actions/setup-cli/install.sh..." 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 irent.go x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet 5051�� g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv (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 3755�� -json 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 se 2536863/b034/vet.cfg k -I /tmp/go-build282rev-parse -I ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet sRem�� /tmp/go-build2822954161/b099/_pkg_.a pkg/mod/golang.org/x/text@v0.36.0/internal/tag/tag.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p context -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 mLsRemoteWithRealGitcustom_branch802242587/001' mLsRemoteWithRealGitcustom_branch802242587/001' 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE go 1/x6�� -json 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 t/internal/langurev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go sRem�� -json GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD emclr_wasm.s x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD reempt_wasm.s x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env h ../../../.pret.prettierignore 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 se 2536863/b091/vet.cfg .cfg GOSUMDB GOWORK 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch runs/20260428-012151-58972/test-.artifacts[].name GOPROXY /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/cgo GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/cgo -V=f�� runs/20260428-012151-58972/test-1297727565 go /usr/bin/gh l GO111MODULE 64/bin/go gh (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-WxWbh7 /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 2 commits April 28, 2026 01:22
…e-computed schema diff step

- Add max-turns: 60 to engine config (was unconstrained, causing 138-turn runs)
- Add checkout: fetch-depth: 1, current: true for clean repo state
- Add pre-agent-steps with deterministic bash script that pre-computes:
  - All schema top-level fields (jq)
  - All yaml-tagged struct fields from pkg/parser and pkg/workflow (grep)
  - All frontmatter keys used in .github/workflows/*.md
  - Schema field types
  - Field gap diffs (in_schema_not_parser, in_parser_not_schema, etc.)
  - Writes result to /tmp/gh-aw/agent/schema-diff.json
- Update Implementation Steps to instruct agent to start from pre-computed data
- Update Efficiency guidelines to reinforce use of pre-computed data

Fixes: #28688 (deep-report right-size schema consistency checker)"

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/db6101c0-1700-4f5b-a09d-e116df370705

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…egy selection bash snippet

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/db6101c0-1700-4f5b-a09d-e116df370705

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — great work on the Schema Consistency Checker improvement! Adding a max-turns cap and pre-computing the schema diff via a deterministic bash pre-step is a solid approach to right-sizing this workflow.

One thing that would strengthen this PR before it moves out of draft:

  • Add tests — the diff touches schema-consistency-checker.md and its compiled lock file, but there are no corresponding test file changes. Even a simple smoke/integration test that validates the pre-computed schema-diff.json is generated correctly (or that the workflow produces the expected output) would help reviewers gain confidence in the change.

If you'd like a hand addressing this, you can assign the prompt below to your coding agent:

Add a test for the schema-consistency-checker pre-agent-steps bash script that pre-computes schema-diff.json into /tmp/gh-aw/agent/schema-diff.json.
The test should:
1. Run the bash script from the `pre-agent-steps` block in `.github/workflows/schema-consistency-checker.md`.
2. Assert that `/tmp/gh-aw/agent/schema-diff.json` is created and contains valid JSON.
3. Assert the JSON includes the expected top-level keys (e.g., added, removed, changed schema entries).
Place the test in the appropriate test directory for workflow integration tests.

Generated by Contribution Check · ● 1.1M ·

Copilot AI changed the title [WIP] Add chunking or deterministic pre-steps to Schema Consistency Checker feat: right-size schema-consistency-checker with max-turns cap and pre-computed schema diff Apr 28, 2026
Copilot AI requested a review from gh-aw-bot April 28, 2026 01:29
@pelikhan pelikhan marked this pull request as ready for review April 28, 2026 01:36
Copilot AI review requested due to automatic review settings April 28, 2026 01:36
@pelikhan pelikhan merged commit c20e60b into main Apr 28, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/deep-report-right-size-schema-checker branch April 28, 2026 01:37
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

Reduces Schema Consistency Checker run cost by capping Claude turns and precomputing schema/implementation/workflow key diffs before the agent session starts.

Changes:

  • Adds engine.max-turns: 60 for the Claude engine.
  • Introduces a pre-agent-steps script that writes /tmp/gh-aw/agent/schema-diff.json with precomputed field lists and gap diffs.
  • Updates the workflow prompt to start from the precomputed diff and emphasize targeted follow-up checks.
Show a summary per file
File Description
.github/workflows/schema-consistency-checker.md Adds max-turn cap, checkout config, pre-agent schema diff generation, and prompt guidance to consume the diff first.
.github/workflows/schema-consistency-checker.lock.yml Regenerated compiled workflow reflecting the new max-turns cap, checkout depth, and pre-agent step.

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: 4

pre-agent-steps:
- name: Pre-compute schema analysis data
run: |
set -e
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The script relies on pipelines (jq | sort, grep | ... | sort) but only uses set -e. Without set -o pipefail, failures in early pipeline stages can be missed, and the step may continue with partial/empty data. Consider enabling pipefail (and optionally -u) so extraction failures stop the workflow instead of silently degrading the diff.

Suggested change
set -e
set -eo pipefail

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +41
# 1. All top-level fields in the main JSON schema
SCHEMA_FIELDS=$(jq -r '.properties | keys[]' pkg/parser/schemas/main_workflow_schema.json 2>/dev/null | sort -u || echo "")

Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

SCHEMA_FIELDS falls back to an empty string on error (2>/dev/null plus || echo ""), and jq ... | sort -u will also exit 0 if jq fails (because sort succeeds). This can produce a misleading schema-diff.json that looks valid but is missing schema fields. Prefer failing fast or explicitly validating that the schema file exists and SCHEMA_FIELDS is non-empty.

Copilot uses AI. Check for mistakes.
Comment on lines +63 to +66
USED_FIELDS=$(grep -rh '^[a-z][a-z0-9_-]*:' .github/workflows/*.md 2>/dev/null \
| sed 's/:.*//' \
| grep -v '^#' \
| sort -u || echo "")
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

USED_FIELDS is intended to be “top-level frontmatter keys actually used”, but the current grep scans the entire .md file contents. Many workflows contain fenced YAML snippets in the body (```yaml blocks) with key: lines at column 1, so this will pick up keys from examples/documentation rather than only the real frontmatter. Consider extracting only the frontmatter section (between the initial `---` and the closing `---`) before grepping for `^[a-z][a-z0-9_-]*:` keys.

Suggested change
USED_FIELDS=$(grep -rh '^[a-z][a-z0-9_-]*:' .github/workflows/*.md 2>/dev/null \
| sed 's/:.*//' \
| grep -v '^#' \
| sort -u || echo "")
USED_FIELDS=$(
for file in .github/workflows/*.md; do
[ -f "$file" ] || continue
awk '
NR == 1 && $0 == "---" { in_frontmatter = 1; next }
in_frontmatter && $0 == "---" { exit }
in_frontmatter { print }
' "$file"
done 2>/dev/null \
| grep '^[a-z][a-z0-9_-]*:' \
| sed 's/:.*//' \
| grep -v '^#' \
| sort -u || echo ""
)

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +54
# 3. yaml-tagged struct fields in pkg/workflow/*.go
WORKFLOW_YAML_FIELDS=$(grep -rh 'yaml:"' pkg/workflow/*.go 2>/dev/null \
| grep -o 'yaml:"[^"]*"' \
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

WORKFLOW_YAML_FIELDS is extracted from pkg/workflow/*.go, which includes many *_test.go files. Several of those tests define yaml:"..." tags (e.g., pkg/workflow/config_scaffold_helpers_test.go), so the computed field list/gaps can include test-only tags and skew the diff. Consider excluding *_test.go (and optionally applying the same exclusion for pkg/parser).

Copilot uses AI. Check for mistakes.
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.

[deep-report] Right-size Schema Consistency Checker: add chunking or deterministic pre-steps to cut 8.1M-token/138-turn runs

4 participants