Skip to content

fix(hotfix): converge the release on finalize rerun instead of skipping it - #592

Merged
joshua-temple merged 2 commits into
mainfrom
fix/hotfix-finalize-ordering
Jul 16, 2026
Merged

joshua-temple merged 2 commits into
mainfrom
fix/hotfix-finalize-ordering

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

The hotfix finalize idempotency gate (prior.SHA == mergeSHA) returned early BEFORE the release was created. If the release API blipped after the state marker was committed, the run failed and the rerun short-circuited to green while the tag/release was never created (silent green-with-missing-release, violating rerun-safety).

Fix: the idempotency path now CONVERGES the release via find-or-create (release.ActionUpdate; tag-create treats HTTP 422 as success) using the version already recorded in state. Chosen over reordering because allocateVersion skips existing tags, so create-release-before-state would mint a duplicate version on rerun; state-first pins the version and the rerun converges on the same tag.

Verification: build/-race/lint green, 3051 tests; TestFinalize_RerunAfterReleaseFailure_CreatesRelease (fail-before/pass-after) + a dry-run guard + an e2e hotfix rerun replay asserting stable state and a green rerun.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
The hotfix finalize convergence rerun routes through Manager.update via
ActionUpdate. update() called findRelease unconditionally, but the Gitea e2e
backend rejects the GitHub release-object shape and Bearer auth, so the lookup
errored and the rerun (hotfix-clean-apply step 11) failed in the harness.
Mirror create()'s existing non-GitHub guard: delegate to create() so the tag is
materialized and a synthetic success returned. Real-GitHub release-object
convergence is covered by the finalize rerun unit test and the live fleet.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit c35b9ae into main Jul 16, 2026
21 checks passed
@joshua-temple
joshua-temple deleted the fix/hotfix-finalize-ordering branch July 16, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant