Add pin-check: catch release pins that have fallen behind upstream #58

Merged
jcoffey-dev merged 1 commits from feat/pin-check into main 2026-11-12 19:51:59 +00:00
Owner

Roadmap item: installer image-pin bump bot (inbuxa-drafts/27.1-tooling-roadmap.md:116) — "automate default-image pin bumps so a fresh install is never shipped with a stale/vulnerable pin."

A fresh install ships whatever internal/release/release.go names, so a pin left behind is a fresh install shipped stale — and, if the skipped release fixed a vulnerability, shipped vulnerable. The server/console/webmail pins have each gone stale before.

What it does

cmd/pin-check reads each component's releases from the Gitea API and reports when the pinned version is behind the newest release in its channel:

  • The channel follows the pin: a candidate pin (27.1-rc.15) tracks newer 27.1 candidates and the 27.1 final.
  • It stays in the pin's own major.minor series. A later flagship (27.2) or the parallel calendar-versioned maintenance line (2026.x) the suite ships alongside the flagship is a deliberate move to a new installer line, not a pin bump. (The live run surfaced exactly this: v2026.11.11 sorts above 27.1 by raw version — the series guard drops it.)

It only reads; it never edits release.go. The move stays a reviewed change with new checksums taken from each release's signed SHA256SUMS. It exits 10 when anything is stale, so the weekly .gitea/workflows/pin-check.yml run turns a stale pin into a red run and, with --issue, a single self-updating tracking issue. Release reads are public (no token); --issue uses the run token to write the issue in this repo.

Structure

  • internal/pins — pure version parse / compare / channel / staleness logic, fully unit-tested.
  • cmd/pin-check — Gitea releases API reads + exit codes, covered with an httptest server.
  • .gitea/workflows/pin-check.yml — weekly cron (+ manual dispatch).
  • Stdlib only (CI's no-dependency rule holds).

Live finding

Running it now reports the installer's own pins are genuinely behind: server rc.15 -> rc.21, console rc.10 -> rc.14, webmail rc.3 -> rc.4. Bumping those is a separate release decision (the tool's whole point is to surface it) — not included here.

Verification

gofmt clean, go vet (amd64 + arm64), go test ./... all pass; stdlib-only. CI's govulncheck runs under the pinned golang:1.26.11 image, where the current net/http advisory (GO-2026-6859) is already fixed (fixed-at 1.26.11), so no CI-image bump is needed.

Roadmap item: installer **image-pin bump bot** (`inbuxa-drafts/27.1-tooling-roadmap.md:116`) — *"automate default-image pin bumps so a fresh install is never shipped with a stale/vulnerable pin."* A fresh install ships whatever `internal/release/release.go` names, so a pin left behind is a fresh install shipped stale — and, if the skipped release fixed a vulnerability, shipped vulnerable. The server/console/webmail pins have each gone stale before. ### What it does `cmd/pin-check` reads each component's releases from the Gitea API and reports when the pinned version is behind the newest release **in its channel**: - The channel follows the pin: a candidate pin (`27.1-rc.15`) tracks newer `27.1` candidates and the `27.1` final. - It stays in the pin's **own major.minor series**. A later flagship (`27.2`) or the parallel **calendar-versioned maintenance line** (`2026.x`) the suite ships alongside the flagship is a deliberate move to a new installer line, not a pin bump. (The live run surfaced exactly this: `v2026.11.11` sorts above `27.1` by raw version — the series guard drops it.) It **only reads**; it never edits `release.go`. The move stays a reviewed change with new checksums taken from each release's signed `SHA256SUMS`. It exits **10** when anything is stale, so the weekly `.gitea/workflows/pin-check.yml` run turns a stale pin into a red run and, with `--issue`, a single self-updating tracking issue. Release reads are public (no token); `--issue` uses the run token to write the issue in this repo. ### Structure - `internal/pins` — pure version parse / compare / channel / staleness logic, fully unit-tested. - `cmd/pin-check` — Gitea releases API reads + exit codes, covered with an `httptest` server. - `.gitea/workflows/pin-check.yml` — weekly cron (+ manual dispatch). - Stdlib only (CI's no-dependency rule holds). ### Live finding Running it now reports the installer's own pins are genuinely behind: server `rc.15 -> rc.21`, console `rc.10 -> rc.14`, webmail `rc.3 -> rc.4`. Bumping those is a separate release decision (the tool's whole point is to surface it) — not included here. ### Verification gofmt clean, `go vet` (amd64 + arm64), `go test ./...` all pass; stdlib-only. CI's govulncheck runs under the pinned `golang:1.26.11` image, where the current net/http advisory (GO-2026-6859) is already fixed (fixed-at 1.26.11), so no CI-image bump is needed.
jcoffey-dev added 1 commit 2026-11-12 18:03:50 +00:00
A fresh install ships whatever internal/release/release.go names, so a
pin left behind is a fresh install shipped stale -- and, when the release
it skipped fixed a vulnerability, shipped vulnerable. The server, console
and webmail pins have each gone stale before.

pin-check reads each component's releases from the Gitea API and reports
when the pinned version is behind the newest release in its channel. The
channel follows the pin: a candidate pin (27.1-rc.15) tracks newer 27.1
candidates and the 27.1 final, and the check stays in the pin's own
major.minor series -- a later flagship (27.2) or the parallel
calendar-versioned maintenance line (2026.x) the suite ships alongside
is a deliberate move to a new installer line, not a pin bump.

It only reads; it never edits release.go. The move stays a reviewed
change with the new checksums taken from each release's signed
SHA256SUMS. The tool exits 10 when anything is stale, so the weekly
.gitea/workflows/pin-check.yml run turns a stale pin into a red run and,
with --issue, a self-updating tracking issue.

The version/compare/channel logic is a pure, unit-tested package; the
command's API reads and exit codes are covered with an httptest server.
Stdlib only.
jcoffey-dev merged commit 1e45e62c2d into main 2026-11-12 19:51:59 +00:00
jcoffey-dev deleted branch feat/pin-check 2026-11-12 19:51:59 +00:00
Sign in to join this conversation.