Skip to content

Prune stale gh-aw-actions entries from actions-lock.json after compilation#25361

Merged
lpcox merged 3 commits intomainfrom
copilot/fix-actions-lock-json-entries
Apr 8, 2026
Merged

Prune stale gh-aw-actions entries from actions-lock.json after compilation#25361
lpcox merged 3 commits intomainfrom
copilot/fix-actions-lock-json-entries

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

After a compiler version update (e.g., v0.67.1 → v0.67.3), actions-lock.json accumulates entries for github/gh-aw-actions/setup at old versions that are no longer referenced by any compiled .lock.yml file. Manually removing the stale entry doesn't help — the next compile preserves it because nothing prunes unreferenced entries.

Changes

  • pkg/workflow/action_cache.go — Add PruneStaleGHAWEntries(currentVersion, actionsRepoPrefix) which removes cache entries where the repo matches the gh-aw-actions prefix but the version differs from the current compiler version. Skipped for non-release builds (no "v" prefix, or contains - like v0.67.3-dirty).

  • pkg/cli/compile_pipeline.go — Add pruneStaleActionCacheEntries helper; call it before saveActionCache in both runPostProcessing and runPostProcessingForDirectory. Uses actionTag if set, otherwise the compiler's built-in version.

  • pkg/cli/compile_file_operations.go — Same pruning call in the watch-mode recompilation path.

  • pkg/workflow/compiler_types.go — Export EffectiveActionsRepo() so the CLI layer can pass the correct prefix.

Before/After

// Before: two entries, v0.67.1 unreferenced
"github/gh-aw-actions/setup@v0.67.1": { "sha": "80471a..." },
"github/gh-aw-actions/setup@v0.67.3": { "sha": "eef369..." }

// After: only the version matching the compiler survives
"github/gh-aw-actions/setup@v0.67.3": { "sha": "eef369..." }

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 -trimpath /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel 485109/b425/importcfg /usr/bin/git k/gh-aw/gh-aw/pkgit l /bin/sh git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw /opt/hostedtoolc/opt/hostedtoolcache/node/24.14.1/x64/bin/npx /usr/bin/git go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw --package-lock-o/opt/hostedtoolcache/node/24.14.1/x64/bin/npx /usr/bin/git go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -c=4 -nolocalimports -importcfg /tmp/go-build103485109/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 tomic_wasm.s go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel 64/pkg/tool/linuTest User /usr/bin/git ithub/workflows ortcfg ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linu-test.v=true /usr/bin/git 45/001/test-compgit 64/src/internal/rev-parse x_amd64/compile 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 /repos/actions/github-script/git/ref/tags/v8 l /usr/bin/git -json GO111MODULE 64/bin/go git conf�� --get remote.origin.url cfg -json GO111MODULE x_amd64/compile gh (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 1976219/b096/_pkg_.a om/goccy/go-yaml@v1.19.2/lexer/lexer.go _.a GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env 1976219/b128/_pkg_.a gimq/JO2tKXBdToMtOLMlgimq ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml/parser GOMODCACHE ache/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 --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git ortcfg GO111MODULE ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x--jq /usr/bin/git 1976219/b219/_pkgit GO111MODULE 1976219/b219=> git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git /tmp/go-build103git -trimpath /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 --show-toplevel 64/pkg/tool/linu-trimpath /usr/bin/git g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git g_.a OhJqGnTLC 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 64/pkg/tool/linu/tmp/go-build103485109/b113/vet.cfg /usr/bin/git g_.a rt.go 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git g_.a YGaDW_VvF 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 tags/v4 git /usr/bin/git r-test2929872854git r-test2929872854rev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel s/test.md /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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1201976219/b254/importcfg -pack /home/REDACTED/go/pkg/mod/golang.org/x/mod@v0.34.0/semver/semver.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/v8 --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)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 1 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 --show-toplevel 64/pkg/tool/linu/tmp/file-tracker-test2929872854/test2.lock.yml /usr/bin/infocmp g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linu.github/workflows/test.md /usr/bin/git g_.a eF_9lmWUN 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 --show-toplevel 64/pkg/tool/linux_amd64/asm /usr/bin/git mLsRemoteWithReagit mLsRemoteWithRearev-parse 64/pkg/tool/linu--show-toplevel /usr/bin/git conf�� --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git y_with_explicit_git 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 . /home/REDACTED/go/pkg/mod/github.com/goccy/go-yaml@v1.19.2/printer/color.go /usr/bin/git ." scripts/**/*.js 64/bin/go git -C ons-test3443032696 config ache/node/24.14.1/x64/bin/node remote.origin.urgit GO111MODULE 64/bin/go 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 ath ../../../.pr**/*.json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go er -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -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/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha ck 'scripts/**/*.js' --ignore-path .prettierignore GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x-trimpath env er.lock.yml GO111MODULE /home/REDACTED/wor-lang=go1.25 GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility -json GO111MODULE ache/go/1.25.8/x-f GOINSECURE GOMOD GOMODCACHE go env '**/*.ts' '**/*.remote.origin.url GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility /home/REDACTED/wor-f rev-parse me: String!) { -f -json GO111MODULE 64/bin/go git show�� k/gh-aw/gh-aw/.gremote.origin.url go r: $owner, name: $name) { hasDiscussionsEnabled } } l GO111MODULE ache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows git (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 --show-toplevel 64/pkg/tool/linu-test.v=true /usr/bin/infocmp g_.a /cpu/byteorder.grev-parse 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linuAdd workflow /usr/bin/git 3461903516/.githgit GO111MODULE 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 -m (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 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git -C /tmp/TestGuardPolicyMinIntegrityOnlyrepos_only_wnonexistent/repo l clusion,workflowName,createdAt,startedAt,updatedstatus,conclusion -json GO111MODULE 64/bin/go 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 glpNKSOQr 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env g_.a fG0BeREzZ 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 V0s1bKvb3 64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env ortcfg EFuVqG1PQ 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 abis 64/pkg/tool/linux_amd64/compile env g_.a sNGC5r73k ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE til GOMODCACHE ache/go/1.25.8/xtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 0/internal/catmsg/catmsg.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linutest@example.com env g_.a PcfUGjA_S ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE r 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 l.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a bbyq8rTOi ache/go/1.25.8/x64/pkg/tool/linu--limit GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 0/internal/number/common.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env g_.a bBouUBHdz ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuorigin (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 5.0/internal/doc.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env g_.a QuPWq4ACQ 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 2 --dir test-logs/run-2 kVjpTbR-V 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env til.go til_test.go ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linurev-parse (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 dyvKs137W 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env 4136230555 Y_7BzNNuM 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 S1XHWmzm6 ache/go/1.25.8/x-importcfg GOINSECURE GOMOD GOMODCACHE 64/pkg/include env ortcfg GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile (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/compile GOINSECURE mic_wasm.o 64/src/internal/user.email 64/pkg/tool/linutest@example.com env 4136230555 YfB4YDUdE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 sYYP-7R33 64/pkg/tool/linux_amd64/cgo GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env gk88dzu3u GO111MODULE 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/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name 5.0/deviceauth.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env 4136230555 64jHUho52 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE go-sdk/oauthex 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 4GDF0MOYT 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env kwbSq8VpX GO111MODULE k GOINSECURE GOMOD abis ache/go/1.25.8/x64/pkg/tool/linuconfig (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path /tmp/go-build410-p -trimpath 64/bin/go -p main -lang=go1.25 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/linuremote.myorg.url env g_.a GO111MODULE x_amd64/link GOINSECURE /bidi 64/src/syscall/j--show-toplevel x_amd64/link (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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 1976219/b232/_pkgit taK6/ikh7gQ1RReQrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git ai-moderator.md -trimpath /opt/hostedtoolc--show-toplevel 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 til.go o 64/pkg/tool/linux_amd64/compile GOINSECURE a20poly1305 GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a R30X4Bcts ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE til GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json x86.go 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env 133659904/001 133659904/002/work x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env lGitmaster_brancremote.origin.url lGitmaster_branch1133659904/001' x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json /unsafebytes/uns-c=4 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/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 1336�� -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha -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/githubnext/agentics/git/ref/tags/- --jq .object.sha yml GO111MODULE er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl/home/REDACTED/work/gh-aw/gh-aw/.github/workflows GOINSECURE GOMOD GOMODCACHE node /hom�� n-detector.lock.-f **/*.cjs /bin/sh **/*.json --ignore-path ../../../.pretti/home/REDACTED/work/gh-aw/gh-aw/.github/workflows /bin/sh (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 g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/link GOINSECURE /norm GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url ortc�� -json aTWjRYknE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x^remote\..*\.gh-resolved$ (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 s.o 64/src/runtime/i--show-toplevel 64/pkg/tool/linux_amd64/vet env -json diXaaNED5 ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (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 -p main -lang=go1.25 go env -json go 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go -p github.com/githu-o -lang=go1.25 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-build103485109/b397/cli.test /tmp/go-build103485109/b397/cli.test -test.testlogfile=/tmp/go-build103485109/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build1201976219/b213/importcfg -pack -o /tmp/go-build410-p -trimpath 64/bin/go -p main -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-build410-p -trimpath 64/bin/go -p github.com/githu-o -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:

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 8, 2026

@lpcox you can run the "update" command in the "Agentic Maintenance" action

@lpcox
Copy link
Copy Markdown
Collaborator

lpcox commented Apr 8, 2026

@pelikhan Agentics Maintenance failed https://github.com/github/gh-aw/actions/runs/24151113577/job/70478067176

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 8, 2026

Some weird large files in that run.

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 8, 2026

https://github.com/github/gh-aw/tasks/a430902e-c8bd-4e9e-be42-a7183fc9b726

…ompilation

After a compiler update (e.g., v0.67.1 → v0.67.3), actions-lock.json accumulated
stale entries for github/gh-aw-actions/* at old versions that were no longer
referenced by any compiled workflow.

Add PruneStaleGHAWEntries() to ActionCache that removes entries for the
gh-aw-actions repository whose version doesn't match the current compiler
version. Called automatically after compilation (before cache save) so that
only the version actually used by compiled workflows survives.

Pruning is skipped for dev/dirty builds (non-release versions) to avoid
accidentally removing valid entries during development.

Fixes #2321

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bb868d18-3505-4313-b83a-3f0fd273e126

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Apr 8, 2026
Copilot AI changed the title [WIP] Fix stale entries in actions-lock.json after compiler update Prune stale gh-aw-actions entries from actions-lock.json after compilation Apr 8, 2026
Copilot finished work on behalf of lpcox April 8, 2026 18:48
Copilot AI requested a review from lpcox April 8, 2026 18:48
@lpcox
Copy link
Copy Markdown
Collaborator

lpcox commented Apr 8, 2026

@pelikhan should i kill this pr?

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 8, 2026

Looks good. Let me review

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 8, 2026

LGTM

@lpcox lpcox marked this pull request as ready for review April 8, 2026 18:53
Copilot AI review requested due to automatic review settings April 8, 2026 18:53
@lpcox lpcox merged commit 8869605 into main Apr 8, 2026
137 of 185 checks passed
@lpcox lpcox deleted the copilot/fix-actions-lock-json-entries branch April 8, 2026 18:58
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

This PR adds automatic pruning of stale github/gh-aw-actions/* entries from actions-lock.json when the compiler version changes, preventing the cache from accumulating unreferenced older-version entries after compilation.

Changes:

  • Added ActionCache.PruneStaleGHAWEntries(currentVersion, actionsRepoPrefix) to delete gh-aw-actions cache entries not matching the active compiler/action tag version (release builds only).
  • Wired pruning into CLI post-processing and watch-mode recompilation paths before saving the action cache.
  • Exported Compiler.EffectiveActionsRepo() so CLI code can pass the correct actions repo prefix, and added unit tests for pruning behavior.
Show a summary per file
File Description
pkg/workflow/compiler_types.go Exposes EffectiveActionsRepo() for CLI consumers.
pkg/workflow/action_cache.go Implements pruning of stale gh-aw-actions cache entries based on current version.
pkg/workflow/action_cache_test.go Adds tests covering pruning behavior and no-op cases for non-release versions.
pkg/cli/compile_pipeline.go Calls pruning before saving actions-lock.json in post-processing flows; adds helper.
pkg/cli/compile_file_operations.go Calls pruning before saving cache during watch-mode incremental recompiles.

Copilot's findings

Tip

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

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

Comment on lines 223 to 226
if actionCache != nil {
pruneStaleActionCacheEntries(compiler, actionCache)
if err := actionCache.Save(); err != nil {
compileHelpersLog.Printf("Failed to save action cache: %v", err)
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

pruneStaleActionCacheEntries is invoked here for the watch-mode incremental recompilation path, but the initial full compilation path (compileAllWorkflowFiles) still calls saveActionCache without pruning (see pkg/cli/compile_file_operations.go around the saveActionCache call). This means watch mode’s initial compile (compile_watch.go) and the upgrade command can still leave stale gh-aw-actions entries in actions-lock.json until a subsequent file-change recompilation happens. Consider pruning in compileAllWorkflowFiles as well (or centralizing pruning in the shared save helper) so all compilation flows consistently clean up stale entries.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler v0.67.3 pins runtime setup action to v0.67.1, leaving stale entries in actions-lock.json

4 participants