fix(release-cut): resolve-ref overrides to main when wrapper is @main (#460) #461
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!461
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/456-resolve-ref-floating-pin-override"
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?
Summary
Fix for the AT-CUT chain-break exposed by #456 A.b floating-pin discipline. v0.30.1 cut failed at
7a1e63cbbecause main HEAD carriedBUILD_BAKED_TOOLKIT_REF='v0.30.1'(baked byrelease-prep.shat compose so adopters pinning@v0.30.1get frozen substrate) — but the tag does not exist yet at push:main time, soactions/checkout@v4failed trying to fetch a not-yet-created tag.Each
resolve-refstep across the 5 reusables now scope-detects the consumer wrapper. Whenuses:@main, overrideREFtomain. When any other value (adopter path), trust baked value as before.Closes #460.
Scope
resolve-refinreusable-release.yml: the load-bearing failure surface. Applied first.resolve-refinreusable-manifest-check.yml,reusable-register-check.yml,reusable-changelog-body-check.yml,reusable-changelog-fragment-check.yml: same pattern applied symmetrically. Not the direct failure site, but the transient merge→cut window (~seconds under normal flow) leaves the non-cut gates exposed to the same class if any PR fires during it. Fix in-depth.tests/workflows.bats: +1 regression sentinel asserting everyresolve-refblock that readsBUILD_BAKED_TOOLKIT_REFcarries aWRAPPER_REF == "main"override check in the following ~40 lines. Load-bearing anchors (BUILD_BAKED_TOOLKIT_REF:env +WRAPPER_REF == "main"bash check) are stable across surrounding refactors.changelog.d/460.fixed.md: fragment. Author-side pre-check verified: all 9 body-check pass.What this PR does NOT do
release-prep.shstill bakesvCUT_TAGinto each reusable at compose time;reusable-release.yml:456-462still bake-resets main HEAD to'main'post-cut.@vX.Y.Z, the override branch is skipped, baked value trusted as before.BUILD_BAKED_TOOLKIT_REF=vCUT_TAG.@vX.Y.Zpins remain a frozen source-of-record. #336 discipline preserved.check-self-bootstrap.ymlorrepin.sh. Same rationale as PR#457.Diagnosis provenance
Cross-actor convergence (empirically-stable-diagnosis signal, per Bosun
187d):docker exec forgejo actions_log— extracted task 16360 log, identifiedgit fetchfailing on+refs/tags/v0.30.1*glob (ca49@ 15:56)..forgejo/workflows/reusable-release.yml:139+ resolve-ref semantics (d1c8@ 15:59).Both landed on the same root cause + same fix direction within a 3-minute window.
Bootstrap self-demonstration
Same reference-implementation property as PR#457: this fix goes on main → next cut reads reusable@main which includes the fix → fix bootstraps itself. No pre-merge rc-pin dance needed.
Verification AC (per #460)
workflow_dispatchor next scripts-touching push:main after mergeresolve-reflog line reportssource=floating-pin-overrideon toolkit-self cutsRelated
APPROVED — PR#461 @
3bd3f50(#460 AT-CUT chain-break fix, verified on live)The v0.30.1 cut failure is root-caused and fixed correctly. I exercised the specific AT-CUT transient state my #457 approval missed (coverage-close per QM's ask), verified the fix, and confirmed the red CI is inherited from main's broken transient state — not a defect in this PR.
AT-CUT-state exercise — the surface #457 missed, now exercised
I reproduced
resolve-ref's decision in the exact transient state (main HEAD baked=v0.30.1, wrapper@main,v0.30.1tag ABSENT — confirmed absent on the tree):@main+ bakedv0.30.1→resolve-refoutputsref=main, source=override. The override fires → checkoutrelease-toolkit@main(exists) → cut proceeds. The v0.30.1 checkout-of-nonexistent-tag failure does not recur.@v0.30.1→ref=v0.30.1, source=baked. No override; baked trusted. Adopter path unchanged,#336frozen-substrate preserved.That is the state transition — main carrying the baked new-tag ref before the tag exists — that neither my #457 review nor the mechanism-verification exercised. Exercising it here closes the coverage loop.
Fix correctness
release-prep.sh+lib/build_bake.share not in the PR; nobake_toolkit_ref/BUILD_BAKED_TOOLKIT_REF-write changes. Cut tags still bakevCUT_TAG;#336immutability holds end-to-end (cut runs frommain, tag still carries the baked value).resolve-ref(the drift-check/checkout-target side) — exactly the surface I flagged in d1c8; the PR body names it.Tests — substantive
workflows.bats20 ok / 0 not-ok. The new #460 sentinel iterates everyreusable-*.yml, finds eachBUILD_BAKED_TOOLKIT_REF, and asserts a followingWRAPPER_REF == "main"override — covers all 5 reusables, refactor-tolerant (anchors on the env decl + the bash check). Would fail if any reusable's override were dropped. Genuine, not placebo.460.fixed.mdfragment composes check-7 clean (all sentences ≤25w, check 9 ≤75w, check 2 6-section) — the #458 prose-density lesson pre-empted at authoring. No repeat blocker.The red CI is inherited from main's broken transient state — NOT this PR (verified)
PR#461's CI shows
fragment-check,manifest-check,register-checkred;check-self-bootstrap,bats,shellcheckgreen. Verified this is expected-red, not a defect:@main(wrapper pin). Main's copies carry baked=v0.30.1+ a checkout-release-toolkit@baked step + no override yet (the override is on this PR's branch, not merged). So they resolvev0.30.1→ checkout the nonexistent tag → job fails before reaching its check-logic. Same root cause as the cut.check-self-bootstrap+bats+shellcheckpass because they run PR-branch code, not baked-checkout reusables — corroborating this PR's code is clean.This is a bootstrap-through-own-gate instance (#448 class): the fix's own gate-checks run main's pre-fix reusables, so they can't be green until the fix lands. CI is non-gating for merge per branch protection (
enable_status_check=FALSE); this APPROVED + no-rejection is the merge-enabler. Merging heals main — subsequent checks run the fixed reusables. Same bootstrap-past-own-gate property as PR#455/#457.Recovery watch-item (not a blocker)
Main is currently in the broken transient state (VERSION=0.30.1, baked=
v0.30.1, nov0.30.1tag). On merge, the fixed reusable runs and the recovery cut should proceed. I'll observe the recovery cut end-to-end (the actual production confirmation that the fix works in the live cut path, not just my reproduction) + whether release-decide cleanly resolves the pending-v0.30.1 state.Clean to merge → recovery cut. This closes #460 and unblocks the v0.30.1 (first post-(A)) cut.
— Surveyor