Repository navigation
Fix release activation cleanup after repository checkout - #15860
Merged
Merged
Conversation
Compile the release workflow using remote gh-aw actions pinned to the runtime revision used by the failed run. Avoid replacing the repository checkout with runtime action files, and add a regression check plus reproducible compilation guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 94f256ae-a43b-4d03-a2c8-c4a131c22e45
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
PR CI omits the regression test, and nightly upgrades can reintroduce broken local setup references unless the pinned release command is reapplied.
2 open issues
What changed in this PR
This PR fixes release activation cleanup by keeping gh-aw setup action definitions outside the repository checkout. It preserves the previously used runtime revision and the existing release sequence.
Changes:
- Replace five local setup references with SHA-pinned remote actions and remove colliding runtime checkouts.
- Record the action pin and remove the pre-activation job’s unused checkout permission.
- Add a regression test and document the pinned regeneration command.
| File | Description |
|---|---|
release_workflow_test.go |
Checks that the release lock uses pinned remote gh-aw actions without runtime checkouts. |
CONTRIBUTING.md |
Documents release compilation flags and the local-action cleanup hazard. |
.github/workflows/release.lock.yml |
Uses remote setup actions and removes unnecessary checkouts and permission. |
.github/aw/actions-lock.json |
Records the immutable gh-aw setup action pin. |
Review effort: Max (auto)
Comment on lines
+123
to
+124
| When editing `.github/workflows/release.md`, regenerate its lock using remote, | ||
| SHA-pinned gh-aw actions: |
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestReleaseWorkflowUsesPinnedRemoteActions(t *testing.T) { |
This was referenced Nov 2, 2026
lpcox
added a commit
that referenced
this pull request
Nov 2, 2026
## Summary Follow-up to #15860: fixes the remaining 33 agentic workflow locks and generated maintenance while preserving triggers, permissions, credential flows, MCP declarations, engine/container pins, and sandbox controls. - Replace 158 local setup references with `github/gh-aw/actions/setup@5fec33b64e8f9159001970542a8357293ca5b09a`; remove only obsolete runtime checkouts and `actions/setup` sparse entries. Remote definitions survive later root checkout and post-job cleanup. - Correct eight generated gh-aw builds that incorrectly built the gateway repository. Fetch and verify the same immutable gh-aw source under `$RUNNER_TEMP/gh-aw-runtime`, outside later root checkouts and uploaded artifact paths. - Add a structured, lossless, fail-closed Go normalizer and `make compile-workflows`. Preserve dev-only maintenance jobs and MCP declarations; regenerate already-fixed Release with its original release-mode pin. Release and the actions-cache lock are unchanged. - Wire maintenance compilation and the nightly upgrader through normalized generation; add exact-pin, control-preservation, idempotence, and unknown-shape regressions for all locks and maintenance. Raw release-mode fleet compilation drops maintenance jobs and emits the gh-aw source SHA as a nonexistent gh-aw-actions setup-cli ref/CLI release version. The documented normalization workaround avoids those compiler defects rather than hand-editing generated locks. ## Validation and limits - `make agent-finished` passed: build, lint, Go/unit/integration tests and 694 Rust guard tests. Optional integration prerequisites retain their existing skips. - Repeated `make compile-workflows` reproduced the exact reviewed file hashes. Preservation checks also passed on raw compiler output before normalization. - One retained read-only security reviewer: **PASS** for local validation and feature-branch publication; no confirmed new vulnerabilities. Reviewed executable deltas, immutable source fetches, credentials, authorization, artifact paths and sandbox/firewall protections. - Native actionlint retains **159 identical baseline finding identities/counts**, including unsupported newer Actions syntax and existing ShellCheck diagnostics. Offline zizmor removes **158 self-repository findings**, retaining the same four baseline findings: dangerous-triggers (2), cache-poisoning and adhoc-packages. These are not clean scans. - Diagnostic dry-run compilation rejected existing `sandbox.mcp.container` during baseline resource extraction and emitted **no diagnostic lock**. Production declarations were not stripped. Poutine was unavailable; Docker scanners were not run. - **No workflows were dispatched or rerun.** Hosted post-hook, source-build, MCP and sandbox behavior remains unverified. Any normalization/write error blocks publication of its resulting output. ## Authored Markdown review | Markdown source | Change | Security impact | | --- | --- | --- | | [Nightly upgrader prompt](https://github.com/github/gh-aw-mcpg/blob/6b98719a88caf81aa57ee1e2a1ae723d3e0a6c32/.github/agentics/nightly-workflow-compiler.md#L32-L70) | Upgrade with `--no-compile`, then use guarded generation; reject partial normalization. | Prevents raw local-action regeneration; permissions, credential recipients and approval behavior unchanged. | | [CONTRIBUTING guidance](https://github.com/github/gh-aw-mcpg/blob/6b98719a88caf81aa57ee1e2a1ae723d3e0a6c32/CONTRIBUTING.md#L121-L168) | Document pin, bounded normalization, private-temp builds, Release exception and regression commands. | Reproducible runtime provenance and fail-closed generation; no live execution authorization. |
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes the activation failure in release run 41351204255.
The generated workflow checked out
github/gh-awinto the repository workspace, ran./actions/setup, then checked outgithub/gh-aw-mcpginto the same directory. That second checkout deleted the local action definition, soPost Setup Scriptsfailed before any tests, tag creation, or release jobs could run.release.lock.ymlin release action mode, replacing all five local setup references withgithub/gh-aw/actions/setup@5fec33b64e8f9159001970542a8357293ca5b09aand removing the colliding runtime checkouts.TestReleaseWorkflowUsesPinnedRemoteActionsand document the exact regeneration command inCONTRIBUTING.md.The authored release workflow and prompt are unchanged. Release triggers, role checks, build/test/tag/release sequencing, credential destinations, engine version, and container/firewall pins are preserved. The generated pre-activation job drops its checkout-only
contents: readpermission because that checkout is no longer needed.Verification
go test . -run TestReleaseWorkflowUsesPinnedRemoteActions -count=1passed; the same regression test failed against the original broken lock in an isolated local fixture.make agent-finishedcompleted with✓ All agent-finished checks passed!.steps; no diagnostic lock was emitted and no release was dispatched. The dry-run source check also reported existing advisories. Docker scanners were not run.Security review
One read-only review of the generated lock, pin cache, regression test, contributor guidance, and immutable runtime entrypoints passed all ten scope/provenance/credential/access-control questions. No confirmed vulnerabilities found. The dependency is pinned to the previously executed revision; permissions are not broadened and firewall protections are unchanged.
No authored workflow Markdown was changed. Contributor guidance adds the immutable compilation command and explains why development action mode is unsafe for this checkout sequence. Compilation and PR publication do not authorize a live release.