Repository navigation
Pin setup action and built-in containers to compiler version on update - #78311
Conversation
…e/upgrade gh aw update/upgrade now pins github/gh-aw-actions/setup to exactly the running compiler release (up or down, regardless of --no-release-bump) in both actions-lock.json and workflow markdown refs, and keeps compiler built-in container images (firewall, MCP gateway, router, gh-aw-node, GitHub MCP server) on the compiler's embedded digest pins instead of re-resolving them from the registry. compile --force-refresh-container-pins still re-resolves built-ins from the registry. Adds an end-to-end test that compiles a workflow, runs the update passes against stubbed newer releases and drifted digests, recompiles, and asserts the lock file is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
The new compile-then-update test used helpers that only exist in !integration test files, breaking the integration/harbor test build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Found one correctness issue: compiler pinning is enabled for semver-shaped versions even when the binary is marked as a non-release build. This can make dev/local builds pin the setup action to an unsupported compiler tag; see the inline comment on update_actions_deps.go:48.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
|
Warning The 🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
Comment MemoryPeek at saved memory (review-history)History |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Addressing the top-level bot comments:
|
There was a problem hiding this comment.
🟡 Changes recommended
Release detection misclassifies development and prerelease builds, while API-only tag lookup bypasses the Git fallback for authentication failures, risking incorrect or unchanged setup action references.
2 open issues
What changed in this PR
Keeps gh-aw’s supporting runtime aligned with the compiler during gh aw update and upgrade, reducing setup-action version drift and container digest churn.
Changes:
- Pin setup action references to the running compiler’s release tag.
- Reuse bundled pins for built-in containers while preserving explicit registry refreshes.
- Add consistency tests and document the updated pinning behavior.
| File | Description |
|---|---|
pkg/cli/update_container_pins.go |
Identifies built-in images and applies embedded compiler pins. |
pkg/cli/update_container_pins_test.go |
Tests built-in image detection, bundled pins, and registry refresh overrides. |
pkg/cli/update_compile_test.go |
Adds compile/update consistency coverage for runtime artifacts. |
pkg/cli/update_actions_lockfile.go |
Applies compiler-specific setup pinning to the action cache. |
pkg/cli/update_actions_lockfile_test.go |
Covers older and newer setup locks and disabled release bumps. |
pkg/cli/update_actions_deps.go |
Adds shared compiler-tag classification and action resolution helpers. |
pkg/cli/update_actions_content_refs.go |
Applies compiler pinning to workflow uses: references. |
pkg/cli/update_actions_content_refs_test.go |
Tests setup tag and SHA updates with release bumps disabled. |
pkg/cli/compile_orchestrator.go |
Enables registry refreshes for built-ins when explicitly requested. |
docs/src/content/docs/setup/cli.md |
Documents setup-action and built-in container pinning. |
Review effort: Max (dynamic)
| // (e.g. "v0.68.3"), or "" for dev, dirty, or otherwise non-release builds. | ||
| func compilerReleaseTag() string { | ||
| version := GetVersion() | ||
| if strings.Contains(version, "-") || parseVersion(version) == nil { |
There was a problem hiding this comment.
Implemented in 6b1c2df: release builds now pin valid prerelease compiler tags, while non-release builds retain the regular update policy. The pinning tests explicitly set and restore release mode.
| sha, err := deps.getActionSHAForTag(ctx, gitutil.ExtractBaseRepo(repo), tag) | ||
| if err != nil { | ||
| return "", "", fmt.Errorf("cannot resolve SHA for compiler version %s: %w", tag, err) |
There was a problem hiding this comment.
Implemented in 6b1c2df: compiler-tag SHA resolution now falls back to git ls-remote on API authentication errors, selecting the exact tag and using peeled commit SHAs for annotated tags.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "4fba8ac38ba55246757383452edf8c44a77b528d",
"kind": "requested",
"schema_version": "1",
"state": "1afe15a9c02b5425d0546e04ab2cd9bf4b7208854f0509940814c0920f793976",
"work": [
"415657ba8aa6956f36657e40c09fe3cb794b691c38deaeff5e3a34c98f76ad13",
"e82111ded5de46de7bab38e5c41d19dfe0d8466bb2b6fcd5cb1a26ac0e558521"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
Category: bug
|
|
🎉 This pull request is included in a new release. Release: |

ADR: ADR-78311: Pin Setup Action and Built-in Containers to Compiler Version
github/gh-aw-actions/setupand the compiler's built-in containers are gh-aw's supporting runtime, so they must match the compiler that generated the lock files. Before this change,gh aw update/upgradetreated them like any other dependency. The setup action moved to the latest release, which could differ from the CLI version. Built-in images were re-resolved from the registry, which caused churn such as unrelated digest re-pins on every update.Approach
update_actions_deps.go(compilerPinnedActionTag,resolveActionUpdateTarget) resolve the target to exactly the running compiler release tag and its SHA. Both theactions-lock.jsonupdater and the markdownuses:ref updater use them. Pinned entries skip the latest-release lookup, the native-action cap, and downgrade prevention, so they move up or down to the compiler version, even with--no-release-bump. Dev builds (non-release versions) keep the existing behavior.updateContainerPinsrecognizes compiler-injected images (gh-aw-firewall/*, gh-aw-mcpg, gh-aw-router, gh-aw-node, github-mcp-server). For these images it uses the compiler's embedded pins (actionpins.GetContainerPin) instead of fetching from the registry. If an image has no embedded pin, it falls back to registry resolution.compile --force-refresh-container-pinssets a newrefreshBuiltinsoption, so the trusted pins in this repo can still be refreshed from the registry (used bydaily-squid-image-scan).Tests
TestUpdate_CompileThenUpdateKeepsCompilerPinnedArtifactsConsistent:RunUpdateWorkflowsorder against stubs that report a newer setup release and drifted image digests, then recompiles.--no-release-bump), markdown ref pinning, and built-in container handling, includingrefreshBuiltins.pkg/clihas existing failures that also fail onmainlocally (graders, yamllint, fix dry-run, manifest, and path-related tests). They are unrelated to this change.Notes for reviewers
The new test found an unrelated existing inconsistency: compiling with an explicit
--diremitsGH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168", while the default dir emits"0". This comes from theconfig.WorkflowDir == ""guard incompile_pipeline.go. This PR does not fix it. The test uses the default dir, asgh aw updatedoes.Docs: updated the
updatesection ofdocs/src/content/docs/setup/cli.md.