Skip to content

fix: skip boolean/null literal wrapping in runtime imports#25831

Merged
pelikhan merged 2 commits intomainfrom
copilot/workflow-health-fix-engine-crash
Apr 11, 2026
Merged

fix: skip boolean/null literal wrapping in runtime imports#25831
pelikhan merged 2 commits intomainfrom
copilot/workflow-health-fix-engine-crash

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Runtime import processing wraps {{#if expr}} conditionals into {{#if ${{ expr }} }} for GitHub Actions evaluation, then extracts them to __GH_AW_*__ placeholders. For boolean/null literals (true, false, null), this creates __GH_AW_TRUE__/__GH_AW_FALSE__/__GH_AW_NULL__ placeholders that have no corresponding env var (compile-time extraction doesn't see runtime-imported content), so they remain unsubstituted and the placeholder validator rejects the prompt.

The daily-rendering-scripts-verifier workflow hit this — its prompt contains {{#if true}}/{{#if false}} as test inputs for render_template.cjs, blocking daily execution.

Changes

  • actions/setup/js/runtime_import.cjswrapExpressionsInTemplateConditionals() now returns early for true, false, null literals instead of wrapping them. These are self-evaluating; isTruthy() in the template renderer handles them directly.
// Before: true/false/null were treated as GitHub Actions expressions
const looksLikeGitHubExpr =
  (/^[a-zA-Z]/.test(trimmed) && trimmed.includes(".")) ||
  trimmed === "true" ||   // ← created unresolvable __GH_AW_TRUE__
  trimmed === "false" ||  // ← created unresolvable __GH_AW_FALSE__
  trimmed === "null";     // ← created unresolvable __GH_AW_NULL__

// After: early return before the wrapping check
if (trimmed === "true" || trimmed === "false" || trimmed === "null") {
  return match; // leave as-is for direct isTruthy() evaluation
}
  • actions/setup/js/runtime_import.test.cjs — Updated test expectations: true/false/null are now in a "must be left unchanged" describe block instead of "must be wrapped".

Note: the Go-side wrapExpressionsInTemplateConditionals is unaffected — it wraps these literals too, but the compile-time path creates the corresponding env var mappings so substitution succeeds.

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 ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 438458/b217/_pkggit i2Jk/kxQktkbJrdZrev-parse 5240352/b397/cli--show-toplevel git (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 /tmp/go-build166-p -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE y.s (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 image:v1.0.0 go /usr/bin/gh from .github/aw git GO111MODULE 64/pkg/tool/linu--show-toplevel gh run list --json /usr/bin/git --workflow nonexistent-workrev-parse --limit 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 sistency_InlinedImports4254739590/001/inlined-b.md /home/REDACTED/go/pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/oauthex/auth_meta.go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go om/owner/repo.git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha g_.a aTWjRYknE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE util GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu--auto env EklR7_A7a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE 438458/b092/ GOMODCACHE ortcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linuremote1 /usr/bin/git ut102948232/001 LvhFNvMoO 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git plorer.md GO111MODULE x_amd64/compile git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x1 /usr/bin/git /tmp/go-build739git pkg/mod/golang.orev-parse /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-16git -trimpath /bin/sh 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 add origin /usr/bin/git ub/workflows GO111MODULE 64/bin/go git rev-�� --show-toplevel go 5240352/b458/vet.cfg -json GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha add myorg /usr/bin/git repo1508394285/0git GO111MODULE 64/bin/go git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel 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 vaScript25214149git -trimpath /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuAdd workflow /usr/bin/git runs/20260411-16git pkg/mod/golang.orev-parse /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel go /usr/bin/git L5Pf2dzjr 3314536dccd26c06format-patch ache/go/1.25.8/x3bf854665adeced070001716b0a3bfacd9ed01c4..HEAD git rev-�� --show-toplevel ache/go/1.25.8/x12346 /usr/bin/git 438458/b056/_pkggit om/modelcontextprev-parse ache/go/1.25.8/x--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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build739438458/b250/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD tomic_wasm.s go env -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go 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 add upstream /usr/bin/git -json GO111MODULE x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git m/workflows GO111MODULE 64/pkg/tool/linu--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 --get remote.origin.url /usr/bin/git ub/workflows GO111MODULE 64/bin/go git rev-�� --git-dir go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /tmp/go-build4215240352/b393/_pkg_.a -trimpath /usr/lib/git-core/git -p main -lang=go1.25 /usr/lib/git-core/git rev-�� --objects --stdin /usr/bin/git --exclude-hiddengit --all --quiet 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 438458/b091/_pkg_.a rg/x/text@v0.35.0/internal/number/common.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha edcfg GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 438458/b214/_pkg_.a V7o_/18xeupG6XnJInX8DV7o_ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE g/x/net/http/httrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -p 5240352/b412/_pkg_.a hPW9/JwXM9fVV_p6N5EVshPW9 5240352/b412=> -I /tmp/go-build739rev-parse -I /opt/hostedtoolcache/go/1.25.8/xrepos/{owner}/{repo}/actions/runs/2/artifacts (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 /tmp/gh-aw-test-runs/20260411-163501-32335/test-413657337 rev-parse /usr/bin/git @{u} 1.5.0/oauthex/aurev-parse x_amd64/compile git rev-�� --git-dir x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/vet 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 ithub/workflows/ai-moderator.md -importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/link -s -w -buildmode=exe ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /tmp�� 5240352/b449/typeutil.test -extld=gcc 5240352/b449/importcfg.link /tmp/go-build166git -trimpath 64/bin/go r96T_MkWd-kcE/_kz8wMEZNDzYl9ptOGPo/5GniUk8RBwwF8S8eKncR/xY8IG6Cr96T_MkWd-kcE (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 -aw/git/ref/tags/v1.2.3 -trimpath 1/x64/bin/node -p github.com/githurev-parse -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile t-ha�� ithub/workflows/architecture-guardian.md my-default 5240352/b449=> -c=4 -nolocalimports -importcfg 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 _3ywvdE5S 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env _.a InX8DV7o_ 64/pkg/tool/linux_amd64/compile GOINSECURE pguts GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 0/feature/plural/common.go 64/pkg/tool/linux_amd64/compile GOINSECURE l_wasm.o 64/src/internal/user.email 64/pkg/tool/linutest@example.com env 1985247583/.github/workflows JWpi-bmPh ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
  • 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 _.a QyquJZDcH util.test GOINSECURE GOMOD GOMODCACHE util.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 _.a JtV1iahb4 /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE go-sdk/internal/init 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 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a LZuHOSZyr 64/pkg/tool/linux_amd64/compile GOINSECURE /norm GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 rotocol/go-sdk@v1.5.0/internal/mcpgodebug/mcpgodebug.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a uVfRvwDwi /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE go-sdk/internal/rev-parse 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 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD bis 64/pkg/tool/linux_amd64/compile env 1052097670 KjIdi_zAe 64/pkg/tool/linux_amd64/vet GOINSECURE pproxy GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 OkGlq_83D 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a J9_2Hh5RJ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote (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 ohNRO1y8b 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ylQP4Z8/vCNYLdc7D8RXanEmFBss env 1052097670 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 0/internal/forma-nolocalimports 64/pkg/tool/linu-importcfg GOINSECURE iat GOMODCACHE 64/pkg/tool/linuTest User env 1985247583/.github/workflows gNtEbmW0N ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE (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 bis 64/pkg/tool/linux_amd64/compile 64/s�� _.a 3GMM57Ps3 ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE age GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-goversion (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 ri/jsonschema/v6@v6.0.2/kind/kind.go 64/pkg/tool/linux_amd64/compile GOINSECURE xbyte_wasm.o 64/src/internal/--show-toplevel 64/pkg/tool/linux_amd64/compile env _.a fG0BeREzZ ache/go/1.25.8/x64/pkg/tool/linu-buildmode=exe GOINSECURE chema/v6 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuconfig (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 0/internal/tag/tag.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD bis 64/pkg/tool/linux_amd64/compile env 1052097670 sNGC5r73k ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE gset 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 5519 GOMODCACHE 64/pkg/tool/linux_amd64/compile env 1985247583 mMLh2czeP k GOINSECURE chema/v6/kind GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linurev-parse (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-build4215240352/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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE x_amd64/compile 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/linuremote1 env rity570849460/001 GO111MODULE x_amd64/compile GOINSECURE GOMOD bis x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git _.a deRMpwyMD ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git GtL-i4IS4 GO111MODULE ache/go/1.25.8/xgit-upload-pack 'origin' 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 edOutput1511271792/001 xCmVfTE68 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet estl�� rtcfg qbNVEaFt_ x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (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 e_wasm.s 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/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build4215240352/b422/importcfg -pack /tmp/go-build4215240352/b422/_testmain.go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile 0373�� -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json 8601/parse.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 edOutput1511271792/001 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE obyte GOMODCACHE 64/pkg/tool/linux_amd64/compile rtcf�� g_.a 57OuoO-7M ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE ole GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env g_.a vohS5K4mu k GOINSECURE setup/js/node_moinit GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build4215240352/b397/cli.test /tmp/go-build4215240352/b397/cli.test -test.testlogfile=/tmp/go-build4215240352/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build739438458/b217/importcfg -pack -o /tmp/go-build166-p -trimpath 64/bin/go -p github.com/githu-o -lang=go1.25 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 /tmp/go-build166-p -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/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:

Boolean/null literals (true, false, null) in {{#if}} template conditionals
are self-evaluating — the template renderer's isTruthy() handles them
directly. Wrapping them created __GH_AW_TRUE__/__GH_AW_FALSE__/__GH_AW_NULL__
placeholders that couldn't be resolved at runtime (no corresponding env
var set during compilation for runtime-imported content), causing the
placeholder validator to flag them as unsubstituted.

Fixes #25800

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/814e96f7-ba24-4cb1-8bc5-41e2bb8cec1c

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix engine crash in Claude workflows fix: skip boolean/null literal wrapping in runtime imports Apr 11, 2026
Copilot AI requested a review from pelikhan April 11, 2026 16:48
@pelikhan pelikhan marked this pull request as ready for review April 11, 2026 16:55
Copilot AI review requested due to automatic review settings April 11, 2026 16:55
@pelikhan pelikhan merged commit 050e013 into main Apr 11, 2026
66 of 68 checks passed
@pelikhan pelikhan deleted the copilot/workflow-health-fix-engine-crash branch April 11, 2026 16:56
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

Fixes runtime import conditional processing so boolean/null literals (true, false, null) are not wrapped into GitHub Actions expressions (which previously produced unresolved __GH_AW_*__ placeholders and caused placeholder validation failures).

Changes:

  • Update wrapExpressionsInTemplateConditionals() to leave true/false/null conditionals unchanged.
  • Adjust unit tests to assert these literals remain unwrapped.
Show a summary per file
File Description
actions/setup/js/runtime_import.cjs Skips wrapping for boolean/null literals to avoid generating unresolved placeholders.
actions/setup/js/runtime_import.test.cjs Updates expectations to ensure literals remain unchanged.

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

Comment on lines +653 to +659
// Boolean/null literals are self-evaluating — the template renderer's isTruthy()
// handles them directly. Wrapping them would create __GH_AW_TRUE__/__GH_AW_FALSE__/__GH_AW_NULL__
// placeholders that cannot be resolved at runtime (no corresponding env var is set),
// causing the placeholder validator to flag them as unsubstituted.
if (trimmed === "true" || trimmed === "false" || trimmed === "null") {
return match;
}
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.

The early-return covers bare {{#if true}}/false/null, but {{#if ${{ true }} }} (already-wrapped input) will still be converted by extractAndReplacePlaceholders() into {{#if __GH_AW_TRUE__ }} and then fail placeholder validation because there’s no substitution mapping at runtime. Consider also special-casing true/false/null in the extraction step (or unwrapping them back to literals) so wrapped literals don’t produce __GH_AW_TRUE__/__GH_AW_FALSE__/__GH_AW_NULL__ placeholders.

Copilot uses AI. Check for mistakes.
expect(wrapExpressionsInTemplateConditionals("{{#if null}}body{{/if}}")).toBe("{{#if null}}body{{/if}}");
});
});

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.

This updates unit expectations for wrapExpressionsInTemplateConditionals(), but there isn’t an end-to-end assertion that processRuntimeImport() leaves {{#if true}}/false/null unchanged (and does not introduce any __GH_AW_...__ placeholders) after the full wrap→extract pipeline. Adding an integration test alongside the existing processRuntimeImport — expression wrapping integration cases would help prevent regressions.

Suggested change
describe("boolean/null literals — full wrap→extract pipeline must remain unchanged", () => {
const getExtractedContent = (extracted) => {
if (typeof extracted === "string") {
return extracted;
}
return extracted?.content ?? extracted?.processedContent ?? extracted?.template ?? extracted?.result;
};
it.each([
"{{#if true}}body{{/if}}",
"{{#if false}}body{{/if}}",
"{{#if null}}body{{/if}}",
])("should preserve %s and avoid placeholder insertion", (input) => {
const wrapped = wrapExpressionsInTemplateConditionals(input);
const extracted = extractAndReplacePlaceholders(wrapped);
const output = getExtractedContent(extracted);
expect(output).toBe(input);
expect(output).not.toContain("__GH_AW_");
expect(JSON.stringify(extracted)).not.toContain("__GH_AW_");
});
});

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 100/100

Excellent test quality

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

Test Classification Details

Test File Classification Notes
should leave \{\\{\#if true}} unchanged actions/setup/js/runtime_import.test.cjs:1504 ✅ Design Verifies the core behavioral contract: true is not wrapped
should leave \{\\{\#if false}} unchanged actions/setup/js/runtime_import.test.cjs:1507 ✅ Design Verifies the core behavioral contract: false is not wrapped
should leave \{\\{\#if null}} unchanged actions/setup/js/runtime_import.test.cjs:1510 ✅ Design Verifies the core behavioral contract: null is not wrapped

Analysis Notes

The PR also reorganized the three tests into a new describe block ("boolean/null literals — must be left unchanged for direct isTruthy() evaluation"), which clearly documents the design invariant being enforced. This is an excellent practice.

The tests were previously asserting the wrong behavior (that true/false/null would be wrapped into $\{\{ true }} etc.). They now correctly assert that these literals pass through unchanged, matching the fix in runtime_import.cjs. Each test directly verifies what a caller of wrapExpressionsInTemplateConditionals cares about: observable output given a specific input.

Test inflation check: 9 test lines added vs. 10 production lines changed → ratio 0.9:1 ✅


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 0 tests
  • 🟨 JavaScript (*.test.cjs): 3 tests (vitest)

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 3 modified tests enforce clear behavioral contracts — they verify that boolean and null literals are correctly passed through the wrapExpressionsInTemplateConditionals function without being wrapped, directly covering the bug fix in this PR.


📖 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 · ● 568.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.

✅ Test Quality Sentinel: 100/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 3 modified tests are design tests that enforce clear behavioral contracts for the boolean/null literal fix.

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.

[workflow-health] Dashboard — Apr 11, 2026 | Score: 73/100 | Smoke Claude engine crash + Rendering Scripts false positive

3 participants