fix(release): use 3-pass commit chain to fully pin self-refs#198
Merged
derekmisler merged 1 commit intodocker:mainfrom May 8, 2026
Merged
Conversation
Contributor
Author
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
The 2-pass approach had a bug: TEMP_SHA (dist/ only) still contained old self-refs in its YAML files (inherited from main). When consumers used RELEASE_SHA's reusable workflow, GitHub would resolve: RELEASE_SHA: review-pr.yml → uses: docker/cagent-action/review-pr@TEMP_SHA ✅ TEMP_SHA: review-pr/action.yml → uses: docker/cagent-action@c22076b # v1.5.0 ❌ v1.5.0: DOCKER_AGENT_VERSION = v1.54.0 ❌ (missing before_llm_call support) Fix: add a third pass so the chain correctly bottoms out at PREP_SHA (the new dist/ + DOCKER_AGENT_VERSION from main): Pass 1 (PREP_SHA): stage dist/ only, inherit main's YAML Pass 2 (TEMP_SHA): sed all self-refs → PREP_SHA in YAML files Pass 3 (RELEASE_SHA): sed all self-refs PREP_SHA → TEMP_SHA in YAML files With this 3-pass chain: RELEASE_SHA: review-pr.yml → uses: …@TEMP_SHA ✅ TEMP_SHA: review-pr/action.yml → uses: docker/cagent-action@PREP_SHA ✅ PREP_SHA: DOCKER_AGENT_VERSION = v1.57.0 (from main) ✅ Variable rename: TEMP_SHA → PREP_SHA (Pass 1), RELEASE_SHA → TEMP_SHA (Pass 2), and RELEASE_SHA is now the Pass 3 commit that gets tagged.
f9eff9c to
7c3aeef
Compare
derekmisler
approved these changes
May 8, 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.
Problem
The 2-pass release commit chain had a broken self-ref resolution path. When a consumer used the tagged
RELEASE_SHA's reusable workflow, GitHub would resolve:RELEASE_SHA's.github/workflows/review-pr.yml→uses: docker/cagent-action/review-pr@TEMP_SHA✅TEMP_SHA'sreview-pr/action.yml→uses: docker/cagent-action@c22076b # v1.5.0❌v1.5.0'saction.ymlreadsDOCKER_AGENT_VERSION = v1.54.0❌TEMP_SHA(Pass 1, dist/-only commit) inherited main's YAML files which still contained the old self-refs. Only the finalRELEASE_SHAcommit had its YAML pinned, butTEMP_SHA's sub-action YAML was never updated. This caused the betapr-review.yaml(which requires docker-agent ≥ v1.57.0 forhooks.before_llm_call) to invoke v1.54.0 instead.Fix: 3-pass commit chain
Introduces a third commit pass so the chain correctly bottoms out at
PREP_SHA(which carries the freshly-builtdist/and currentDOCKER_AGENT_VERSIONfrom main):PREP_SHATEMP_SHAPREP_SHARELEASE_SHATEMP_SHA← taggedResolution chain when a consumer uses
RELEASE_SHA:RELEASE_SHA'sreview-pr.yml→uses: …@TEMP_SHA✅TEMP_SHA'sreview-pr/action.yml→uses: docker/cagent-action@PREP_SHA✅PREP_SHAhasDOCKER_AGENT_VERSION = v1.57.0(from main) ✅Changes
.github/workflows/release.yml: renamedTEMP_SHA→PREP_SHA(Pass 1),RELEASE_SHA→TEMP_SHA(Pass 2), and added Pass 3 that re-pins PREP_SHA refs → TEMP_SHA, creating the finalRELEASE_SHAthat gets tagged.shaoutput emitted to$GITHUB_OUTPUTcontinues to point toRELEASE_SHA(Pass 3).Validation
pnpm build✅biome ci .✅ (no new violations)tsc --noEmit✅actionlint -shellcheck= .github/workflows/release.yml✅ (zero errors on changed file; pre-existingnode24warnings in other files are unchanged)