chore(release): v0.10.3 #142

Merged
alex merged 1 commit from release-prep/rolling into main 2026-06-26 23:30:30 +02:00
Member

Fixed

Bug fix: manifest-precheck.sh is now remote-aware (#140).

The artifact

Task 13376 (release-toolkit v0.10.2 cut re-run) failed at the manifest direct-push step with non-fast-forward rejection:

[release-decide] mode=cut version=0.10.2
[draft-release] release v0.10.2 already exists at expected state — idempotent skip   ← #131 release pre-check worked
manifest update: path (α) direct-push
[main 4be9dbc] chore(manifest): post-cut bookkeeping for v0.10.2
hint: use 'git pull' before pushing again                                            ← push rejected
⚙️ [runner]: exitcode '1': failure

The cut workflow on 59e02780 (rolling-PR-merge SHA) substantively completed at task 13373: release-create + manifest direct-push to main (commit 8e1c952). Then it got cancelled (path-α self-cancel per #139). Operator re-ran the cancelled task → task 13376. The re-run's checkout was at GITHUB_SHA = 59e02780 — the manifest at that checkout was the pre-cut state. Pre-check saw local manifest with old last_released_sha, said "proceed", workflow tried to push a duplicate commit on top of remote main which was already 1 commit ahead.

Why the original #128/#131 design missed this

Surveyor 4a44's partial-completion matrix called out the exact scenario: "manifest pushed + release published, THEN cancelled, THEN re-run." My implementation's matrix logic was right; my source for "is manifest at HEAD_SHA?" was wrong. I chose the more-convenient source (local file at the workflow's checkout) instead of the authoritative source (remote main).

Substrate-state-care failure on my side. Banking the calibration: the authoritative source for "what is on main?" is the remote ref, not the local checkout. Local can be stale when a prior workflow ran ahead of this one's checkout.

The fix

scripts/manifest-precheck.sh now:

  1. Remote check first: git fetch --quiet origin main + git show "origin/main:$MANIFEST_PATH". If remote main's manifest has last_released_sha == HEAD_SHA, output skip (the bug case fires here cleanly).
  2. Local fallback: if remote isn't accessible (test, first-cut bootstrap, no remote), fall through to local manifest check (preserves existing 9 bats tests' behavior).

Test seam MANIFEST_REMOTE_FIXTURE=/path/to/file lets bats simulate "remote main manifest content" — set to existing file → use as remote content; set to non-existent path → simulate "remote manifest absent".

Tests

349/349 bats green (was 343; +6 new tests in tests/manifest-precheck.bats):

  • Remote at HEAD_SHA + local at older SHA → skip (the bug case)
  • Remote at older SHA + local at older SHA → proceed (normal cut)
  • Remote absent + local at HEAD_SHA → skip (fallback to local)
  • Remote absent + local absent → proceed (first cut)
  • Remote at HEAD_SHA + local absent → skip (remote wins; edge case)
  • Remote has invalid JSON + local at HEAD_SHA → skip (graceful fallback)

Plus the existing 9 tests still pass — they run in a non-git test context, so the real git show origin/main lookup silently fails + falls through to local, matching pre-#140 behavior. No regression.

What this PR does NOT do

  • Does NOT eliminate the path-α self-cancel (#139) — that's a separate noise-reduction tracker. This fix makes the re-run-after-cancel work correctly; #139 makes the cancel rarer.
  • Does NOT change the script's interface_release.yml calls manifest-precheck.sh "$MANIFEST_PATH_INPUT" "$HEAD_SHA" unchanged; the remote-aware behavior is internal.

Composition

Completes the partial-completion-matrix design point Surveyor 4a44 originally called out for #128. The matrix is finally fully covered.

Closes #140.

  • manifest-precheck.sh remote-aware (closes #140)
### Fixed **Bug fix: `manifest-precheck.sh` is now remote-aware** ([#140](https://git.frankenbit.de/frankenbit/release-toolkit/issues/140)). ## The artifact Task 13376 (release-toolkit v0.10.2 cut re-run) failed at the manifest direct-push step with `non-fast-forward` rejection: ``` [release-decide] mode=cut version=0.10.2 [draft-release] release v0.10.2 already exists at expected state — idempotent skip ← #131 release pre-check worked manifest update: path (α) direct-push [main 4be9dbc] chore(manifest): post-cut bookkeeping for v0.10.2 hint: use 'git pull' before pushing again ← push rejected ⚙️ [runner]: exitcode '1': failure ``` The cut workflow on `59e02780` (rolling-PR-merge SHA) substantively completed at task 13373: release-create + manifest direct-push to `main` (commit `8e1c952`). Then it got cancelled (path-α self-cancel per [#139](https://git.frankenbit.de/frankenbit/release-toolkit/issues/139)). Operator re-ran the cancelled task → task 13376. The re-run's checkout was at `GITHUB_SHA = 59e02780` — the manifest at that checkout was the **pre-cut state**. Pre-check saw local manifest with old `last_released_sha`, said "proceed", workflow tried to push a duplicate commit on top of remote main which was already 1 commit ahead. ## Why the original #128/#131 design missed this Surveyor 4a44's partial-completion matrix called out the exact scenario: *"manifest pushed + release published, THEN cancelled, THEN re-run."* My implementation's matrix logic was right; my source for "is manifest at HEAD_SHA?" was wrong. I chose the more-convenient source (local file at the workflow's checkout) instead of the authoritative source (remote main). Substrate-state-care failure on my side. Banking the calibration: **the authoritative source for "what is on main?" is the remote ref, not the local checkout**. Local can be stale when a prior workflow ran ahead of this one's checkout. ## The fix `scripts/manifest-precheck.sh` now: 1. **Remote check first**: `git fetch --quiet origin main` + `git show "origin/main:$MANIFEST_PATH"`. If remote main's manifest has `last_released_sha == HEAD_SHA`, output `skip` (the bug case fires here cleanly). 2. **Local fallback**: if remote isn't accessible (test, first-cut bootstrap, no remote), fall through to local manifest check (preserves existing 9 bats tests' behavior). Test seam `MANIFEST_REMOTE_FIXTURE=/path/to/file` lets bats simulate "remote main manifest content" — set to existing file → use as remote content; set to non-existent path → simulate "remote manifest absent". ## Tests **349/349 bats green** (was 343; +6 new tests in `tests/manifest-precheck.bats`): - Remote at HEAD_SHA + local at older SHA → skip (the bug case) - Remote at older SHA + local at older SHA → proceed (normal cut) - Remote absent + local at HEAD_SHA → skip (fallback to local) - Remote absent + local absent → proceed (first cut) - Remote at HEAD_SHA + local absent → skip (remote wins; edge case) - Remote has invalid JSON + local at HEAD_SHA → skip (graceful fallback) Plus the existing 9 tests still pass — they run in a non-git test context, so the real `git show origin/main` lookup silently fails + falls through to local, matching pre-#140 behavior. No regression. ## What this PR does NOT do - **Does NOT eliminate the path-α self-cancel** ([#139](https://git.frankenbit.de/frankenbit/release-toolkit/issues/139)) — that's a separate noise-reduction tracker. This fix makes the re-run-after-cancel work correctly; #139 makes the cancel rarer. - **Does NOT change the script's interface** — `_release.yml` calls `manifest-precheck.sh "$MANIFEST_PATH_INPUT" "$HEAD_SHA"` unchanged; the remote-aware behavior is internal. ## Composition Completes the partial-completion-matrix design point Surveyor 4a44 originally called out for [#128](https://git.frankenbit.de/frankenbit/release-toolkit/issues/128). The matrix is finally fully covered. Closes [#140](https://git.frankenbit.de/frankenbit/release-toolkit/issues/140). - manifest-precheck.sh remote-aware (closes #140)
forgejo-actions force-pushed release-prep/rolling from 819e82d64a
All checks were successful
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 4s
manifest-check / check (pull_request) Successful in 0s
to f3503b556d
All checks were successful
release / decide + act (push) Successful in 5s
release / release (push) Successful in 0s
2026-06-26 23:23:35 +02:00
Compare
alex approved these changes 2026-06-26 23:30:19 +02:00
alex merged commit f3503b556d into main 2026-06-26 23:30:30 +02:00
alex deleted branch release-prep/rolling 2026-06-26 23:30:30 +02:00
Sign in to join this conversation.
No description provided.