Repository navigation
fix(release): tolerate tag read lag and pin helpers to the workflow commit - #35
Merged
Merged
Conversation
…workflow commit Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
This was referenced Nov 11, 2026
Merged
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
The
Release tagworkflow failed on correct tags (agent-config v2.6.1 → da18672, run 42998815962) because GitHub briefly returns 404 when the tag is re-read right after creation. This PR makes tagging tolerate that lag and makes the helper scripts run from the caller-pinned workflow commit instead of a hard-coded pre-squash SHA.Changes
release/create-tag.py: validates thePOST /git/tagsandPOST /git/refsresponses (type and sha only, since GitHub addsurl), then verifies through newwait_for_commit(backoff 1, 2, 4, 8, 8 s, injectablesleep). A 404 on the ref or the tag object counts as lag; a mismatch fails at once; a tag still unreadable fails with a rerun hint (a rerun reportsexisting). On the 422 path a still-absent tag re-raises the original API error.release-tag.yml(2 checkouts) andrelease-github.yml(1):ref: ${{ job.workflow_sha }}replacesbbd93e5…(reachable only viarefs/pull/33/head). A first-step guard requires a 40-hex SHA andjob.workflow_repository=BehindTheMusicTree/github-workflows, with no fallback..github/actionlint.yaml: ignores only actionlint's "property workflow_sha/workflow_repository is not defined" on those two files (actionlint 1.7.12 does not know them yet).[Unreleased].FakeGitHubnow returns realistic write responses (includingurl) and can simulate lag on the ref and on the tag object. New cases cover lag below and above the attempt limit, lag on the 422 path, mismatch after lag, tag-object lag and malformed responses, with no real waits.Test plan
python3 -m unittest discover -s release -p 'test_*.py': 39 OKbash .github/scripts/tests/release.sh: exit 0shellcheck .github/scripts/release.sh .github/scripts/tests/release.sh: cleanactionlint: cleanrelease-automation-sandbox-20261106pinned to this PR's head (bump to 0.0.6) is required before merge: expectcreated, tag v0.0.6 dereferencing to the merge commit, and a GitHub Release. Result to be added as a comment.existingand went green.Screenshots
N/A
Risk
Intent
change, depth deep: release-critical workflows holding the release App token, consumed by about 20 repositories. An independent review found one real defect, strict equality on the APIobjectthat would have failed every real run because of the extraurlkey. It is fixed (identity-only comparison,urladded to the fake) and the delta was rechecked by the principal session. No breaking change for callers: they keep pinning the outer workflow, which now also fixes the helper scripts. The guard fails closed ifjob.workflow_shais unavailable. Callers only get the fix when repinned (rollout follows).How to revert
Revert the merge commit. Callers pinned to the merged SHA keep working until repinned to the revert.
Deployment notes
No migration or environment change. Merge only after the sandbox live test; then repin this repository's own
release.yml/publish.ymland all callers to the merged SHA. No release of this repository is part of this PR.