steid

@jamesgill /

steid/plans/releases.md
Markdown10.9 KBRendered·Source·Blame·History·Raw
1# Releases
2
3What each release shipped, so **"the previous release's schema"** is a fact rather than
4a guess. Every migration must be one the previous release's binary can run against —
5the rule, and why, is in [`architecture.md`]architecture.md#migrations.
6
7Add a row when a release is cut, in the same commit that bumps `Cargo.toml`, together
8with its `RELEASES` row, which `cargo test` now enforces
9([below]#where-each-releases-set-actually-lives).
10
11| Version | Date | Commit | Migrations it shipped |
12|---|---|---|---|
13| 0.1.0 | 2026-07-31 | `1111df1` | *(none — no `migrations/` directory yet)* |
14| 0.2.0 | 2026-09-04 | `7fb0b5e` | `…093030_create_orgs` · `…093031_create_users` · `…093032_create_memberships` · `…093033_create_sessions` · `…093034_add_org_bio` · `…093035_create_repositories` · `20260828120000_create_tokens` · `20260829090000_add_repository_recency` |
15| 0.3.0 | 2026-09-06 | `768d679` | *(none new — same set as 0.2.0)* |
16| 0.4.0 | 2026-09-06 | `219c396` | `20260906120100_add_repository_import` · `…120200_create_issues` · `…120201_create_issue_comments` · `…120300_create_push_events` · `…120301_create_webhooks` · `…120302_create_webhook_deliveries` · `…120400_add_repository_archived` · `…140100_add_token_lifecycle` · `…140200_create_labels` · `…140201_create_issue_labels` · `…180100_create_pull_requests` · `…180101_create_pull_request_comments` · `…190000_create_pull_request_labels` |
17| 0.5.0 | 2026-09-10 | `b942dad` | `20260908090500_create_password_resets` *(see [which bytes]#which-bytes-each-release-shipped)* |
18| 0.6.0 | 2026-09-20 | `c3543e3` | *(none new — same set as 0.5.0)* |
19| 0.7.0 | 2026-09-26 | `3f411b5` | *(none new — same set as 0.5.0)* |
20| 0.8.0 | 2026-09-27 | `bac1a59` | `20260927100000_create_instance_settings` |
21| 0.8.1 | 2026-10-04 | `df6e734` (cut); built from `7a8e8a7`, test-only after it; tag `v0.8.1` | *(none new — same set as 0.8.0)* |
22| 0.8.2 | 2026-10-21 | *cut, not published — the commit that sets `Cargo.toml` to 0.8.2* | *(none new — same set as 0.8.0)* |
23
24The `…` stands for the leading `202609061` / `20260804` of the timestamp; the full file
25names are in `migrations/`.
26
270.6.0 is the first release published from **`https://releases.steid.dev`**
28([decision 0009]decisions/0009-releases-from-releases-steid-dev.md) and the first
29version cloud-init can install headlessly. `Cargo.toml` and `install.sh` have said
300.6.0 since the boot-time owner landed (2026-09-13); the release was not cut until the
31host existed, so no artefact has ever carried 0.6.0 and the number is published as-is
32rather than bumped. `jpgill.dev` still serves up to 0.5.0 at the old path and mirrors
330.6.0 onwards.
34
350.7.0 is the control plane's three asks — `steid restore --replace`,
36`install.sh --operator-token`, and `disk` on `/api/instance` — and is the upgrade target
37the control plane's own upgrade step needs in order to have ever run against a box.
38It was cut on 2026-09-26 and **published on 2026-09-27**.
39
400.8.0 is organisations and home, the first slice of milestone 7. It was cut on
412026-09-27 and **published on 2026-09-28**, both architectures; `install.sh`'s default
42moved to it in `b0c6058`.
43
44**0.8.0 adds one migration** — `20260927100000_create_instance_settings.sql`, the
45single-row table holding `home_org_id`. It is an **expand** step and nothing else: a
46`create table` plus the one `insert` that seeds the row, no column added to an existing
47table, nothing dropped or renamed. The previous release's binary neither reads nor
48writes it, and reads nothing it changes, so the old process can keep serving while the
49new one migrates — which is the rule `architecture.md` states. Everything before it
50shipped with 0.5.0; 0.6.0 and 0.7.0 add none.
51
52> **Correction, 2026-10-01: that does not make a rollback safe.** An old process that is
53> *already running* keeps serving, but a 0.7.0 binary *started* against this database
54> refuses to boot: sqlx's default `ignore_missing: false` exits with `VersionMissing` on
55> an applied migration it does not know. So 0.8.0 → 0.7.0 can never roll back, and the
56> first rollback that can work is from the release after **0.8.1**, which is to carry
57> `set_ignore_missing(true)`. See
58> [launch 1.2]../../plans/launch.md#phase-1-before-anything-else.
59
600.8.1 is that fix. `migrate()` now ignores an applied migration it does not know and
61still refuses an edited one it does (`set_ignore_missing(true)`), so a box upgraded
62across a migration can be rolled back onto 0.8.1 or anything later. It ships no
63migration. **Cut on 2026-10-02 and not published**: publishing is the author's
64(`./release.sh --all`, then `./deploy.sh --publish-s3-only`). `install.sh`'s default
65moved to 0.8.1 in the cut, as it did for 0.7.0, so a publish uploads the script that
66matches it. Re-publishing the root `install.sh` on its own before the 0.8.1 artefacts are
67up would send every fresh install to a 404.
68
690.8.2 is launch phase 2's Steid fixes, the ones a Steid Cloud tenant takes: 2.14 (the
70whole boot seed is checked before the first write), decision 4 (`install.sh` writes every
71`steid.env` value so systemd and sh read it alike), 2.18 (login CSRF, and DNS rebinding
72on webhooks and imports, with imports refused on git older than 2.37) and 2.15 (a backup
73of a live instance is consistent, with the 2026-10-21 follow-ups: a push's `.keep` is
74never archived, and each file is copied exactly as large as it was when opened). It also
75carries the rustls, rustls-webpki and webpki-roots patch releases for October's
76advisories. **It ships no migration**, so launch 1.2's upgrade-and-rollback proof waits
77for the first release that does. **Cut on 2026-10-21 and not published**: publishing is
78the author's (`./release.sh --all`, then `./deploy.sh --publish-s3-only`). `install.sh`'s
79default moved to 0.8.2 in the cut, so a publish uploads the script that matches it, and
80re-publishing the root `install.sh` on its own before the 0.8.2 artefacts are up would
81send every fresh install to a 404.
82
83## Unreleased
84
85Nothing since 0.8.2.
86
87## Where each release's set actually lives
88
89Every release since 0.5.0 is a row of `RELEASES` in
90`src/infrastructure/database_compat_tests.rs`: its version, its **cumulative** file list
91(`RELEASED_0_5_0`, `RELEASED_0_8_0`) and a SHA-256 over those files' bytes. That is the
92authoritative copy. Three tests read it:
93
94- `a_shipped_migration_is_never_edited` re-hashes each set, so editing any migration that
95 has shipped — a comment counts, because sqlx checksums the whole file — fails the build
96 and names the first release that shipped it. 0.5.0's set holds everything earlier, so
97 every migration that has ever shipped is covered.
98- `every_released_set_is_a_prefix_of_the_migrations_on_disk` catches a mistyped name and
99 a migration back-dated in front of a released one.
100- `the_version_in_cargo_toml_has_a_releases_row` fails while `Cargo.toml` names a version
101 with no row (since 2026-10-02). The other two check only the rows that exist, which is
102 how 0.8.0 shipped unpinned until 0.8.1's step added its row after the fact. So the
103 version moves only in the cut commit, and no longer runs ahead of the cut as it did for
104 0.6.0.
105
106The table above is the human record and must agree with it. **When a release is cut**,
107in the cut commit: add its row here, and add a `RELEASES` row with the digest of its set
108at that commit. A release that shipped no migration reuses the previous list — 0.6.0 and
1090.7.0 point at `RELEASED_0_5_0`, 0.8.1 and 0.8.2 at `RELEASED_0_8_0` — and one that shipped any gets a new
110`RELEASED_<version>` with the full cumulative list. A digest is never changed to make the
111test pass. The `RELEASES` row is enforced; the row in this table is not.
112
113The replay test (`the_current_reads_work_against_the_last_released_schema`) still
114replays 0.5.0's set, not 0.8.0's; see `current.md`.
115
116## Which bytes each release shipped
117
118There are no tags, so each release's migration bytes were established on 2026-10-02 from
119git and, where the artefact is still in the author's `dist/`, from the binary itself:
120`sqlx::migrate!` embeds each migration's SQL and its SHA-384, so a binary says exactly
121which bytes it will check a database against.
122
123- **Git.** `git log --diff-filter=M --follow` on every migration finds two edits ever,
124 both to `20260906120200_create_issues.sql` and both to one comment line: `640bbc8`
125 (2026-09-08) renamed `SqliteIssueRepo::next_number` to `SqliteRepoRepo::next_number`,
126 and `a6819c2` (2026-09-10 22:58) put the 0.4.0 bytes back. No migration was ever
127 deleted or renamed. Comparing `git show <release>:migrations/<file>` with HEAD, every
128 file at `219c396` (0.4.0), `a6819c2`, `c3543e3` (0.6.0), `3f411b5` (0.7.0) and
129 `bac1a59` (0.8.0) is byte-identical to HEAD.
130- **The binaries.** The local 0.4.0, 0.5.0, 0.7.0 and 0.8.0 tarballs (each matching its
131 `.sha256`) embed the SHA-384 of HEAD's bytes for every migration they carry, and no
132 migration SQL beyond those files.
133
134| Release | Set | SHA-256 pinned | Evidence | Settled? |
135|---|---|---|---|---|
136| 0.5.0 | 22 files | `e94827d7…` | The cut commit `b942dad` still held `640bbc8`'s edited comment (that tree hashes to `01521714…`). Both local 0.5.0 artefacts — aarch64 built 22:59 on 2026-09-10, a minute after `a6819c2`, and x86_64 built overnight — embed the **restored** bytes, not the edited ones. | **Yes, published too** (2026-10-02). The `.sha256` files `jpgill.dev` serves read `20844e9e…` (aarch64) and `ed6b4a60…` (x86_64), the local artefacts' own. So a box first installed at 0.5.0 holds the restored bytes and upgrades without `VersionMismatch`. |
137| 0.6.0 | 0.5.0's | `e94827d7…` | Git only: `c3543e3`'s tree, and no commit between `a6819c2` and `a140f84` touches `migrations/`. No 0.6.0 artefact is on the laptop. | From the committed tree. A build from an uncommitted tree cannot be ruled out, though the 0.5.0 and 0.7.0 binaries on either side embed the same bytes. |
138| 0.7.0 | 0.5.0's | `e94827d7…` | Every commit from the cut `3f411b5` to `1e37af7`, the last before 0.8.0's migration (`a140f84`), holds the same 22 files at the same bytes, and `20e5b4e` touches no migration. Both local artefacts (16:25 and 16:27 BST, 2026-09-27) embed exactly those 22 and not `instance_settings`. They also carry the copy `20e5b4e` replaced ("Currently building", no new meta description), and the console's D7 record puts the publish at 15:22–15:27 UTC, before `20e5b4e` was committed at 19:12 UTC. So `20e5b4e` is not in these binaries. | **Yes, published too** (2026-10-02): `releases.steid.dev`'s `.sha256` files read `e7fec909…` (aarch64) and `8dcd8c00…` (x86_64), the local artefacts' own. The x86_64 tarball was uploaded twice, five minutes apart (launch 5.2). What is served now is the local build, and the earlier object version was not checked. |
139| 0.8.0 | 23 files | `6761cb04…` | `bac1a59`'s tree; both local artefacts (2026-09-28) embed the same 23. | Yes, for the local artefacts. |
140
141Comparing a published `.sha256` with the local one is a read of the release host, which
142was not done here.