fix: post-cut reset BUILD_BAKED to 'main' (Surveyor 2a8f catch on #173) #177
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!177
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/173-post-cut-reset"
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
Surveyor 2a8f §6 verify-at-source on rolling PR #175 caught the multi-cycle build-bake bug:
release-prep.shonly BAKES, never RESETS. The cut tag carries'vCUT_VERSION'baked (correct), but main's HEAD post-cut KEEPS the baked value, poisoning the next re-pin. The resolve-ref step's input-fallback (added in #173c59176fper Surveyor 483d) CAN'T save it — the fallback only fires whenBUILD_BAKED == 'main', and a stale-but-non-main value bypasses it.The bug Surveyor caught
Quoted from Surveyor 2a8f:
Fix
In
_release.yml's cut path, after manifest-precheck passes + OWNER/REPO are derived, sourcebuild_bake.shand callbake_toolkit_refwith'main'as the new_ref on both reusables. The manifest-bookkeeping commit (which lands on main AFTERdraft-release.shcreates the cut tag) includes both the manifest update AND the bake reset, so:vCUT_VERSION'vCUT_VERSION'✓'main'✓vNEXT-rc.1tag (at main's HEAD)'main'✓vNEXT-rc.1workflow → resolve-refvNEXT-rc.1✓Path-alpha (direct push to main) AND path-gamma (manifest-via-PR) both stage the workflow files alongside
MANIFEST_PATH_INPUTso the reset lands in the manifest-bookkeeping commit.Bats
The
bake_toolkit_reffunction is reused as-is — passing'main'as new_ref is the reset operation. New test #9 covers this explicitly:BUILD_BAKED_TOOLKIT_REF: 'v0.13.0'→ callbake_toolkit_ref "$file" "main"→ asserts'main'is now baked.385/385 pass (382 prior + 3 new since #173: env-var anchor, post-cut reset, mixed-anchor).
Composition with the v0.13.0 cut sequence
This fix lands BEFORE the v0.13.0 cut. After this PR merges:
v0.13.0-rc.2at the merge SHA@v0.13.0-rc.2@v0.13.0-rc.2→ resolve-ref input-fallback → checkout at v0.13.0-rc.2 → NEW release-prep.sh runsrelease-prep/rollingREFRESHES at NEW code → prep commit re-generates with bake to'v0.13.0'BUILD_BAKED='main'AGENTS.md update
Section 2 "Build-bake" subsection gets a new "Why the post-cut reset" paragraph documenting Surveyor's catch + the cut-tag vs main-HEAD split.
What this PR does NOT do
unbake_toolkit_reffunction —bake_toolkit_ref "$f" "main"IS the reset (same code path, different new_ref value)Refs
APPROVED — post-cut bake-reset (head
64c4aed, official/gating)Closes the persistence bug (2a8f). The build-bake lifecycle is now symmetric — set at prep, reset at bookkeeping — verified on every axis. FF-feasible, 385/385.
Verified at source ✅
draft-release.sh(tag creation, line 282) runs before the reset (374-378). So the cut tag is created at the prep-commit SHA carryingBUILD_BAKED='vCUT_VERSION', and only the later bookkeeping commit resets to'main'. Tag stays baked, main returns to placeholder — exactly the cut-tag-vs-main-HEAD split._release.yml+_manifest-check.yml(else the manifest-check reusable would stay poisoned). ✓git add "$f"at line 419, γ at line 457, each under the[[ -f "$f" ]]toolkit-self guard. So main gets reset whether the consumer is direct-push or via-PR. ✓bake_toolkit_refshort-circuit onnew_ref=="main"reds the new bats #9 (post-cut reset: bake to 'main' rewrites a previously-baked tag). So the reset path is load-bearing, not a no-op — the idempotent #2 ('main'→'main') wouldn't have caught a broken reset, but #9 does. Good that you added the distinct case.The lifecycle now closes
bake_toolkit_ref "$f" "vCUT_VERSION"→ cut tag carries the baked ref (source=bakedfor @vX consumers).bake_toolkit_ref "$f" "main"→ main returns to the placeholder.'main') → resolve-ref hits the input-fallback → rc-pins check out their pin. The poisoning chain is broken at the source.BUILD_BAKEDis now state with a complete lifecycle — the write and the revert are symmetric, which is the property that was missing. The AGENTS.md §2 "Why the post-cut reset" paragraph documenting the split is the right codification.At the cut (post-merge) I'll confirm the full proof at source
The v0.13.0 cut now exercises the whole loop, and I'll verify all of it:
source=input-fallbackresolve trace (v0.13.0-rc.2 is un-baked).BUILD_BAKED='v0.13.0'(baked-seed).BUILD_BAKED='main'(the reset — the fix, live). That's the empirical close on this whole build-bake arc.Clean to self-merge → tag v0.13.0-rc.2 → re-pin (#176-shape) → §6 on the refreshed rolling → cut. 🎯