Skip to content

fix(ci): roll back prepare-release when a phase job is cancelled - #1089

Merged
c-vigo merged 3 commits into
release/1.2.0from
bugfix/1078-rollback-on-cancel
Jul 14, 2026
Merged

c-vigo merged 3 commits into
release/1.2.0from
bugfix/1078-rollback-on-cancel

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Implements #1078 (review follow-up from #1068).

The rollback job's guard now matches cancelled for each phase (prepare/extension/open-pr) alongside failure, so cancelling a run after the freeze commit lands rolls back the partial release branch and dev freeze exactly like a failure. always() is kept (and documented as load-bearing — it's what keeps the job eligible after a run-level cancel); validate.result == 'success' is kept deliberately (a cancelled validate means no freeze commit exists to roll back).

Scope note: the scaffolded twin (assets/workspace/.github/workflows/prepare-release.yml) is independently authored (not manifest-synced, per #996/#991) and had the identical gap — both copies fixed, and the shape tests are parametrized over both.

TDD: RED (2 pytest + 1 bats failures) → GREEN (test_workflow_prepare_extension.py 15 passed, bats rollback filter 3 ok); full just precommit green (actionlint). Runtime path exercises at the next prepare-release run. Changelog under ## [1.2.0] - TBD ### Fixed, root + mirror.

Refs: #1078

c-vigo added 3 commits July 14, 2026 19:39
The rollback guard only matches result == 'failure' for prepare, extension
and open-pr, so a run cancelled after the freeze commit strands the partial
release branch and the freeze commit on dev. Pin the cancelled-handling in
the job-shape assertions (both caller copies) before extending the guard.

Refs: #1078
Extend the rollback guard so needs.<job>.result == 'cancelled' for prepare,
extension and open-pr triggers the rollback alongside 'failure'. The guard
already used always(), which is what keeps the job eligible to run after the
run itself is cancelled; without the cancelled match a run cancelled after
the freeze commit stranded the partial release/X.Y.Z branch and the freeze
commit on dev. Applied to both the devkit workflow and the independently
authored scaffold copy (not manifest-synced), which shares the guard shape.

Refs: #1078
@c-vigo
c-vigo merged commit 146331e into release/1.2.0 Jul 14, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1078-rollback-on-cancel branch July 14, 2026 18:13
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