Skip to content

release: cut 0.15.1, because 0.15.0 built and never published - #524

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/release-split-checksums-0-15-1
Sep 17, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/release-split-checksums-0-15-1

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

The v0.15.0 release 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:

Publish Release  Checksum every asset and sign the list, keylessly
sha256sum: objectfs-0.15.0-1.aarch64.rpm.sha256: no properly formatted checksum lines found

Cause

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; 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" — so the code agreed with its own documentation. scripts/install.sh had it right the whole time by comparing the digest directly, which is why this stayed invisible until a real publish.

Fix

  • release.yml 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 install.sh reads 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 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.
  • 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 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 pins split: true/algorithm: sha256, since turning split off publishes no siblings at all and install.sh treats a missing one as fatal; and it requires install.sh still 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.0 artifacts, downloaded from the failed run's release-dist artifact: 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 -c bug in release.yml, the same bug spelled --check, the bug in install.sh instead, split: false, and the dropped empty-digest guard. Five mutations, five failures, all restored.

go build ./..., go test -race ./..., golangci-lint and the full pre-commit hook set are green locally.

Why 0.15.1 and not a re-tag

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; v0.15.1 is the first tag of it that publishes assets. The 0.15.0 changelog entry is unchanged, because it describes what shipped.

release.yml is on: push: tags: only, with no workflow_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.md and docs/index.md named refs/tags/v0.15.0, now actively misleading since that tag published no checksums.txt to verify. Both are placeholders; the prose in both files already said the notes print the real tag.

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.
@scttfrdmn scttfrdmn added type: bug Something isn't working as expected priority: critical Blocking issue requiring immediate attention area: build Build system, compilation, packaging area: ci-cd CI workflows, gates, and release automation labels Sep 17, 2026
@scttfrdmn
scttfrdmn merged commit cfebbb1 into main Sep 17, 2026
46 checks passed
@scttfrdmn
scttfrdmn deleted the fix/release-split-checksums-0-15-1 branch September 17, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build system, compilation, packaging area: ci-cd CI workflows, gates, and release automation priority: critical Blocking issue requiring immediate attention type: bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant