fix: recompute tool checksums on Renovate's pull requests - #94
Merged
Conversation
Renovate bumps the pinned tool versions but cannot compute a checksum, so every bump arrives with the previous release's hash still in place and the build stops at "computed checksum did NOT match". It has already happened in THectic.nl on a Hugo bump; actionlint and lychee are pinned the same way here and would fail the same way. This follows the pattern already in use in Stensel8/scripts for the nginx installer: a script that recalculates the hashes, and a workflow that runs it on Renovate's own branches and commits the result back. One detail carried over from there that is easy to miss: gitIgnoredAuthors. Without it Renovate sees the bot's commit as the branch having been modified by someone else, and stops maintaining the pull request. The hash is not simply whatever the download returned. Both projects publish a checksum file next to their release; the script verifies the download against that first and refuses to write anything on a mismatch, so a hash only lands here if upstream vouches for it too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SwrLVfDhkTVHC945s1kZ2s
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.
Summary
Renovate bumpt de gepinde toolversies maar kan geen checksum berekenen. Elke bump landt dus met de hash van de vórige release en de build stopt op
computed checksum did NOT match.In THectic.nl is dat al echt gebeurd op een Hugo-bump.
actionlintenlycheezijn hier op dezelfde manier gepind en zouden op dezelfde manier omvallen.Type of change
fix— bug fix (broken link, incorrect command, layout issue)Waar dit speelt
.github/workflows/config-validation.yml.github/workflows/pr-checks.ymlDe aanpak
Overgenomen uit Stensel8/scripts, waar de nginx-installer dit al zo doet: een script dat de hashes herberekent, plus een workflow die dat op Renovate's eigen branches draait en het resultaat terugcommit.
Eén detail uit dat voorbeeld dat makkelijk te missen is:
Zonder die regel ziet Renovate de bot-commit als "de branch is door iemand anders aangeraakt" en stopt met het onderhouden van de PR.
De pin wordt niet verzwakt
Het script schrijft niet klakkeloos op wat de download opleverde. Het haalt eerst het door upstream gepubliceerde checksum-bestand op, verifieert de download daartegen, en weigert te schrijven bij een mismatch. Beide tools publiceren er één (actionlint
_checksums.txt, lychee.tar.gz.sha256).Checklist
hugo server— n.v.t.; in plaats daarvan is het script hier gedraaid (beide berekende hashes identiek aan wat er gepind staat), en zijn actionlint,renovate-config-validator --stricten shellcheck groen🤖 Generated with Claude Code
https://claude.ai/code/session_01SwrLVfDhkTVHC945s1kZ2s
Generated by Claude Code