Skip to content

fix(cache): stable primary keys for user-provided cache-memory keys#28741

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-cache-miss-ai-moderator
Closed

fix(cache): stable primary keys for user-provided cache-memory keys#28741
Copilot wants to merge 2 commits intomainfrom
copilot/fix-cache-miss-ai-moderator

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

The compiler was silently appending ${{ github.run_id }} to every user-provided custom cache key, making the primary key unique per run and causing a 100% primary cache miss rate. The AI Moderator's key: spam-tracking-${{ github.repository_owner }} was compiled to memory-none-9f0b69b3-spam-tracking-github-{run_id}.

Changes

  • parseCacheMemoryEntry — stop appending run_id to user-provided keys; store them as-is
  • computeIntegrityCacheKey — remove the now-redundant run_id suffix logic for custom keys; apply only the integrity/policy prefix
  • generateCacheMemorySteps — skip restore-key generation for stable custom keys (no run_id to strip); rolling behavior (restore-keys) is preserved for default keys
  • validateNoCacheKeyRunID — update error message to reflect that custom keys are no longer modified by the compiler
  • Tests — update unit and integration tests that were asserting the old volatile-key behavior

Before / After

# Before (volatile — 100% primary miss)
key: memory-none-9f0b69b3-spam-tracking-${{ github.repository_owner }}-${{ github.run_id }}
restore-keys: |
  memory-none-9f0b69b3-spam-tracking-${{ github.repository_owner }}-

# After (stable — reuses same entry every run)
key: memory-none-9f0b69b3-spam-tracking-${{ github.repository_owner }}
restore-keys: |

Default cache-memory keys (no key: field) retain their existing rolling-cache behavior with run_id in the primary key and a restore-key fallback.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login + "/" + .name ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE h_wasm.o 64/src/math/big/arith_wasm.s ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env 709010/b105/_pkg_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuTest User (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo 2566�� 4122462562/.github/workflows aTWjRYknE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env or.md GO111MODULE x_amd64/link GOINSECURE fips140/sha256 GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo env 4122462562/.github/workflows cu5AAtlhm ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath env t1054413494 GO111MODULE .yml GOINSECURE fips140/sha512 GOMODCACHE ache/go/1.25.8/x12345 (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 -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (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 --get remote.origin.url /usr/bin/git -json nXnE_1jro x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git 5735-34596/test-node 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 /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq /usr/bin/git -json GO111MODULE x_amd64/compile git init�� GOMODCACHE x_amd64/compile /usr/bin/git -json gset/set.go x_amd64/compile 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 5735-34596/test-3038981012/.github/workflows O8a-/w8uJjXynBhCHi02xO8a- ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE fips140/nistec GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu^remote\..*\.gh-resolved$ inst�� 6646267/b394/_pkg_.a uFzy/p9hy1yt1djFVGplouFzy ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOSUMDB b/gh-aw/pkg/actirev-parse 64/bin/go 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, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuInitial commit /usr/bin/git 8068/001/stabilitr GO111MODULE ache/go/1.25.8/x: git rev-�� --show-toplevel ache/go/1.25.8/xorigin /usr/bin/git 1313236016 pkg/mod/github.crev-parse ceutil.test 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 gh /usr/bin/git bility_SameInputgit --json /usr/bin/git git rev-�� --show-toplevel 6646267/b449/importcfg /usr/bin/git k/gh-aw/gh-aw/pkgit k/gh-aw/gh-aw/pkrev-parse /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 709010/b257/importcfg -trimpath 6646267/b422/vet.cfg -p internal/fmtsortrev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -o licyMinIntegrityOnlymin-integrity_with_repos=public_1276898405/001 -trimpath /usr/bin/git l golang.org/x/texrev-parse -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260427-145735-34596/test-2116740101 6646267/b438/_testmain.go ache/node/24.14.1/x64/bin/node -p github.com/githurev-parse -lang=go1.25 git t-31�� 4180163340 -goversion /usr/bin/git -c=4 -nolocalimports -importcfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv bility_SameInputSameOutput1939448068/001/stability-test.md /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw-wasm/main.go /usr/bin/git plate-expressiongit GO111MODULE 64/bin/go git -C /tmp/TestGuardPolicyTrustedUsersExpressionCompiledOutput2523910890/001 remote clusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 6646267/b417/envconfig /usr/bin/git t0 -trimpath (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 -goversion go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build185709010/b194/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, .object.type] | @tsv go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build185709010/b131/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/mcp/client.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 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 --git-dir 64/pkg/tool/linu-trimpath /usr/bin/gh 7JQUr3l3W til.go 64/pkg/tool/linu--show-toplevel gh run download 4 /usr/bin/infocmp test-logs/run-4 rtcfg ache/go/1.25.8/x--show-toplevel infocmp (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/TestGuardPolicyTrustedUsersRequiresMinIntegrity2868382925/001 config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git rev-�� --show-toplevel resolved$ /usr/bin/git -json GO111MODULE x_amd64/compile git (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 ch/8p_7IHIf_31YR46MaExS/rs4ruDNpconfig /usr/bin/gh _.a 0/internal/langurev-parse 64/pkg/tool/linu--show-toplevel gh run download 5 /usr/bin/git test-logs/run-5 sYAOo28ie ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /tmp/go-build185709010/b168/_pkg_.a pkg/mod/golang.org/x/text@v0.36.0/internal/catmsg/catmsg.go g_.a -p crypto/sha3 -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuupstream -o /tmp/go-build185709010/b247/_pkg_.a -trimpath /usr/bin/git -p golang.org/x/texrev-parse -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv runs/20260427-145735-34596/test-2116740101 -importcfg t -s -w -buildmode=exe /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -o /tmp/go-build3256646267/b438/semverutil.test -importcfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -s -w -buildmode=exe ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -m (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 --show-toplevel go ache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go gh t-39�� k/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md --jq _id":222}] -json GO111MODULE x_amd64/asm git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv user.email ings.cjs k/_temp/uv-pythodevelopment cjs st/suppress-warnrun ode_modules/.bin/tmp/go-handler-test-59rxJF/slow.go forks.js rev-�� HEAD st/suppress-warnings.cjs bin/git --bare full mode test k/_temp/uv-pytho--require st/dist/workers//home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . tions/setup/js/node_modules/vite--stdout $name) { hasDiscussionsEnabled } } /tmp/bare-incremgit . ode-gyp-bin/git epQy1O8/fA5dK34ofeature-branch init�� -q st/suppress-warnings.cjs k/node_modules/.bin/git -m 9f9b239f..HEAD n-dir/git st/dist/workers/config (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv . 1/x64/bin/node nfig/composer/vendor/bin/git /tmp/bare-increm/opt/hostedtoolcache/node/24.14.1/x64/bin/node tions/setup/js/n--experimental-import-meta-resolve modules/@npmcli/--require git init�� -q st/suppress-warn--conditions 1/x64/bin/git d0fd7b3089ef967c/usr/bin/gh 9f9b239f..HEAD ode-gyp-bin/git st/dist/workers/-f (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch nput.go false r: $owner, name: $name) { hasDiscussionsEnabled } } in/git 50912d8ae8324050-C 05 1/x64/bin/node ve HEAD tions/setup/js/node_modules/viteowner=github r: $owner, name: $name) { hasDiscussionsEnabled } } -exist 9541894373c5e4df-C run-script/lib/n/home/REDACTED/work/gh-aw/gh-aw tions/setup/js/nshow (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch ithub/workflows -m ock.yml /git git ache/uv/0.11.8/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows /opt/hostedtoolcrev-parse -V=f�� ithub/workflows git repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } feature$(whoami)git mp odules/npm/node_/home/REDACTED/work/gh-aw/gh-aw /opt/hostedtoolcshow (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv -1212109896/base.md -1212109896/new.md /usr/bin/git _.a _3ywvdE5S 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/compile /usr/bin/git _.a InX8DV7o_ 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/pkg/cli go /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260427-145735-34596/test-1517535501/custom/workflows config /usr/bin/git remote.origin.urgit GO111MODULE x_amd64/asm git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyMinIntegrityOnlymin-integrittest-logs/run-5 config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git xec.js (or misc/git GO111MODULE layTitle git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-04-20 GOMOD GOMODCACHE x_amd64/link env -json rotocol/go-sdk@v1.5.0/internal/json/json.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 71/KDaUrle63TPPPtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created >=2026-03-28 GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url env _.a GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_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 --limit 100 --created >=2026-01-27 GOMOD GOMODCACHE 64/pkg/tool/linuremote.origin.url env ned-imports-enabled-with-body-content.md GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu--auto (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 JtV1iahb4 64/pkg/tool/linux_amd64/vet GOINSECURE v3 GOMODCACHE 64/pkg/tool/linuTest User env UHnj43LIy GO111MODULE 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)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 DfcRFzBGz 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env m9YkzyPpA GO111MODULE 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 k3aRqV4ci 64/pkg/tool/linux_amd64/link GOINSECURE a20poly1305 GOMODCACHE 64/pkg/tool/linux_amd64/link env ntdrain.test R30X4Bcts ortcfg.link GOINSECURE GOMOD GOMODCACHE b4L7Ikj7IChhS-MVF4/opxEl9d6gxDxhg-XZsIZ/B--vCgKY--auto (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 QyquJZDcH 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/tmp/go-build3256646267/b459/_testmain.go env 4122462562 yi2fVdpoL ache/go/1.25.8/x64/pkg/tool/linu-test.short=true 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/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name AUUx1O_e3 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env rtcfg vZBL1k16k 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)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 yVIFwLdjv 64/pkg/tool/linux_amd64/vet GOINSECURE bidirule GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4122462562/.github/workflows cu5AAtlhm ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (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 uVfRvwDwi 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env 3259481869/.github/workflows 7zDW0_L0m ortcfg.link GOINSECURE %H %ct %D (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 ke8fejfLv ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE util GOMODCACHE ache/go/1.25.8/xtest@example.com env 1517535501/custom/workflows GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE rand GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (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/compile GOINSECURE GOMOD bis 64/pkg/tool/linux_amd64/compile env g_.a eJpt1zLU2 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)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE age/compact GOMODCACHE 64/pkg/tool/linuTest User rtcf�� eutil.test om/segmentio/asm@v1.1.3/base64/base64.go k GOINSECURE 709010/b015/ GOMODCACHE 1tjYVSqOEP82kiP9ch/8p_7IHIf_31YR46MaExS/rs4ruDNpconfig (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 LZuHOSZyr 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env 3259481869/.github/workflows qrk06zUvD ortcfg.link GOINSECURE %H %ct %D (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 rtcfg ache/go/1.25.8/x-nolocalimports GOINSECURE wasm.o 64/src/reflect/a--git-dir ache/go/1.25.8/x/tmp/go-build3256646267/b466/_testmain.go env 1517535501/custom/workflows 5Hh4AuvTv ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE record GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-tests (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 5-yTJqrnP 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3259481869/.github/workflows 0kiaYELPw k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 sYAOo28ie ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-buildtags env Vj4_j9D8T GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build3256646267/b435/importcfg -pack /tmp/go-build3256646267/b435/_testmain.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 3344430432/.github/workflows 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 bis 64/pkg/tool/linux_amd64/vet env -json qbNVEaFt_ 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-build3256646267/b404/cli.test /tmp/go-build3256646267/b404/cli.test -test.testlogfile=/tmp/go-build3256646267/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build185709010/b178/importcfg -pack env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x^remote\..*\.gh-resolved$ /usr/bin/git OnlyCompiledOutpgit GO111MODULE 709010/b228=> git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-importcfg /usr/bin/git ithub/workflows DAYc/r9MkmklevYU-lh kflows/local-wor/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 ility-kit.md g/timeutil/format.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE fips140/alias GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile rtcf�� 709010/b104/_pkg_.a rg/x/oauth2@v0.35.0/internal/doc.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env 5422626/001 5422626/002/work 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, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE d43tsyO/GfieGwTmuIc_nJx724Nd 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, .object.type] | @tsv (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/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env Gitmaster_branch1203989147/001' Gitmaster_branch1203989147/001' 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, .object.type] | @tsv -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile _bra�� -json gset/set.go 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, .object.type] | @tsv GtL-i4IS4 GO111MODULE k GOINSECURE 709010/b007/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath sRem�� 709010/b124/_pkg_.a om/modelcontextprotocol/go-sdk@vgithub.com/github/gh-aw/scripts ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE /go-yaml/token ache/go/1.25.8/xxterm-color ache/go/1.25.8/x64/pkg/tool/linuremote2 (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 go-sdk/oauthex GOMODCACHE eutil.test 2566�� GtL-i4IS4 GO111MODULE k GOINSECURE 709010/b007/ GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (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)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state ortcfg.link GOINSECURE GOMOD GOMODCACHE b4L7Ikj7IChhS-MVF4/opxEl9d6gxDxhg-XZsIZ/B--vCgKY--auto estl�� rtcfg GO111MODULE g_.a GOINSECURE (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch 1517535501/custom/workflows GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE rand GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath rtcf�� 3l3W/OkLBdEKAsEz7JQUr3l3W g/fileutil/fileutil.go ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE 709010/b092/ 709010/b015/symadownload ache/go/1.25.8/x4 (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git e/git init�� ndor/bin/git git ode_modules/.bin/git =receive test@example.com--git-dir=/tmp/bare-incremental-7Dffiy /git (dns block)

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

The cache key for the AI Moderator workflow included `${{ github.run_id }}`,
making every primary key unique and causing a 100% cache miss rate on the
primary key. The workflow sets `key: spam-tracking-${{ github.repository_owner }}`
but the compiler was silently appending `-${{ github.run_id }}` to it.

Changes:
- parseCacheMemoryEntry: stop appending run_id to user-provided custom keys
- computeIntegrityCacheKey: remove the now-redundant run_id suffix logic
- generateCacheMemorySteps: don't force run_id onto the final key; only
  generate restore-keys for rolling default keys (which include run_id)
- Update error message in validateNoCacheKeyRunID to reflect new semantics
- Update unit and integration tests to assert the correct stable-key behavior

Stable custom keys now reuse the exact same primary cache entry across runs,
matching the user's intent when they supply a fixed key without run_id.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/04c35ffb-e24a-47d6-b539-58e84f4d882e

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cache miss in AI Moderator workflow fix(cache): stable primary keys for user-provided cache-memory keys Apr 27, 2026
Copilot AI requested a review from pelikhan April 27, 2026 15:07
@pelikhan pelikhan closed this Apr 27, 2026
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.

[cache-strategy] Fix cache miss in AI Moderator

2 participants