Repository navigation
fix(ci): retry action-dist network ops and auto-heal failed releases - #596
Merged
Merged
Conversation
Two complementary layers on top of the git-derived action tag (#593), covering the two remaining failure classes: - Retry the network/API operations in _action-release (git push, gh release create) up to 3x. A transient push rejection or API blip is recoverable while the job is alive, so it shouldn't strand a dist-less tag. Local git ops and pnpm build are not retried — those fail deterministically and should surface. - Trigger the heal on a non-success Release run (workflow_run), not just the daily schedule. The realistic remaining failure is the release run dying mid-build, which nothing in-workflow can catch — you can't self-heal from inside a run that died. Success/skipped runs are ignored (the in-run build already committed dist there). The daily schedule stays as the cause-agnostic backstop. No loop: heal is not tag-triggered, and _action-release commits [skip ci] then force-pushes, so a heal never re-triggers CI/Release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K6CmYRXTZQYs4MNo6AETxT
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K6CmYRXTZQYs4MNo6AETxT
Contributor
|
Standing release PR: #595 · v0.41.2 queued (4 packages) · open 34m · ✅ ready to merge Release Preview — v0.41.1 → v0.41.2
These changes will be added to the release PR (#595) when merged: Changelogmonorepo 0.41.1 → 0.41.2
After merge — predicted release
Updated automatically by ReleaseKit |
This was referenced Jul 21, 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.
Context
Follow-up to #593. That PR made the in-run action-dist build reliable (git-derived tag) and added the manual/scheduled heal. This adds resilience for the two remaining failure classes, distinguished by one question: is the workflow still alive to fix itself?
git pushrejected,gh release createAPI blip). The workflow is running, so it can retry.Changes
Retry the network/API ops in
_action-release(Class 1)git push -f(version tag + major alias) andgh release createnow retry up to 3× with backoff. These are the genuinely transient operations. Local git ops andpnpm buildare deliberately not retried — they fail deterministically and should surface as a red run.Auto-heal on a non-success Release run (Class 2)
action-dist-heal.ymlnow also triggers viaworkflow_runon the Release workflow, gated to a non-success conclusion:A successful Release run already committed dist in-run (guaranteed by #593's git-derived tag), so healing there would be pure no-op noise on every push to main. A failed/cancelled run is exactly where the in-run build may not have completed — so the heal fires within minutes and targets the most recently created version tag (the guard no-ops if it already carries dist). The daily schedule stays as the cause-agnostic backstop for any unknown mode that somehow leaves a green run dist-less — deliberately not dropping it, since "assume failures are red" is the exact assumption that caused the original incident.
Why keep the heal separate rather than fold it into the release workflow
You can't self-heal from inside the run that died. An
if: always()job inrelease.ymlwould cover "action-dist job failed but run continues", but not cancellation or infra death (both take the always() job down too). The heal's value is being in a different failure domain — the watchdog can't live inside the supervised process.No loop
Heal is not tag-triggered, and
_action-releasecommits with[skip ci]then force-pushes the tag, so a heal never re-triggers CI or Release. Confirmed Release triggers only onworkflow_run: [CI]+ dispatch.Validation
actionlintclean on both files.workflow_runpath will first exercise on the next non-success Release run, else stays dormant.🤖 Generated with Claude Code
Greptile Summary
This PR adds two resilience layers to the action-dist release pipeline: transient network retries inside the running job, and an out-of-band auto-heal triggered by any non-success Release run.
_action-release.reusable.yml: Introduces aretry()shell function (≤3 attempts, linear backoff) wrapping only the genuinely transient operations —gh release createand bothgit push -fcalls. Deterministic steps (pnpm build, local git ops) are deliberately excluded so real failures surface immediately.action-dist-heal.yml: Adds aworkflow_runtrigger on the Release workflow, gated toconclusion != 'success' && != 'skipped', so the heal fires within minutes of a failed/cancelled Release run without producing noise on every successful push. Switches theresolvejob's tag-picking to acasestatement; the newworkflow_runarm selects the most recently created version tag via--sort=-creatordate.Confidence Score: 5/5
Safe to merge — the retry logic is idempotent (force-push replays the same tag; the release-exists guard prevents double-creation), and the heal's idempotency guard in
_action-releaseensures re-runs on an already-healed tag are always no-ops.Both changed files make purely additive, well-guarded changes. The
retry()function correctly limits to 3 total attempts, uses"$@"for proper argument passing, and exits non-zero after the final failure so the step still turns red on a real issue. Theworkflow_rungate in the heal workflow correctly narrows to failure/cancellation conclusions and thecase-based tag selection handles all three trigger paths without ambiguity. No logic path introduced here can cause data loss or a runaway loop.No files require special attention.
Important Files Changed
git push -f(version tag + major alias) andgh release create; local git ops and build are intentionally not retriedworkflow_runtrigger on the Release workflow (non-success/non-skipped gate) and switches the tag-pick step to acasestatement that selects the most recently created version tag for the new trigger pathReviews (2): Last reviewed commit: "chore(ci): add trailing newline to _acti..." | Re-trigger Greptile