Refuse a Stalwart 1.0 target, and default --target to 0.16.27 #23

Merged
jcoffey-dev merged 3 commits from fix/refuse-1.0-target into main 2026-10-28 06:35:33 +00:00
Owner

Bug: --target defaulted to latest, and since 2026-10-26 Stalwart's latest release is 1.0.0. With default flags:

  • a 0.16.x server was planned as a same-boundary patch upgrade to 1.0.0, which swaps the 1.0 binary in over a 0.16 store that 1.0 can't read;
  • a 0.15.5 server was planned as an ordinary 0.16 migration that ends on 1.0.0.

Reproduced in a test before the fix: preflight reported 0.16.22 -> 1.0.0 is a same-boundary patch upgrade: fast-path plan applies.

Fix:

  • preflight's upgrade-direction check and plan.Decide refuse any target at 1.0 or later, naming 0.16.27, until the route in docs/design-1.0.md is built.
  • --target defaults to 0.16.27, the last 0.16 release, in preflight, rehearse and run.
  • TestDecideFutureMajorCrossesBoundaryToo pinned the old acceptance of 0.15 → 1.0. It is rewritten to pin the refusal, and a new preflight test covers latest resolving to v1.0.0. That test fails on main and passes here.

Also: a README Support section listing the supported upgrade (0.15.5 → 0.16.27), 0.16 → 1.0 as designed but not built, and what happens when Stalwart changes the path.

Ran locally: go vet ./..., go test ./..., govulncheck (no vulnerabilities). Needs a release after merging, since operators run the release binary.

**Bug:** `--target` defaulted to `latest`, and since 2026-10-26 Stalwart's latest release is **1.0.0**. With default flags: - a 0.16.x server was planned as a *same-boundary patch upgrade* to 1.0.0, which swaps the 1.0 binary in over a 0.16 store that 1.0 can't read; - a 0.15.5 server was planned as an ordinary 0.16 migration that ends on 1.0.0. Reproduced in a test before the fix: preflight reported `0.16.22 -> 1.0.0 is a same-boundary patch upgrade: fast-path plan applies`. **Fix:** - preflight's `upgrade-direction` check and `plan.Decide` refuse any target at 1.0 or later, naming 0.16.27, until the route in `docs/design-1.0.md` is built. - `--target` defaults to **0.16.27**, the last 0.16 release, in `preflight`, `rehearse` and `run`. - `TestDecideFutureMajorCrossesBoundaryToo` pinned the old acceptance of 0.15 → 1.0. It is rewritten to pin the refusal, and a new preflight test covers `latest` resolving to v1.0.0. That test fails on main and passes here. **Also:** a README **Support** section listing the supported upgrade (0.15.5 → 0.16.27), 0.16 → 1.0 as designed but not built, and what happens when Stalwart changes the path. Ran locally: `go vet ./...`, `go test ./...`, `govulncheck` (no vulnerabilities). Needs a release after merging, since operators run the release binary.
jcoffey-dev added 2 commits 2026-10-28 05:11:52 +00:00
--target defaulted to "latest", and since 2026-10-26 Stalwart's latest
release is 1.0.0. With default flags, preflight then planned 0.16.x -> 1.0.0
as a same-boundary patch upgrade (the binary swapped in over a 0.16 store,
which 1.0 can't read) and 0.15.5 -> 1.0.0 as an ordinary 0.16 migration.

preflight's upgrade-direction check and plan.Decide now refuse any target at
1.0 or later, naming 0.16.27, until the route in docs/design-1.0.md is
built. --target defaults to 0.16.27, the last 0.16 release, in preflight,
rehearse and run. The test that pinned 0.15.x -> 1.0.0 as accepted is
rewritten to pin the refusal, and a new preflight test covers "latest"
resolving to v1.0.0.
README: a Support section with the upgrades it handles
ci / test (pull_request) Skipped
ci / release (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 31s
ci / announce (pull_request) Skipped
ff1232c81c
0.15.5 -> 0.16.27 is supported and gets bug and security fixes; 0.16 -> 1.0
is designed but not built, so the tool refuses it; nothing else is
supported.
jcoffey-dev added 1 commit 2026-10-28 05:12:32 +00:00
docs: examples target 0.16.27
ci / test (pull_request) Skipped
ci / release (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 51s
ci / announce (pull_request) Skipped
44e8d2199b
jcoffey-dev merged commit 33129bdc4c into main 2026-10-28 06:35:33 +00:00
jcoffey-dev deleted branch fix/refuse-1.0-target 2026-10-28 06:35:33 +00:00
Sign in to join this conversation.