Skip to content

Improve compiler error messages for invalid engine: types#25821

Merged
pelikhan merged 4 commits intomainfrom
copilot/improve-error-messages-engine-type
Apr 11, 2026
Merged

Improve compiler error messages for invalid engine: types#25821
pelikhan merged 4 commits intomainfrom
copilot/improve-error-messages-engine-type

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

engine: 123 (wrong type) produced raw JSON Schema jargon ('oneOf' failed, none matched) with no guidance on valid values. Meanwhile engine: copiilot (typo) produced a rich error but without source context lines. The two paths had completely inconsistent quality.

cleanOneOfMessage fallback for all-type-conflict oneOf failures

When every oneOf branch fails with a type mismatch, meaningful is empty and the function returned raw jargon. Now calls synthesizeOneOfTypeConflictMessage which extracts got/want types and produces plain English. knownOneOfFieldHints adds field-specific guidance for /engine.

Before: 'oneOf' failed, none matched: got number, want string; got number, want object
After: expected string or object, got number. Valid engine names: claude, codex, copilot, gemini.

Tighter isTypeConflictLine detection

The previous implementation matched any ": got X, want Y" pattern, which false-positived on constraint violations like minItems: got 0, want 1. Now validates that both got/want values are JSON Schema type names (string, object, array, number, integer, boolean, null).

Source context lines for engine name errors

Added formatCompilerErrorWithContext and readSourceContextLines so engine resolution errors (engine: copiilot) now render Rust-style source snippets, matching what schema validation already produces.

test.md:2:1: error: invalid engine: copiilot. Valid engines are: claude, codex, copilot, gemini.
Did you mean: copilot?
1 | ---
2 | engine: copiilot
    ^^^^^^
3 | on: push

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 /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE cfg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 2135528103 cQ7c/qW3Yktv_0Qvrev-parse 809261/b397/cli.--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD ode-gyp-bin/sh go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 heck '**/*.cjs' -p GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/sh y.s (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } 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 ../../../.pretti--get x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node " GO111MODULE 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� GOMODCACHE 64/pkg/tool/linux_amd64/asm /usr/bin/git LsRemoteWithRealgit LsRemoteWithRealrev-parse 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node k/gh-aw/gh-aw/.ggit :latest /opt/hostedtoolc--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� GOMODCACHE go /usr/bin/git k/gh-aw/gh-aw GO111MODULE lock.yml git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha k/gh-aw/gh-aw/.github/workflows/artifacts-summary.md git /opt/hostedtoolcache/node/24.14.1/x64/bin/node --show-toplevel /bin/sh /usr/bin/git node /tmp�� /tmp/TestHashStability_SameInputSameOutput2674304008/001/stability-test.md git /usr/bin/git --show-toplevel git k/_temp/uv-pytho--show-toplevel 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 --show-toplevel /home/REDACTED/go/pkg/mod/golang.org/x/oauth2@v0.35.0/deviceauth.go /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260411-145631-45332/test-3561876248/.github/workflows l /usr/bin/git ck '**/*.cjs' '*git GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha sistency_InlinedImports3223806349/001/noflag-a.md --json /usr/bin/git --repo owner/repo -importcfg git rev-�� --show-toplevel go /usr/bin/infocmp -json GO111MODULE r: $owner, name:--show-toplevel infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git .cfg --show-toplevel /usr/bin/gh /usr/bin/git 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 14/001/test-frontmatter-with-env-template-expressions.md JmzP4TwGo 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurepos/{owner}/{repo}/actions/runs/12345/artifacts env ortcfg GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE 1737525/b092/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linuother /usr/bin/git ut314454272/001 lNGu_38wk 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git jYhsBWmby GO111MODULE Name,createdAt,s--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git /tmp/go-build199git cfg /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linutest@example.com /usr/bin/git runs/20260411-14git -trimpath t 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 image:v1.0.0 x_amd64/compile /usr/bin/git ub/workflows --check 64/bin/go git rev-�� --git-dir r_wasm.s /usr/bin/git -json GOMOD x_amd64/vet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha GOMODCACHE x_amd64/compile /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-buildtags /usr/bin/git itattributes-tesgit -trimpath 1/x64/bin/node git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-tests /usr/bin/git ring247062611/00git k/gh-aw/gh-aw/pkrev-parse 1/x64/bin/node 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 --show-toplevel go /usr/bin/git ortcfg gmGb0FnMM ache/go/1.25.8/xbfd775f383b1637f1737debdc6da5cd25884b46f..HEAD git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/stringutil/identifiers.go /usr/bin/git ortcfg GO111MODULE ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel git /usr/bin/git 1/001/test-simplgit show ck git rev-�� --show-toplevel git /usr/bin/git 898/001/stabilitgit rev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -goversion go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1991737525/b199/importcfg -pack 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 heck '**/*.cjs' -p GO111MODULE 64/bin/go GOINSECURE GOMOD wasm.s go env ck 'scripts/**/*-errorsas 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 -json go 64/bin/go GOINSECURE GOMOD erignore go m/_n�� -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 HEAD .github/workflows/test.md /usr/bin/git prettier --check 64/bin/go git rev-�� --git-dir go /usr/bin/git m/workflows -f x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --get remote.origin.url /usr/bin/git b/workflows GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --git-dir go /usr/bin/git k/gh-aw/gh-aw/.ggit GO111MODULE me: String!) { --show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /opt/pipx_bin/bash plate-expressiongit git /usr/bin/git bash --no�� --noprofile git /opt/hostedtoolcache/node/24.14.1/x64/bin/bash d /opt/hostedtoogit /opt/hostedtoolcrev-parse /usr/bin/git bash (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 /tmp/gh-aw-test-runs/20260411-145631-45332/test-2135528103 rev-parse /usr/bin/git @{u} --check 64/bin/go git conf�� user.name Test User /usr/bin/git m/workflows GOCACHE 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha remove origin /usr/bin/git ub/workflows GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node k/gh-aw/gh-aw GO111MODULE x_amd64/link /opt/hostedtoolcache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git ache/node/24.14.1/x64/bin/node ntent.md git /usr/bin/git bash t-16�� k/gh-aw/gh-aw/.github/workflows/approach-validator.md git /home/REDACTED/go/bin/bash --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git bash (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 /tmp/go-build456809261/b385/_pkg_.a -trimpath /usr/lib/git-core/git -p github.com/githurev-parse -lang=go1.25 /usr/lib/git-core/git rev-�� --objects l /usr/bin/git --exclude-hiddengit --all --quiet git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha runs/20260411-151345-69795/test-3701056932/custom/workflows go /usr/bin/git l GO111MODULE r: $owner, name:--show-toplevel git push�� origin (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel infocmp /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel gh /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 1737525/b167/_pkg_.a rg/x/text@v0.35.0/language/coverage.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE fips140hash 1737525/b021/sym--show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env archie.md _cnJ/4Be12s2Y-OeyZeOx_cnJ 1737525/b244=> GOINSECURE t/internal/numberev-parse GOMODCACHE xKmVsqy/YJ5NFFBq0vHZ2JhwELHt (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 1737525/b193/_pkg_.a 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 1737�� -json hW2J/wOV8HATkBOuFSSLThW2J /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha approach-validator.md tmain.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url -o 1737525/b118/importcfg RS1g/SSt3JQqVRjkcjNZiRS1g /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p internal/goarch -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/xrepos/{owner}/{repo}/actions/runs/1/artifacts (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 4603199/b417/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env yp0Q/zuO9lk-rfYYGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 4603199/b417/impGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha 4603199/b389/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/cli GOMODCACHE go env lYjm/mvFS8umehXKGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 4603199/b389/impGOPROXY (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE r: $owner, name:-f GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha -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/docker/metadata-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha 07a9d4d84ff7a3b 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/docker/setup-buildx-action/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha -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
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/approach-validator.md x_amd64/compile /usr/bin/git npx prettier --cgit o x_amd64/compile git conf�� user.name Test User /usr/bin/git ub/workflows scripts/**/*.js 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git 8253512/b001/exegit GO111MODULE me: String!) { --show-toplevel git rev-�� --show-toplevel go /usr/bin/git go :latest x_amd64/link git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel git /usr/local/sbin/bash --show-toplevel git /usr/bin/git bash --no�� --noprofile git /home/REDACTED/.config/composer/vendor/bin/bash --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git bash (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 sistency_GoAndJavaScript1058962714/001/test-simple-frontmatter.m-s -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/link -p github.com/githurev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/link pack�� 809261/b449/typeutil.test --revs ache/node/24.14.1/x64/bin/node --thin --delta-base-offrev-parse -q r96T_MkWd-kcE/_kz8wMEZNDzYl9ptOGPo/5GniUk8RBwwF8S8eKncR/xY8IG6Crremote2 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha k/gh-aw/gh-aw/.github/workflows blob /usr/lib/git-core/git -json GO111MODULE 64/bin/go /usr/lib/git-core/git main�� run (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git ndor/bin/bash --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 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 -bool -buildtags ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -errorsas -ifaceassert -nilfunc ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -c 809261/b449/_pkg_.a git-receive-pack '/tmp/TestParseDefaultBranchFrononexistent-workflow 809261/b449=> -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha ithub/workflows/ai-moderator.md --merged=5279016c3bedd37307d83b9483f5636c0c932768 /usr/bin/git -json GO111MODULE repository(owne--show-toplevel git add . go /usr/bin/git -json GO111MODULE repository(owne--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name SUy_HbpQE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env 4177941733 InX8DV7o_ x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 ri/jsonschema/v6-c=4 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/tmp/go-build456809261/b455/_testmain.go env g_.a Y_7BzNNuM ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE chema/v6 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 me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE git -C rity1066583597/001 show de/node/bin/bash GOSUMDB GOWORK ed } } git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a GO111MODULE til.test GOINSECURE GOMOD abis til.test (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env 1567170079 uVfRvwDwi 64/pkg/tool/linux_amd64/link GOINSECURE go-sdk/internal/rev-parse GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE infocmp -1 k/gh-aw/gh-aw GOPROXY kflows/duplicate-code-detector.lock.yml GOSUMDB GOWORK DiscussionsEnabl--git-dir infocmp (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env ithub/workflows rrG8ct2Bi 64/pkg/tool/linux_amd64/compile GOINSECURE /norm GOMODCACHE 64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a B-Au8vNkW /opt/hostedtoolcache/go/1.25.8/x-lang=go1.25 GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name LsRemoteWithRealGitcustom_branch2314883186/001' compliance.lock.yml l GOMOD DiscussionsEnabl--show-toplevel /usr/bin/gh api edOutput219472915/001 -f me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } l owner=github -f /usr/bin/gh (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 rotocol/go-sdk@v1.5.0/jsonrpc/jsonrpc.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env or.md dq87ptaK6 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 0/feature/plural-nolocalimports 64/pkg/tool/linu-importcfg GOINSECURE cha8_stub.o 64/src/internal/--git-dir 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/scripts/lint_error_messages_test.go env g_.a QuPWq4ACQ k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-extld=gcc (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name itbranch_with_hyphen1200323832/002/work (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 0/internal/tag/tag.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linutest@example.com env 4177941733 KjIdi_zAe 64/pkg/tool/linux_amd64/vet GOINSECURE gset GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 0/message/catalog/catalog.go 64/pkg/tool/linux_amd64/compile GOINSECURE exbyte_wasm.o 64/src/internal/user.name 64/pkg/tool/linuTest User env 3238608931/.github/workflows PcfUGjA_S ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE t 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 GOPROXY kflows/daily-safe-output-optimizer.lock.yml GOSUMDB GOWORK 64/bin/go git -C k/gh-aw/gh-aw/.github/workflows rev-parse me: String!) { repository(owne-nilfunc l GO111MODULE DiscussionsEnabled } } git (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 0/internal/stringset/set.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env g_.a ortcfg x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 0/internal/format/format.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env 3238608931 fG0BeREzZ ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GOPROXY k-maintainer.lock.yml GOSUMDB GOWORK 64/bin/go git -C k/gh-aw/gh-aw config kflows/firewall.lock.yml remote.origin.urgit GO111MODULE 64/bin/go git (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 ohNRO1y8b 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a go ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE age GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 0/message/catalog.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a J9_2Hh5RJ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE chema/v6/kind 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/5/artifacts --jq .artifacts[].name LsRemoteWithRealGitbranch_with_hyphen1200323832/001' /usr/bin/infocmp l GOMOD GOMODCACHE infocmp -1 k/gh-aw/gh-aw/.github/workflows :latest (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -c=4 -nolocalimports -importcfg /tmp/go-build456809261/b411/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.go env heck '**/*.cjs' -p 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 erignore x_amd64/cgo 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 GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url env g_.a UHEwN-QbQ 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/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 --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a Bzwz7Kv-X ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-tests /usr/bin/git Z_8Baherd GO111MODULE ache/go/1.25.8/xgit-upload-pack 'origin' git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel infocmp /usr/bin/git k/gh-aw/gh-aw go 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a go /usr/bin/gh git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel git ache/node/24.14.1/x64/bin/node --show-toplevel infocmp /usr/bin/git ache/node/24.14.1/x64/bin/node 3797�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha report.md 1y3cTijPK 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env tdrain.test BBDxPPYcw rtcfg.link GOINSECURE GOMOD GOMODCACHE W9FT-FP7_6Kws9t3pd/XJ3yBE12j21iuxq3TT-m/ckFlJ1_QJryYY7Ze7qGx (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha y_only_defaults_repo3649907738/001 show t-tools.lock.yml GOSUMDB GOWORK 64/bin/go git -C on show /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/git /tmp/TestGuardPobash rev-parse /opt/hostedtoolc--noprofile git rev-�� --show-toplevel node /usr/bin/git /tmp/TestHashConbash (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 ck 'scripts/**/*-p 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/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha ithub/workflows GO111MODULE .yml GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/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 -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env Gitmain_branch2564976723/001' Gitmain_branch2564976723/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/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json o 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 -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env lGitmain_branch2564976723/001' lGitmain_branch2564976723/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/v3.0.0 --jq .object.sha -json GO111MODULE r: $owner, name:-nilfunc GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha run lint:cjs 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --check 'scripts/**/*GOINSECURE node 64/bin/go --write **/*.cjs 64/bin/go go (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha edOutput3881834280/001 DW6KATJ4J 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env ortcfg qbNVEaFt_ k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha y_with_explicit_repo1612369373/001 config x_amd64/vet l GOWORK ed } } x_amd64/vet -1 k/gh-aw/gh-aw erignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go /opt/hostedtoolc--noprofile git rev-�� --show-toplevel node /usr/bin/git /tmp/TestHashConbash go /opt/hostedtoolc--noprofile git (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 l/errors GOMODCACHE go env SaeZgGgAk GO111MODULE k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOSUMDB GOWORK ed } } git -C 3339360433 show er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnablxterm-color ck 'scripts/**/*git GO111MODULE 64/bin/go git (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 ache�� -json .go 64/bin/go GOINSECURE GOMOD GOMODCACHE erignore (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE erignore (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build456809261/b397/cli.test /tmp/go-build456809261/b397/cli.test -test.testlogfile=/tmp/go-build456809261/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build1991737525/b217/importcfg -pack env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build2182228037/b397/cli.test /tmp/go-build2182228037/b397/cli.test -test.testlogfile=/tmp/go-build2182228037/b397/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 ache/go/1.25.8/x-f 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 heck '**/*.cjs' -p d.go 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 lock.yml GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

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

… and source context

- Add synthesizeOneOfTypeConflictMessage to produce clear messages when all
  oneOf branches fail with type conflicts (e.g., "expected string or object,
  got number" instead of raw "'oneOf' failed, none matched" jargon)
- Add knownOneOfFieldHints for engine field with valid names and example
- Tighten isTypeConflictLine to only match JSON type names, avoiding false
  positives on constraint violations (minItems, minimum, etc.)
- Add formatCompilerErrorWithContext for Rust-style source code snippets
- Add readSourceContextLines helper for extracting context around errors
- Include source context lines for engine name errors (copiilot → copilot)

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4ef34459-f10f-4f84-aa25-c38e4d7d2de1

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve clarity of compiler error messages for invalid engine types Improve compiler error messages for invalid engine: types Apr 11, 2026
Copilot AI requested a review from pelikhan April 11, 2026 15:29
@pelikhan pelikhan marked this pull request as ready for review April 11, 2026 15:35
Copilot AI review requested due to automatic review settings April 11, 2026 15:35
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

Improves workflow compiler diagnostics by synthesizing clearer messages for oneOf type-conflict failures (notably for invalid engine: types) and by adding Rust-style source context snippets to engine resolution errors.

Changes:

  • Add a oneOf fallback path that synthesizes plain-English “expected X, got Y” messages when all branches fail due to type mismatch, with /engine-specific guidance.
  • Tighten isTypeConflictLine detection to only treat JSON Schema type-name pairs as type conflicts (avoids false positives like minItems: got 0, want 1).
  • Add context-aware compiler error formatting so engine errors can include source snippets.
Show a summary per file
File Description
pkg/workflow/frontmatter_error.go Adds helper to extract surrounding source lines for context rendering.
pkg/workflow/frontmatter_error_test.go Adds unit tests for source-context extraction.
pkg/workflow/compiler_yaml_test.go Updates expected message to match synthesized oneOf type-conflict output.
pkg/workflow/compiler_orchestrator_workflow.go Uses the new context extraction + formatter when engine setup fails.
pkg/workflow/compiler_error_formatter.go Adds a context-capable compiler error formatting function.
pkg/parser/schema_errors.go Synthesizes plain-English oneOf type-conflict messages; refines type-conflict detection.
pkg/parser/schema_errors_test.go Expands tests for the new oneOf synthesis and stricter type-conflict detection.

Copilot's findings

Tip

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

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

Comment on lines +33 to +45
// Calculate the expected first line of the context window
expectedFirstLine := targetLine - contextSize/2
fileStart := max(0, expectedFirstLine-1) // 0-indexed, clamped to file start

var contextLines []string

// Pad with empty strings for lines that are before the file
for lineNum := expectedFirstLine; lineNum < 1; lineNum++ {
contextLines = append(contextLines, "")
}

// Add real lines from the file
fileEnd := min(len(allLines), fileStart+contextSize-len(contextLines))
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

readSourceContextLines builds a fixed-size context window at the start of the file (padding before line 1), but near end-of-file it can return fewer than 7 lines without shifting the window upward. console.renderContext assumes context[0] corresponds to (Position.Line - len(Context)/2), so a shortened slice will mislabel line numbers and may place the caret on the wrong line. Consider ensuring the returned slice is always centered on targetLine (e.g., shift the start earlier when close to EOF so you still return up to 7 real lines) to keep renderContext’s line-number math correct.

Suggested change
// Calculate the expected first line of the context window
expectedFirstLine := targetLine - contextSize/2
fileStart := max(0, expectedFirstLine-1) // 0-indexed, clamped to file start
var contextLines []string
// Pad with empty strings for lines that are before the file
for lineNum := expectedFirstLine; lineNum < 1; lineNum++ {
contextLines = append(contextLines, "")
}
// Add real lines from the file
fileEnd := min(len(allLines), fileStart+contextSize-len(contextLines))
// Calculate the expected first line of the centered context window.
expectedFirstLine := targetLine - contextSize/2
// Count how many leading positions in the window fall before the file start.
padBefore := max(0, 1-expectedFirstLine)
// Start from the expected first file line, clamped to the beginning of the file.
fileStart := max(0, expectedFirstLine-1) // 0-indexed
// Keep the real-file portion of the window at a stable size near EOF by
// shifting the start upward when the centered window would otherwise run
// past the end of the file.
realLineCount := contextSize - padBefore
maxFileStart := max(0, len(allLines)-realLineCount)
fileStart = min(fileStart, maxFileStart)
var contextLines []string
// Pad with empty strings for lines that are before the file.
for i := 0; i < padBefore; i++ {
contextLines = append(contextLines, "")
}
// Add up to the remaining window size from the file.
fileEnd := min(len(allLines), fileStart+realLineCount)

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +123
content := []byte("---\nengine: 123\non: push\n---\n# Workflow")

tests := []struct {
name string
targetLine int
wantLen int
wantAny string // at least this substring appears in the joined output
}{
{
name: "context around engine line",
targetLine: 2,
wantLen: 7,
wantAny: "engine: 123",
},
{
name: "context near start of file",
targetLine: 1,
wantLen: 7,
wantAny: "---",
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
lines := readSourceContextLines(content, tt.targetLine)
assert.LessOrEqual(t, len(lines), tt.wantLen, "context should not exceed %d lines", tt.wantLen)
assert.NotEmpty(t, lines, "context should not be empty")

joined := strings.Join(lines, "\n")
assert.Contains(t, joined, tt.wantAny,
"context should contain the target line content")
})
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

TestReadSourceContextLines currently exercises target lines at the start of the file, but doesn’t cover a target line near EOF where the context window can be truncated. Adding a case near the end of the content would catch off-by-one/misaligned line-number issues in the context rendering (especially given renderContext’s centering assumptions).

Copilot uses AI. Check for mistakes.
…n-English error synthesis

Generated by the Design Decision Gate workflow to document the architectural decisions
in PR #25821: adopting Rust-style compiler error rendering with source context lines
and plain-English synthesis for JSON Schema oneOf type-conflict failures.

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

Commit pushed: faacd9c

🏗️ 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 (285 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/25821-rust-style-source-context-and-plain-english-synthesis-for-compiler-errors.md

The draft covers the two main design decisions identified in the diff:

  1. Rust-style source context rendering — adopting formatCompilerErrorWithContext + readSourceContextLines (±3 lines) as the standard for field-level engine errors, replacing position-only formatting
  2. Plain-English oneOf type-conflict synthesis — calling synthesizeOneOfTypeConflictMessage when all oneOf branches fail with type mismatches, plus field-specific hint table (knownOneOfFieldHints) for /engine

It also records the alternatives considered (generic type message, dynamic engine catalog lookup, status-quo position-only) and the key trade-off around the static knownOneOfFieldHints table going stale.

What to do next

  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete missing sections — add any context the AI couldn't infer (e.g., whether this pattern is intended to spread to other fields beyond /engine, or if there's a wider roadmap for compiler UX)
  3. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-25821: Rust-Style Source Context and Plain-English Synthesis for Compiler Errors

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

Why ADRs Matter

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you — especially when someone asks "why is the engine hint list hardcoded?" or "should other fields also get Rust-style context snippets?"


📋 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., 25821-rust-style-*.md for PR #25821).

🔒 This PR has been marked as requesting changes. It cannot merge until an ADR is linked in the PR body.

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don'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 🏗️ · ● 173.7K ·

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.

This PR requires an Architecture Decision Record (ADR) before it can merge. It adds 285 new lines of code in pkg/ (a core business logic directory) covering two significant design decisions: Rust-style source context rendering for engine errors and plain-English synthesis for JSON Schema oneOf type-conflict failures.

A draft ADR has been generated and committed to your branch at docs/adr/25821-rust-style-source-context-and-plain-english-synthesis-for-compiler-errors.md. Please review, complete, and link it in the PR body. See the comment above for detailed instructions.

@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 93/100

Excellent test quality

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

Test Classification Details

📋 All 13 test cases (click to expand)
Test File Classification Issues Detected
TestCleanOneOfMessage/"all type conflicts synthesizes plain-English message" pkg/parser/schema_errors_test.go ✅ Design Updated expectation enforces new synthesis behavior; uses wantNot + wantAny
TestCleanOneOfMessage/"engine type conflict produces actionable message" pkg/parser/schema_errors_test.go ✅ Design Verifies actionable user-facing hints ("Valid engine names", "copilot")
TestSynthesizeOneOfTypeConflictMessage/"engine field with number type produces actionable message" pkg/parser/schema_errors_test.go ✅ Design Tests the new synthesis function directly with engine-specific hints
TestSynthesizeOneOfTypeConflictMessage/"unknown field produces generic message without hints" pkg/parser/schema_errors_test.go ✅ Design Fallback path — no field-specific hints emitted
TestSynthesizeOneOfTypeConflictMessage/"bare got-want without path" pkg/parser/schema_errors_test.go ✅ Design Edge case: input with no at '/path': prefix
TestSynthesizeOneOfTypeConflictMessage/"no type conflicts returns fallback" pkg/parser/schema_errors_test.go ✅ Design Edge case: empty sub-errors → fallback string "schema validation failed"
TestIsTypeConflictLine/"minItems constraint is not a type conflict" pkg/parser/schema_errors_test.go ✅ Design Negative case — constraint violation must not be misclassified
TestIsTypeConflictLine/"minimum constraint is not a type conflict" pkg/parser/schema_errors_test.go ✅ Design Negative case — numeric minimum constraint
TestIsTypeConflictLine/"maximum constraint is not a type conflict" pkg/parser/schema_errors_test.go ✅ Design Negative case — numeric maximum constraint
TestIsTypeConflictLine/"got number want integer is a type conflict" pkg/parser/schema_errors_test.go ✅ Design Positive case — confirms correct classification of numeric type conflict
compiler_yaml_test.go — updated expected message pkg/workflow/compiler_yaml_test.go ✅ Design End-to-end: updates expected user-facing compiler error message to match new synthesized format
TestReadSourceContextLines/"context around engine line" pkg/workflow/frontmatter_error_test.go ✅ Design Verifies context window contains target line content
TestReadSourceContextLines/"context near start of file" pkg/workflow/frontmatter_error_test.go ✅ Design Edge case: boundary condition — context window at start of file

Flagged Tests — Requires Review

No tests require mandatory review. One minor observation is noted below.

💡 Minor — TestReadSourceContextLines (pkg/workflow/frontmatter_error_test.go)

Observation: wantLen is asserted with assert.LessOrEqual, checking only that the window does not exceed 7 lines. If the implementation returned just 1 line (a regression in window size), the test would still pass. Consider adding a lower-bound assertion (e.g., assert.GreaterOrEqual(t, len(lines), 3, "context window should include surrounding lines")) to guard against context-window shrinkage.

This does not affect the score — the test still enforces the behavioral contract that context is non-empty and contains the target content.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 13 test cases across 3 files — all unit (//go:build !integration)
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests (no JS test files changed in this PR)

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All tests enforce observable behavioral contracts — error message content, synthesis logic, and context-window boundaries. Build tags are present on all modified test files. No mock libraries used. All assertions carry descriptive messages.


📖 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.

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

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: 93/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 13 new/modified test cases enforce behavioral contracts on observable outputs, with strong error and edge-case coverage (77%). No coding-guideline violations detected.

@pelikhan pelikhan merged commit b60ca57 into main Apr 11, 2026
@pelikhan pelikhan deleted the copilot/improve-error-messages-engine-type branch April 11, 2026 15:44
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] Compiler error messages for invalid engine: types lack clarity and actionability

3 participants