Skip to content

fix: skip {{#import}} directives inside backtick code spans in runtime import processor#28474

Merged
pelikhan merged 2 commits intomainfrom
copilot/aw-failures-fix-runtime-import
Apr 25, 2026
Merged

fix: skip {{#import}} directives inside backtick code spans in runtime import processor#28474
pelikhan merged 2 commits intomainfrom
copilot/aw-failures-fix-runtime-import

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

Documentation text like `{{#import ...}}` in workflow-health-manager.md was being parsed as a real import directive by the runtime import processor, causing activation to fail with ERR_SYSTEM: Runtime import file not found: .../... before the agent could start.

Changes

  • runtime_import.cjs: Before applying bodyImportRe, single-line backtick code spans are temporarily replaced with unique placeholders and restored after substitution — preventing documentation examples from being resolved as file paths.

    // Before: bodyImportRe matched {{#import ...}} everywhere, including inside `backtick spans`
    // After: inline code spans are shielded from the regex
    const contentWithPlaceholders = content.replace(/`[^`\n]+`/g, (match) => {
      codeSpanPlaceholders.push(match);
      return `\u0000GH_AW_CODESPAN_${idx}_GH_AW\u0000`;
    });
  • runtime_import.test.cjs: Five new test cases covering backtick-shielded {{#import}} and {{#import?}} patterns, real directives outside backtick spans still resolving correctly, and documented multi-line span limitation.

  • workflow-health-manager.md: Rewrote the offending documentation sentence to avoid the {{#import ...}} literal as a defensive fix.

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 (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 -j ACCEPT tions/setup/js/n/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warn--conditions /hom�� --write st/suppress-warn--conditions 1/x64/bin/node **/*.json --ignore-path ../../../.pretti--noprofile st/dist/workers/forks.js (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 -j DROP tions/setup/js/n/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warn--conditions k/gh�� --write st/suppress-warn--conditions 1/x64/bin/node **/*.json --ignore-path ../../../.pretti--noprofile st/dist/workers/forks.js (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' --ignore-path ../../../.pr.prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go ules�� -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 printf '%s' "$1" sh /usr/bin/git 4489022/b436/_pkgit GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 364356227 GO111MODULE .cfg 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 --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet git conf�� --get remote.origin.url /usr/bin/git '**/*.ts' '**/*.git GO111MODULE x_amd64/vet 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 se 1116925/b255/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet tierignore GO111MODULE 64/bin/go ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet --no�� 3380171203 go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel x_amd64/compile /usr/bin/git se 1116925/b087/vet\n ache/go/1.25.8/x: git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git se 1116925/b274/vetrev-parse /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 1/x64/bin/node /usr/bin/infocmp --objects --stdin /usr/bin/git infocmp -1 xterm-color git /usr/bin/git /tmp/TestGuardPogit remote /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlymin-integrity_with_repos_array_c3267252317/001 config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git conf�� thImports3709137582/001 remote.origin.url ache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/vet ache/node/24.14.1/x64/bin/node (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 ache/go/1.25.8/x64/pkg/tool/linuTest User /usr/bin/git --noprofile go /opt/hostedtoolcache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuTest User /usr/bin/git runs/20260425-15git /tmp/go-build202rev-parse 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env json' --ignore-p-errorsas GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 7a289edc668b0db00209d41237c04af5-d 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 --show-toplevel 64/pkg/tool/linuTest User /usr/bin/git heck '**/*.cjs' git .cfg 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/gh 3079498386/.githgit .cfg 64/pkg/tool/linu--show-toplevel gh (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/TestGuardPolicyMinIntegrityOnlyrepos_only_without_min-integrity1827444764/001 rev-parse /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260425-154952-50693/test-364356227/.github/workflows rev-parse ache/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, .object.type] | @tsv --show-toplevel x_amd64/link /usr/bin/infocmp heck '**/*.cjs' git GO111MODULE 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 7z/4P7r8Nx30lqcg--auto /usr/bin/git 3079498386/.githgit .cfg 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, .object.type] | @tsv ErrorFormatting526121078/001 remote /usr/bin/infocmp 100983be190c85c9git k x_amd64/compile infocmp -1 xterm-color x_amd64/compile /usr/bin/git 01 GO111MODULE x_amd64/vet 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 me-pattern=backtick code span|should not treat' tions/setup/js/node_modules/vite--conditions 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv "prettier" --wrinode st/suppress-warn--conditions $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --write st/suppress-warn--conditions 1/x64/bin/node **/*.json --ignore-path ../../../.pretti--noprofile st/dist/workers/forks.js ve npx prettier --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-pnode st/suppress-warnings.cjs es/.bin/sh rror (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch typecheck tions/setup/js/node_modules/vitest/suppress-warn--conditions 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch npx prettier --write '**/*.cjs' '**/*.ts' '**/*.node tions/setup/js/node_modules/vitest/suppress-warn--conditions 1/x64/bin/node --show-toplevel /opt/hostedtoolc-C not protect|lim/home/REDACTED/work/gh-aw/gh-aw/.github/workflows 1/x64/bin/node ve "prettier" --wriremote.origin.url tions/setup/js/node_modules/vitest/suppress-warn--conditions ck.yml tierignore gh /usr/bin/git tions/setup/js/nconfig (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 -bool -buildtags /usr/bin/infocmp -errorsas -ifaceassert -nilfunc infocmp -1 heckout/git/ref/tags/v5 -tests bject.type] | @tsv ck 'scripts/**/*git .cfg 64/pkg/tool/linu--show-toplevel infocmp (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 ons-test3093473715 remote /usr/bin/git eac92d5ce4c94ac6git rk x_amd64/compile git rev-�� --show-toplevel l 0"}} -json GO111MODULE x_amd64/vet /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link (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 BHBh/Mm0ui0x2Iv4Z-LYbBHBh rev-parse /usr/bin/git 0bb9c5eade785091git GO111MODULE x_amd64/compile git 1116�� /tmp/gh-aw-test-runs/20260425-154952-50693/test-2308050084 1116925/b459/_testmain.go rue,"errors":[],"warnings":[]}] remote.origin.urgit GO111MODULE x_amd64/vet infocmp (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/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE %H %ct %D (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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env thub/workflows .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 run download 12345 --dir test-logs/run-12345 .cfg 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ylQP4Z8/vCNYLdc7D8RXanEmFBss env -json .cfg 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name .cfg x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet 0211�� se 1116925/b017/vet.cfg x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 .cfg 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link (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/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/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 GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (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 .cfg ionpins.test GOINSECURE GOMOD GOMODCACHE ionpins.test 0211�� 2308050084 1116925/b020/vet.cfg ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go ules�� -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 1/x6�� -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 6 GOMOD GOMODCACHE 64/pkg/tool/linuremote1 env til.go til_test.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build2021116925/b404/cli.test /tmp/go-build2021116925/b404/cli.test -test.testlogfile=/tmp/go-build2021116925/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 _modules/.bin/no-nilfunc 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/xrepos/{owner}/{repo}/actions/runs/3/artifacts /usr/bin/git --check scripts/**/*.js ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linutest@example.com /usr/bin/git 4952-50693/test-ls /tmp/go-build202-lh 64/pkg/tool/linu/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 4952-50693/test-source-field-variant-3916079916/-errorsas 1116925/b289/vet.cfg .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu--jq (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 ays.md GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet 5008�� 82957335cbaa4429e2fcff8e52300fa5effcfbcbb59500dd-d GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 46MaExS/rs4ruDNpeWLgO0QAw_ap env 0b8b1dfd13b51876b0590b788f16d30094bd537a09dfb501-d GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet tion�� -json 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 iant-3916079916/-errorsas GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env */*.ts' '**/*.jsremote.origin.url GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 /ref/tags/v9 GO111MODULE sv GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu/tmp/go-build2021116925/b114/vet.cfg -c "prettier" --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.pret-- GOPROXY ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK 64/bin/go ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (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 ache/go/1.25.8/x64/pkg/tool/linu-trimpath env 4952-50693/test-source-field-var-p GO111MODULE kflow.lock.yml GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu/tmp/go-build2021116925/b115/vet.cfg (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 x_amd64/vet GOINSECURE GOMOD GOMODCACHE 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/linu-test.short=true GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/xtest@example.com (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' --ignore-path ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go ules�� -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch se 1116925/b036/vet.cfg x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)

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

…e import processor

The workflow-health-manager activation job was failing because the documentation
text `{{#import ...}}` in workflow-health-manager.md was being incorrectly treated
as an actual import directive by the runtime import processor (runtime_import.cjs).

Fixes:
- runtime_import.cjs: Protect single-line backtick code spans before matching
  {{#import}} directives, preventing documentation examples from being processed
  as real import paths
- runtime_import.test.cjs: Add test cases for backtick-escaped import directives
  including a test that documents the multi-line limitation
- workflow-health-manager.md: Rewrite documentation text to avoid the
  {{#import ...}} pattern as a defensive fix

Closes: [aw-failures] workflow-health-manager: ERR_SYSTEM runtime import file not found blocks activation

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d811defb-bb76-47f0-92b4-270d615ba0f2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix runtime import file not found issue in workflow health manager fix: skip {{#import}} directives inside backtick code spans in runtime import processor Apr 25, 2026
Copilot AI requested a review from pelikhan April 25, 2026 15:56
@pelikhan pelikhan marked this pull request as ready for review April 25, 2026 15:57
Copilot AI review requested due to automatic review settings April 25, 2026 15:57
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
@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 4
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (100%)
Duplicate test clusters 0
Test inflation detected No (ratio: 26/14 = 1.86 — under 2:1 threshold)
🚨 Coding-guideline violations None

Test Classification Details

View all 4 test classifications
Test File Classification Issues Detected
should not treat \{\\{\#import ...}} inside backtick code spans as an import directive runtime_import.test.cjs ✅ Design None — asserts content unchanged; directly verifies the fix
should not treat \{\\{\#import? ...}} inside backtick code spans as an optional import directive runtime_import.test.cjs ✅ Design None — covers the \{\\{\#import?}} variant
should still resolve \{\\{\#import}} outside backtick spans even when backtick spans are present runtime_import.test.cjs ✅ Design None — mixed-content scenario; strongest behavioral signal
does not protect \{\\{\#import}} inside multi-line backtick spans (document limitation) runtime_import.test.cjs ✅ Design None — explicitly documents a known limitation with .rejects.toThrow()

Language Support

Tests analyzed:

  • 🟨 JavaScript (*.test.cjs): 4 tests (vitest)

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 4 tests directly verify observable behavior of the backtick-span fix.

The tests cover:

  1. Inline backtick protection for both \{\\{\#import}} and \{\\{\#import?}} directive variants
  2. Non-regression: real directives outside backtick spans still resolve correctly when backtick spans are present
  3. Known limitation documentation: multi-line spans not handled — using .rejects.toThrow() to anchor the current behavior
📖 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

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path
  • Break during legitimate refactoring even when behavior is correct

References: §24934778302

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

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 4 new tests verify behavioral contracts for the backtick code span fix.

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 a runtime-import processing failure where documentation examples like `{{#import ...}}` inside workflow markdown were mistakenly treated as real import directives, causing activation to fail.

Changes:

  • Shield single-line inline backtick code spans in processRuntimeImports() while normalizing deprecated {{#import}} directives.
  • Add tests covering backtick-shielded {{#import}} / {{#import?}}, plus an explicit limitation case.
  • Update workflow-health-manager.md wording to avoid a literal {{#import ...}} directive in inline code.
Show a summary per file
File Description
actions/setup/js/runtime_import.cjs Temporarily replaces inline backtick spans with placeholders during deprecated {{#import}} normalization, then restores them.
actions/setup/js/runtime_import.test.cjs Adds regression tests ensuring {{#import}} inside inline code isn’t processed, while real directives still resolve.
.github/workflows/workflow-health-manager.md Removes/avoids the literal {{#import ...}} example that previously triggered runtime import resolution.

Copilot's findings

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment on lines +693 to +697
it("does not protect {{#import}} inside multi-line backtick spans (document limitation)", async () => {
// Multi-line backtick spans (code fences) are not handled — only single-line inline spans.
// This test documents the current behaviour rather than prescribing it.
const content = "Text\n`start\n{{#import missing.md}}\nend`\nMore text";
// The {{#import}} inside a multi-line "span" (which is unusual) is still treated as a directive
@pelikhan pelikhan merged commit 78f800c into main Apr 25, 2026
121 of 123 checks passed
@pelikhan pelikhan deleted the copilot/aw-failures-fix-runtime-import branch April 25, 2026 16:03
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.

[aw-failures] workflow-health-manager: ERR_SYSTEM runtime import file not found blocks activation

3 participants