aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-21 22:56:32 +0000
committertv <tv@krebsco.de>2026-11-21 22:56:42 +0000
commit2a9ebe39770754975f3b701a1dbd9127af323ffb (patch)
tree0b8035e621d18b555d2523681e2247deba984127
parent3507e96d8402ea681343a4b3d63aa87bdceb022f (diff)
release: before 1.0.0, versions read as Cargo reads them
Of 0.Y.Z, a flag day raises Y, a release one node at a time raises Z: the first part that isn't 0 is the major one, so releases before 1.0.0 practise the same kinds of bumps as those after. scripts/release refuses a flag day that doesn't raise it (leading), where before 1.0.0 it took any. The docs' examples release 0.1.0 next: 0.0.2 would read as a flag day after 0.0.1.
-rw-r--r--CHANGELOG.md5
-rw-r--r--docs/development.md15
-rw-r--r--docs/guides/federation/upgrades.md3
-rw-r--r--docs/operations.md4
-rwxr-xr-xscripts/release14
5 files changed, 26 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abdb16f..98e3bbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ it from the release before ([`docs/operations.md`](docs/operations.md),
## Unreleased
+* Before 1.0.0, versions read as Cargo reads them: of `0.Y.Z`, a release every node
+ upgrades to together raises `Y`, any other raises `Z`; `scripts/release` refuses a flag
+ day that doesn't ([`docs/operations.md`](docs/operations.md),
+ [Upgrading](docs/operations.md#upgrading); [`scripts/release`](scripts/release)).
+
* A node joining through a seed that is joining itself no longer waits for ever: a seed
names the swarm's root once it has it, shaking hands again with each peer it named
none to ([`docs/access.md`](docs/access.md); [`src/swarm/roots.rs`](src/swarm/roots.rs)).
diff --git a/docs/development.md b/docs/development.md
index 2ad5bd6..0e98af2 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -112,9 +112,9 @@ upgrade to it from the release before ([`operations.md`](operations.md),
[Upgrading](operations.md#upgrading)). `scripts/release` makes one, and pushes nothing:
```sh
-scripts/release --dry-run 0.0.2 # checks, and says what it would write
-scripts/release 0.0.2 # the same, then commits and tags
-git push origin HEAD v0.0.2
+scripts/release --dry-run 0.1.0 # checks, and says what it would write
+scripts/release 0.1.0 # the same, then commits and tags
+git push origin HEAD v0.1.0
```
It takes a clean tree with notes under Unreleased in [`CHANGELOG.md`](../CHANGELOG.md), and a
@@ -124,16 +124,15 @@ stops at the first that fails, leaving the tree as it was. It builds the last re
and compares what the two say they are (`continuum --version`):
* **wire versions**: where they share one, the release rolls out node by node; where
- they don't, every node upgrades together, which from 1.0.0 on only a major release
- may ask. `scripts/wire-check` checks it, by a swarm of the last release's nodes and
- this tree's (below);
+ they don't, every node upgrades together, which only a major release may ask (before
+ 1.0.0, the first part that isn't 0: `0.2.0` after `0.1.1`). `scripts/wire-check` checks
+ it, by a swarm of the last release's nodes and this tree's (below);
* **Automerge**: where it differs, nobody remakes until every node runs the release;
* **the federation's revisions**: a release knowing a later one than the last is
tagged `federation-<F>.<R>` too, so that later releases are checked against it.
What it finds heads the release's notes in the change log and its tag's message, with
-what the build speaks and knows, and the notes. Before 1.0.0 every upgrade may still be
-taken as a flag day, but the notes say when it isn't.
+what the build speaks and knows, and the notes.
`scripts/wire-check [TAG]` (the last release unless given) runs four nodes on this host,
over libp2p on loopback: two of the tag's build and two of this tree's, in turns. Where
diff --git a/docs/guides/federation/upgrades.md b/docs/guides/federation/upgrades.md
index 778f8c5..92cedc4 100644
--- a/docs/guides/federation/upgrades.md
+++ b/docs/guides/federation/upgrades.md
@@ -14,7 +14,8 @@ node at a time, a major one every node close together. Nodes write each other th
wire version both speak; where two releases share none, a major one, upgraded nodes and
the others don't talk, and the swarm is split until all are upgraded. A remake needs the
same Automerge on every node, and one with another rejoins instead of switching. Before
-1.0.0, a release's tag says whether it is a flag day.
+1.0.0, the first part of the version that isn't 0 counts as the major one (`0.2.0` after
+`0.1.1` is a flag day).
Nobody runs every node of a federated swarm: each party's operators upgrade its nodes. A
patch or minor release each party takes when it likes; for a major one, agree on when,
diff --git a/docs/operations.md b/docs/operations.md
index 4f3d6f2..027cb64 100644
--- a/docs/operations.md
+++ b/docs/operations.md
@@ -107,7 +107,9 @@ how to upgrade to it from the release before:
before left, or the API or `continuum-party` changes other than by adding, or it makes
a new federation.
-Before 1.0.0, any release may be a flag day; its tag's message says whether it is.
+Before 1.0.0, versions read as Cargo reads them: the first part that isn't 0 is the
+major one. So of `0.Y.Z`, a flag day raises `Y` (`0.2.0`), and a release one node at a
+time, fixing or adding, raises `Z` (`0.1.1`).
What decides which builds work together, a build says (`-V` the release alone): the wire
versions it speaks, the federation and the revisions of it it knows (with the
diff --git a/scripts/release b/scripts/release
index 62a896a..b88d2a5 100755
--- a/scripts/release
+++ b/scripts/release
@@ -13,7 +13,8 @@
# 3. This build's `continuum --version` and the last release's (built in
# CONTINUUM_RELEASE_TARGET, ~/.cache/continuum/release unless set) say how one upgrades:
# node by node where their wire versions meet, else every node together, which takes
-# a major release from 1.0.0 on; scripts/wire-check runs a swarm of both and checks
+# a major release (before 1.0.0, a raise of the first part that isn't 0, as Cargo reads
+# versions); scripts/wire-check runs a swarm of both and checks
# they do as said.
# 4. CHANGELOG.md's Unreleased notes become VERSION's, under a line saying so; the
# commit `release VERSION` holds it all, tagged vVERSION, its message saying how to
@@ -42,6 +43,11 @@ die() {
say "$*"
exit 1
}
+# The part of version $1 that only a flag day raises, with the rest as 0: the major one, or
+# before 1.0.0 the first that isn't 0, as Cargo reads versions (0.2.0 of 0.2.1).
+leading() {
+ echo "$1" | awk -F. '{ if ($1 > 0) print $1 ".0.0"; else if ($2 > 0) print "0." $2 ".0"; else print "0.0." $3 }'
+}
cd "$(git rev-parse --show-toplevel)"
features=${CONTINUUM_FEATURES:-federation,mycelium}
@@ -136,10 +142,8 @@ if [ -n "$last" ]; then
upgrade="From $last it rolls out node by node: install it on every node, in any order."
else
upgrade="From $last every node upgrades together: $why."
- major_last=$(echo "${last#v}" | cut -d. -f1)
- major_here=$(echo "$version" | cut -d. -f1)
- if [ "$major_last" -ge 1 ] && [ "$major_here" -le "$major_last" ]; then
- die "$why: from 1.0.0 on, that takes a major release, not $version"
+ if [ "$(leading "${last#v}")" = "$(leading "$version")" ]; then
+ die "$why: that takes a major release (before 1.0.0, a new first part that isn't 0), not $version"
fi
fi
say "scripts/wire-check $last"