Fix __GH_AW_WIKI_NOTE__ placeholder not substituted when wiki is disabled#20236
Fix __GH_AW_WIKI_NOTE__ placeholder not substituted when wiki is disabled#20236
__GH_AW_WIKI_NOTE__ placeholder not substituted when wiki is disabled#20236Conversation
…bled
When wiki mode is disabled (memory.Wiki == false), the GH_AW_WIKI_NOTE
env var now uses ${{ '' }} (a GitHub expression evaluating to empty
string) instead of a plain static empty string.
This forces expression interpolation, ensuring the __GH_AW_WIKI_NOTE__
placeholder in repo_memory_prompt.md is always substituted with an empty
value. Previously, old compiled lock files might not include GH_AW_WIKI_NOTE
in the substitution step at all, causing the validate_prompt_placeholders.sh
check to fail.
Fixes: repo-assist __GH_AW_WIKI_NOTE__ placeholder not substituted when
Wiki is disabled.
Recompile all 166 workflow lock files to apply the fix.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
__GH_AW_WIKI_NOTE__ placeholder not substituted when wiki is disabled
There was a problem hiding this comment.
Pull request overview
Fixes repo-memory prompt generation so the __GH_AW_WIKI_NOTE__ placeholder is always substituted (even when wiki mode is disabled), preventing validate_prompt_placeholders.sh failures in non-wiki repos.
Changes:
- Use a GitHub Actions empty-string expression (
${{ '' }}) forGH_AW_WIKI_NOTEwhen wiki is disabled. - Update unit test expectations to validate expression interpolation behavior.
- Recompile workflow lock files to include
GH_AW_WIKI_NOTEin prompt creation steps.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/workflow/repo_memory_prompt.go | Switches non-wiki GH_AW_WIKI_NOTE to ${{ '' }} to force expression interpolation. |
| pkg/workflow/repo_memory_test.go | Updates test to assert the new non-wiki expression value. |
| .github/workflows/*.lock.yml | Regenerated lock workflows to include GH_AW_WIKI_NOTE: ${{ '' }} in env for prompt creation steps. |
| .changeset/patch-wiki-note-empty-placeholder.md | Adds release note describing the placeholder substitution fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@copilot apply changes based on the comments in this thread |
|
@copilot fix tests CI / Integration Add with dispatch-workflow Dependencies (pull_request)Failing after 50s |
- Add package-level constant `ghaEmptyStringExpr` for `${{ '' }}` and
use it in both the production code and the test.
- Reword the comment to clarify the expression ensures substitution in
newly compiled (or regenerated) workflows by forcing the prompt-
creation step to include GH_AW_WIKI_NOTE.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Applied both review suggestions in 697aeac:
|
This failure is unrelated to my changes. The test |
When
repo-memoryis configured withoutwiki: true, the__GH_AW_WIKI_NOTE__placeholder inrepo_memory_prompt.mdwas left unsubstituted, causingvalidate_prompt_placeholders.shto fail. This was particularly visible inrepo-assistscheduled runs on repos without a GitHub Wiki.Root cause
buildRepoMemoryPromptSectionused a static empty string""forGH_AW_WIKI_NOTEwhen wiki is disabled. Static values are only injected into the substitution step — and in older compiled lock files, this variable was absent entirely, leaving__GH_AW_WIKI_NOTE__raw in the prompt.Fix
Use
${{ '' }}(a GitHub Actions expression evaluating to empty string) instead of""when wiki is disabled. This forces expression interpolation, ensuringGH_AW_WIKI_NOTEappears in both the prompt creation step and the substitution step of newly compiled workflows:Compiled output for non-wiki workflows now includes:
All 166 workflow lock files recompiled to apply the change.
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/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)/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 ota=5% yHigh=170M(http block)/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 description,rele-20(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha /tmp/go-build41068480/b418/_pkg_.a -trimpath /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -p github.com/githurev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/compile -o /tmp/go-build41068480/b436/_pkg_.a -trimpath /usr/bin/git -p main -lang=go1.25 git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha UL65/AHw8PEHMAd81EdngUL65 **/*.cjs /opt/hostedtoolcache/node/24.14.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/n--show-toplevel **/*.json --ignore-path ../../../.prettitest/race-image:v1.0.0 68480/b374/importcfg -c k/gh-aw/gh-aw/pkg/cli/access_log.go k/gh-aw/gh-aw/pkg/cli/actionlint.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu--limit rror blog-auditor.locrev-parse bot-detection.lo--show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha */*.ts' '**/*.json' --ignore-path ../../../.prettierignore er@0.29.0(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build41068480/b112/vet.cfg /usr/bin/git -unreachable=falgit /tmp/go-build416rev-parse me: String!) { --show-toplevel git rev-�� --show-toplevel iginal /usr/bin/gh ithub/workflows /tmp/go-build416rev-parse /opt/hostedtoolc--show-toplevel gh(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel infocmp /usr/bin/git */*.json' '!../.git git 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git 6/001/test-frontgit rev-parse ache/node/24.14.--show-toplevel git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel -tests /usr/bin/git ath ../../../.prgit 2649217/b140/vetrev-parse .cfg git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linurev-parse /opt/hostedtoolcache/node/24.14.0/x64/bin/node re --log-level=egit 2649217/b186/vetrev-parse ache/go/1.25.0/x--show-toplevel node(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel /usr/bin/gh /usr/bin/git k/gh-aw/gh-aw/.ggit -f bin/sh git rev-�� --show-toplevel infocmp /usr/bin/git *.json' '!../../git git 64/pkg/tool/linu--show-toplevel git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha om/github/gh-aw(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ath ../../../.pr**/*.json(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build41068480/b392/importcfg -pack /tmp/go-build41068480/b392/_testmain.go(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260309-165939-17150/test-2957626536/.github/workflows rev-parse /usr/bin/git ath ../../../.prgit 2649217/b045/vetrev-parse .cfg git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linuconfig ache/node/24.14.0/x64/bin/node re --log-level=egit 2649217/b175/vetrev-parse ache/go/1.25.0/x--show-toplevel ache/node/24.14.0/x64/bin/node(http block)/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --format %(refname) 64/bin/go --merged 67b94b71781966e5rev-parse 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha /tmp/gh-aw-test-runs/20260309-165939-17150/test-2713045881/.github/workflows config /usr/bin/git remote.origin.urgit -c=4 -nolocalimports git rev-�� --show-toplevel /tmp/go-build41068480/b001/_testmain.go /usr/bin/git re --log-level=egit 2649217/b119/vetrev-parse de git(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha extensions.objectformat git 64/bin/go -d git 64/bin/go go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha auto-triage-issues.md x_amd64/vet 68480/b402/logger.test --noprofile(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha get --local rgo/bin/bash user.email(http block)https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts/usr/bin/gh gh run download 1 --dir test-logs/run-1 -buildtags tions/setup/js/node_modules/.bin-nilfunc -errorsas -ifaceassert -nilfunc bash tlog�� '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json -tests n-dir/sh(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts/usr/bin/gh gh run download 12345 --dir test-logs/run-12345 -buildtags x_amd64/link -errorsas -ifaceassert -nilfunc x_amd64/link -A5 ormat:cjs --silent >/dev/null 2>&1 WIKI_NOTE 8d519d9/node_modules/.bin/sh(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts/usr/bin/gh gh run download 12346 --dir test-logs/run-12346 -buildtags x_amd64/vet -errorsas -ifaceassert -nilfunc x_amd64/vet rev-�� files..." -tests 0/x64/bin/node(http block)https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts/usr/bin/gh gh run download 2 --dir test-logs/run-2 -buildtags ules/.bin/sh -errorsas -ifaceassert -nilfunc bash --no�� y-test.md -tests 64/bin/sh(http block)https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts/usr/bin/gh gh run download 3 --dir test-logs/run-3 /tmp/go-build4162649217/b306/vet-ifaceassert tions/setup/node_modules/.bin/sh-nilfunc(http block)https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts/usr/bin/gh gh run download 4 --dir test-logs/run-4 -buildtags x_amd64/compile -errorsas -ifaceassert ed } } x_amd64/compile --no�� '**/*.ts' '**/*.json' --ignore-premote.origin.url -tests /usr/bin/docker l(http block)https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts/usr/bin/gh gh run download 5 --dir test-logs/run-5 -buildtags de_modules/.bin/sh l -ifaceassert -nilfunc 51RFpkM/58sERvdotCvyK1taGOl6 --no�� '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json -tests(http block)https://api.github.com/repos/github/gh-aw/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --noprofile(http block)/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(http block)/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 -ifaceassert -nilfunc x_amd64/compile -c y-test.md -tests 0/x64/lib/node_modules/npm/node_-nilfunc(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha get --local n-dir/bash pull.rebase(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha k/gh-aw/gh-aw/.github/workflows(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha 0DC_/JWjfekxMoOe!../../../pkg/workflow/js/**/*.json(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha se 2649217/b165/vet--ignore-path ache/go/1.25.0/x../../../.prettierignore(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha re --log-level=e!../../../pkg/workflow/js/**/*.json 2649217/b164/vet--ignore-path me: String!) { ../../../.prettierignore --log-target journal-or-kmsg 64/bin/git ache/go/1.25.0/x-buildtags ls-f�� js/**/*.json' ---errorsas --others ache/go/1.25.0/x-nilfunc(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha re --log-level=e!../../../pkg/workflow/js/**/*.json(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha re --log-level=e!../../../pkg/workflow/js/**/*.json /tmp/repo-assist--ignore-path ache/go/1.25.0/x../../../.prettierignore(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --local user.name x_amd64/vet(http block)https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --noprofile(http block)https://api.github.com/repos/nonexistent/repo/actions/runs/12345/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion -errorsas -ifaceassert ed } } x_amd64/vet 0/x6�� echo "Syncing actions-lock.json from .github/aw --ignore-path -tests er: String!, $name: String!) { repository(owne--log-level=error(http block)https://api.github.com/repos/owner/repo/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo .cfg(http block)/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ACCEPT(http block)https://api.github.com/repos/owner/repo/contents/file.md/tmp/go-build41068480/b383/cli.test /tmp/go-build41068480/b383/cli.test -test.testlogfile=/tmp/go-build41068480/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true(http block)https://api.github.com/repos/test-owner/test-repo/actions/secrets/usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --noprofile e-analyzer.lock.**/*.json repository(owne--ignore-path(http block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.