Fix the Nix flake, and stop the hash check reporting false success
v0.8.0 shipped a flake that cannot build
go: go.mod requires go >= 1.26.5 (running go 1.26.4; GOTOOLCHAIN=local)
#533 raised go.mod to 1.26.5 on 2026-07-13. flake.lock still pinned a
nixpkgs from 2026-06-28 carrying 1.26.4, and release prep never updates the
lock. Every nix build user has been broken since, across two releases.
Why nothing caught it
Both safeguards were blind, independently:
update-nix-flake.shreported success on failure. It ran
nix build ... || true, then treated the presence of
building '...basecamp-0.8.0-go-modules.drv'as proof of success. Nix prints that
when the build starts — so a hard failure printed
vendorHash: verified (build succeeded). It said exactly that during the v0.8.0
release, which is how a broken flake got through a pre-tag check that existed to
prevent this.nix-verifycould not fail the run.continue-on-error: true, and it only runs
on tags — weeks after the drift is introduced. For v0.8.0 it never ran at all,
because the AUR outage reddenedreleaseand skipped everyneeds: [release]job.
The fix
Lock + hash. Updating nixpkgs to one carrying 1.26.5 surfaced a second defect the
Go error had been masking — the recorded vendorHash was stale as well:
specified: sha256-hG1eymlnBAhRDtOqi078uVwMwEFC9+8ilft1LOW7SzY=
got: sha256-DmCW1Ms9TmcvEzvNIcqutf1bxtOpN+MjpPO0XP1VaZQ=
Both corrected. nix build now exits 0 and the resulting binary reports
basecamp version 0.8.0.
Fail closed. The release-time check now reads the real exit status. A failure that
is not a hash mismatch is fatal instead of shrugged off, and when it does update a
hash it rebuilds to prove the new one works — which the old code never did.
Catch it at the source. nix-verify is no longer continue-on-error, and a
path-filtered nix-build job runs on PRs touching go.mod, go.sum, flake.* or
nix/**, so a Go bump that outpaces the lock fails its own PR.
Verification
Run against the real Docker path, not reasoned about:
| Scenario | Before | After |
|---|---|---|
| Stale lock (the v0.8.0 condition) | vendorHash: verified (build succeeded), exit 0 | exit 1, prints the Go version error |
| Fixed lock + hash | — | vendorHash: verified (build succeeded), exit 2 |
nix build on this branch | fails | exit 0, binary runs |
bin/ci exit 0, actionlint clean, zizmor no findings.
Consequence for the queue
0.8.1 cannot be a bare manifest bump — it has to carry this first, or it repeats the
broken Nix release. Let release.sh stamp both plugin manifests as part of that
release rather than bumping them standalone.
Summary by cubic
Fixes the broken Nix flake by updating flake.lock to a nixpkgs with Go 1.26.5 and correcting the Go vendorHash. Makes the hash check accurate and fail-closed so a flake that can’t build can’t ship again.
-
Bug Fixes
- Update
flake.lockto a revision with Go 1.26.5. - Update
nix/package.nixvendorHash. - Only rewrite
vendorHashwhennixreports a fixed-output hash mismatch and the captured value is SRI-shaped; then rebuild to verify.
- Update
-
CI
- Make release
nix-verifyblocking (removecontinue-on-error). - Fail closed end-to-end: use the real
nix buildexit code, build unconditionally, update the hash only on mismatch, andmake update-nix-hashnow propagates real failures (RC 0=updated, 2=no-op). - Add a path-filtered
nix-buildjob in PR CI for changes togo.mod,go.sum,flake.*, andnix/**. - Add regression tests for the hash-check script (stubbed Docker), including a case that rejects unrelated “got:” logs.
- Make release