Repository navigation
release: cut 0.15.1, because 0.15.0 built and never published - #524
Merged
Merged
Conversation
The 0.15.0 release passed the 40-job gate, built five tarballs, three debs and three
rpms with their checksum siblings, pushed the Docker image and cleared the security
scan. Then the last step — checksum every asset and sign the list — exited on:
sha256sum: objectfs-0.15.0-1.aarch64.rpm.sha256: no properly formatted checksum
lines found
and no release page was ever created.
GoReleaser's `checksum: split: true` writes a bare digest: 64 lowercase hex characters,
no filename, no trailing newline, 64 bytes exactly. `sha256sum -c` cannot read that at
all — it needs a `<hash> <name>` line and fails the whole file. Established from the
real CI artifact with `od -c`, not inferred.
Review had nothing to catch. The comment above the broken line asserted the false thing
in so many words: "`sha256sum -c` reads the `<hash> <name>` form that both this file and
the per-asset siblings are written in". The code agreed with its own documentation.
The step now reads the digest with `tr -d '[:space:]'` rather than `awk '{print $1}'`,
deliberately: a `<hash> <name>` sibling — what a future GoReleaser or `split: false`
would write — must be rejected loudly rather than silently absorbed, because
scripts/install.sh reads the same files. Then it asserts the shape (lowercase hex,
nothing else) and the length (64, since a truncated digest still compares equal to
itself) before comparing against checksums.txt. Dropping -c costs no coverage:
checksums.txt is computed by `sha256sum $assets` from the bytes on disk one line above,
so comparing each sibling against it is what verifies the sibling against the artifact.
Verified against all eleven real v0.15.0 artifacts downloaded from the failed run's
release-dist artifact: 11/11 siblings verified, and the shape and length guards reject a
`<hash> <name>` line, a 63-character digest, an empty file, uppercase hex and garbage.
The release notes printed the same unusable command as their integrity-only fallback,
`sha256sum -c objectfs-<platform>.tar.gz.sha256`, which fails on every asset of every
release. SECURITY.md carried it too. Both now supply the filename the bare digest lacks.
internal/config/release_checksums_test.go is the coupling that was missing. Three
consumers share this format — .goreleaser.yml produces it, release.yml cross-checks and
documents it, install.sh verifies every user's download with it — and nothing tied them
together, so the break stayed invisible until a release was half-published. It walks
.github/workflows/ rather than enumerating it, so the next workflow is covered too, and
skips comments, since both files now describe the broken command on purpose. It also
pins `split: true`/`algorithm: sha256` (turning split off publishes no siblings at all,
and install.sh treats a missing one as fatal), and requires that install.sh still
verifies by comparing a non-empty published digest against a computed one — the
non-vacuity guard, since a rewrite that dropped verification entirely would satisfy the
prohibition perfectly. Each test was verified by reintroducing the corresponding defect
and watching it fail.
0.15.1 rather than a re-tag of 0.15.0. proxy.golang.org had already cached v0.15.0 by
the time this was diagnosed (HTTP 200 on the .info, present in @v/list), so its hash is
in the checksum database permanently; moving the tag would make `go get` fail for every
consumer forever, and GlobalFS pins this module. v0.15.0 stays a valid module version
whose code is exactly this code, and v0.15.1 is the first tag of it that publishes
assets. The 0.15.0 changelog entry is unchanged — it describes what shipped.
The cosign identity examples in README.md and docs/index.md named refs/tags/v0.15.0,
which is now actively misleading: that tag published no checksums.txt to verify. Both
are placeholders now. The prose in both files already said the notes print the real tag,
so the hardcoded one was the odd one out, and a version in prose has no way to be told
it has gone stale.
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.
The
v0.15.0release passed the 40-job gate, built all eleven assets, pushed the Docker image and cleared the security scan — then failed on the last step and never created a release page:Cause
GoReleaser's
checksum: split: truewrites a bare digest — 64 lowercase hex characters, no filename, no trailing newline, 64 bytes exactly.sha256sum -ccannot read that; it needs a<hash> <name>line and fails the whole file. Established from the real CI artifact withod -c, not inferred.Review had nothing to catch. The comment above the broken line asserted the false thing in so many words — "
sha256sum -creads the<hash> <name>form that both this file and the per-asset siblings are written in" — so the code agreed with its own documentation.scripts/install.shhad it right the whole time by comparing the digest directly, which is why this stayed invisible until a real publish.Fix
release.ymlreads the digest withtr -d '[:space:]'rather thanawk '{print $1}', deliberately: a<hash> <name>sibling (what a future GoReleaser orsplit: falsewould write) must be rejected loudly rather than silently absorbed, becauseinstall.shreads the same files. Then it asserts the shape (lowercase hex, nothing else) and the length (64 — a truncated digest still compares equal to itself) before comparing againstchecksums.txt. Dropping-ccosts no coverage:checksums.txtis computed bysha256sum $assetsfrom the bytes on disk one line above, so comparing each sibling against it is what verifies the sibling against the artifact.sha256sum -c objectfs-<platform>.tar.gz.sha256), which fails on every asset of every release.SECURITY.mdcarried it too. Both now supply the filename the bare digest lacks.internal/config/release_checksums_test.gois the coupling that was missing. Three consumers share this format —.goreleaser.ymlproduces it,release.ymlcross-checks and documents it,install.shverifies every user download with it — and nothing tied them together. It walks.github/workflows/rather than enumerating it (so the next workflow is covered) and skips comments (both files now describe the broken command on purpose); it pinssplit: true/algorithm: sha256, since turning split off publishes no siblings at all andinstall.shtreats a missing one as fatal; and it requiresinstall.shstill verify by comparing a non-empty published digest against a computed one — the non-vacuity guard, since a rewrite that dropped verification entirely would satisfy the prohibition perfectly.Verification
Against all eleven real
v0.15.0artifacts, downloaded from the failed run'srelease-distartifact: 11/11 siblings verified, and the guards reject a<hash> <name>line, a 63-character digest, an empty file, uppercase hex and garbage.Each of the three tests was verified by reintroducing the corresponding defect and watching it fail — the
-cbug inrelease.yml, the same bug spelled--check, the bug ininstall.shinstead,split: false, and the dropped empty-digest guard. Five mutations, five failures, all restored.go build ./...,go test -race ./...,golangci-lintand the full pre-commit hook set are green locally.Why 0.15.1 and not a re-tag
proxy.golang.orghad already cachedv0.15.0by the time this was diagnosed — HTTP 200 on the.info, present in@v/list— so its hash is in the checksum database permanently. Moving the tag would makego getfail for every consumer forever, and GlobalFS pins this module.v0.15.0stays a valid module version whose code is exactly this code;v0.15.1is the first tag of it that publishes assets. The0.15.0changelog entry is unchanged, because it describes what shipped.release.ymlison: push: tags:only, with noworkflow_dispatch, so a re-run of the failed job would reuse the workflow file from the tag's commit rather than the fixed one — the fix cannot be applied to an existing tag's run.The cosign identity examples in
README.mdanddocs/index.mdnamedrefs/tags/v0.15.0, now actively misleading since that tag published nochecksums.txtto verify. Both are placeholders; the prose in both files already said the notes print the real tag.