fix(check-self-bootstrap): normalize build-bake marker line before compare (closes #184) #185
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!185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/184-check-self-bootstrap-bake-normalization"
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?
Closes #184.
Why
Operator-flagged on the v0.13.0 cut: "v0.13.0 has some issues in the workflows." Source-probe found that
check-self-bootstrap.ymlproduces a guaranteed-red run on every cut-prep merge commit since #173/#177 introduced the build-bake mechanism.Empirical evidence (v0.13.0 cut, 2026-06-27)
caadf757caadf757(rc.2 self-bootstrap)5a2efa75(prep merge)5a2efa755d4bb67f(post-cut bake-reset)5d4bb67fThe same false-positive pattern fired on the substrate-PR merges that introduced the build-bake (#173) + post-cut reset (#177): tasks 13471 (
c59176fc), 13486 (64c4aed0), and 13495 (5a2efa75= v0.13.0 cut prep merge).Root cause
Build-bake (#148) requires the cut-prep commit to bake the to-be-cut version into
BUILD_BAKED_TOOLKIT_REFso the cut tag carries the baked ref (construction-enforces consumer-pin per AGENTS.md §2). The rc.N pin used for the cut's actual execution doesn't have this bake. So between prep-merge and post-cut bake-reset,_release.yml+_manifest-check.ymlat HEAD legitimately differ from the pinned rc tag — andcheck-self-bootstrap.sh's blob-hash compare flagged this as drift requiring re-pin.check-self-bootstrap.shwas designed pre-#148 when no compose-script line was expected to differ between HEAD and pin. Build-bake introduces a single tolerated-diff line marker-anchored as# release-toolkit-build-ref.What changed
scripts/check-self-bootstrap.sh: replacegit rev-parseblob-hash compare withgit show | sed | sha256sumcontent compare, normalizing lines matching'[^']*' # release-toolkit-build-refto'__BAKE_NORMALIZED__' # release-toolkit-build-refon both sides before hashing.The sed pattern mirrors
scripts/lib/build_bake.shexactly — same regex shape, so the marker structure is a single source of truth.What the normalization tolerates
'main'↔'v0.13.0')Tests
Three new bats tests in
tests/check-self-bootstrap.batscover all three cases:#184 build-bake marker line value diverges between HEAD and pinned -> still OK#184 build-bake marker line REMOVED on HEAD -> STILL FAILS#184 surrounding YAML around bake marker changes -> STILL FAILSFull bats suite (388 tests) passes.
Empirical proof
Tested locally against the actual v0.13.0 cut-prep workflow files:
203544cd != 736cb2d2(DIFF) — what failed in CI__BAKE_NORMALIZED__substituted on both sides → same →OKWhat this PR will NOT do
Composition
toolkit_refinput, the bake mechanism still rewrites the marker line, so the normalization is forward-compatible.Refs
5a2efa75🤖 Generated with Claude Code
https://claude.ai/code/session_01LUEggQMJjaizj2nFVofeyH
APPROVED — backstop build-bake false-positive fix (head
87d7aa2, official/gating)The operator-flagged "v0.13.0 has issues in workflows" is correctly diagnosed and surgically fixed. Verified at source on every axis, including the real v0.13.0 files. FF-feasible, 388/388.
The root cause is right, the fix is surgical ✅
The build-bake (#148) legitimately mutates the
BUILD_BAKED_TOOLKIT_REFline in_release.yml/_manifest-check.yml('v0.13.0'baked on the cut tag,'main'on the pinned rc) — so HEAD's blob diverges from the pinned ref's for that one line, and the #124 backstop's raw sha256 compare flags it as drift. False positive: the divergence is the build-bake doing its job, not an un-re-pinned compose-script.The fix normalizes only that line before hashing:
Marker-anchored on
# release-toolkit-build-ref— the same anchor build_bake.sh uses, so it neutralizes exactly what the bake mutates and nothing else. Both HEAD and pinned normalize to the same placeholder → the legitimate divergence disappears, real divergence survives.Surgical-ness proven, not asserted ✅
NORM_SEDto a no-op reds the#184 canonical false-positivetest — the normalization is load-bearing.'v0.13.0') vs v0.13.0-rc.2 ('main'): raw hashes DIFFER, normalized hashes SAME. The exact false-positive the operator saw, fixed.Process note (expected, not a defect)
This PR changes
check-self-bootstrap.sh— itself a compose-script — so the backstop will red on this PR (HEAD vs pinned diverge on the real normalization code, no marker to neutralize that). That's the documented expected-red-on-compose-script-PR (§2.3), and it needs the standard re-pin after merge. #185 is afix:→ v0.13.1, so: merge → tag v0.13.1-rc.1 → re-pin → cut. I'll confirm the false-positive is gone on that next cut-prep merge at source (the run that was task 13495's false-red should now be clean).Nicely scoped fix for a two-mechanism interaction (build-bake's side-effect on a backstop-tracked file). Clean to self-merge. 🎯
quartermaster referenced this pull request2026-06-27 14:43:40 +02:00