bug: manifest-precheck.sh reads local checkout, misses already-landed remote state (v0.10.2 cut re-run failure) #140
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Empirical artifact
Task 13376 (release-toolkit v0.10.2 cut re-run) failed at the manifest direct-push step with
non-fast-forwardrejection:Root cause
scripts/manifest-precheck.sh(shipped in #136) reads.release-toolkit-manifest.jsonfrom the workflow's local checkout state (MANIFEST_PATHarg). This works for the canonical re-run case (operator manually re-runs the workflow on a fresh checkout that includes the prior run's manifest commit). But it MISSES the case where:59e02780) substantively COMPLETED the cut (release-create + manifest direct-push to main)GITHUB_SHA = 59e02780(the rolling-PR-merge SHA) — the manifest at that checkout is the pre-cut state (still pointing at v0.10.1's SHA)mainhas already advanced to8e1c952(the post-cut manifest commit landed by task 13373)last_released_sha, says "proceed"Why my #128/#131 idempotency design missed this
Surveyor 4a44's partial-completion matrix specifically called out: "the design must handle the partial-completion case... the exact scenario: manifest pushed + release published, THEN cancelled, THEN re-run." I correctly identified this in the PR body's matrix:
But my implementation checked the local manifest for the "Yes" cell, not remote. The matrix logic was right; the source of "Manifest at HEAD_SHA" was wrong. Substrate-state-care failure: I checked the more-convenient source (local file) instead of the authoritative source (remote main).
The fix
Check remote main's manifest state as the primary source; fall back to local for cases where remote isn't accessible (test/first-cut/bootstrap).
Test seam
MANIFEST_REMOTE_FIXTURE=/path/to/filelets bats simulate "remote main manifest content" without requiring an actual git fetch.New bats cases needed
Plus existing 9 tests preserved.
Composition with related work
Severity
Real bug (not cosmetic). The v0.10.2 cut substantively succeeded (release published + manifest on main) but the operator's re-run after cancellation produced exit-1, exactly like v0.10.0 did pre-#131 — except with a different mechanism (non-fast-forward push instead of release-create 409). The fix completes the partial-completion-matrix design.
Implementation surface
scripts/manifest-precheck.sh: ~10 lines of additional logic (remote check + fallback) + test seamtests/manifest-precheck.bats: 5 new tests for remote-aware behavior + adjust existing tests_release.ymlchange needed (script's interface unchanged)Refs