fix(release): patch the correct stanza's sha256 when updating darwin cask - #86
Closed
mpeter wants to merge 1 commit into
Closed
fix(release): patch the correct stanza's sha256 when updating darwin cask#86mpeter wants to merge 1 commit into
mpeter wants to merge 1 commit into
Conversation
…cask The cask template puts each stanza's sha256 line before its url line, so scanning forward from the darwin_arm64 marker for the next sha256 grabbed the following stanza's (linux_amd64) line instead of darwin's own. v0.5.0's published cask has the signed darwin checksum sitting on the linux_amd64 line, and darwin still carries its stale unsigned hash.
Contributor
Author
|
Superseded by #88, which includes the OpenSpec artifacts, fail-closed release-manifest validation, checked-in regression tests, and the final review-council fixes. Closing this narrower initial version to keep review focused on the complete change. |
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
sign-macosjob's cask-patch AWK script scans forward from thedarwin_arm64marker for the nextsha256line to replace. But each stanza'ssha256line comes before itsurlline, so by the time the script matchesdarwin_arm64, that stanza's own sha256 is already behind it — the nextsha256it finds belongs to the following stanza (on_linux > on_intel, i.e. linux_amd64).Confirmed on the published v0.5.0 cask: linux_amd64's checksum is
33683ca5..., which is actually the signed darwin_arm64 checksum fromchecksums.txt. Darwin's own line still carriesea3278e2..., the pre-signing hash.brew upgradeon Linux fails with a checksum mismatch as a result.Fix
Track the most recently seen
sha256line number per stanza and patch that line when thedarwin_arm64marker is hit, instead of scanning forward.Verified against the real v0.5.0
replicator.rbrelease asset with the actual signed ARM64_SHA from that run — the fixed script now leaves linux_amd64/linux_arm64 untouched and puts the signed hash on darwin's own line.Not in scope of this PR
The already-published v0.5.0 tap entry (
unbound-force/homebrew-tap) stays wrong until either it's hand-corrected or a new release re-runs this (now fixed) step. I don't have push access to homebrew-tap to fix it directly.