Repository navigation
Open
Description
"Critical workflows don't break on a new release package" is mostly about the database that is already there: a learner's accounts, progress, courses and share links from version N have to survive the binary of version N+1, and the migration must run once and only once. Today that is checked by cargo test on a schema made by the current code, never on a database an older release actually wrote.
Do:
scripts/release-qa/fixtures/learn-<version>.db(+.key): a small database written by each released binary, made by runningpackage-smoke.sh(Release QA 1: package-smoke.sh checks one release tarball on the machine it runs on #39) on that release withKEEP_DB=<path>. It holds the owner, one invited learner, progress on two lessons, one hand-made course with a share link that was opened, one invitation link not yet used. A few hundred KiB each; add one per release from 0.1.1 on.scripts/release-qa/upgrade-check.sh <tarball>: for each fixture older than the tarball, copy it to a temp dir, start the candidate on it (package-smoke.sh --db), and check: the server starts;PRAGMA user_versionwent from the fixture's version to the candidate's; both accounts sign in; the learner's progress is unchanged (/api/progresscompared with what the fixture'sprogress.jsonrecorded when it was made); the shared course is still on the learner's list; the unused invitation link still registers; the second start changes nothing.- The other direction: the previous release's binary started on a database the candidate migrated must refuse cleanly with a message naming the newer schema, not corrupt it. Check the exit code and that the file's checksum is unchanged.
arch-matrix.sh(Release QA 3: a Compose rig (scripts/release-qa/compose.yaml) runs every architecture's tarball under QEMU, with qa, e2e and simulator profiles #41) andvm.sh update(Release QA 4: full VMs with systemd per architecture (Lima): install, update, roll back, uninstall #42) call it, so an upgrade is checked on every architecture, and the VM path checkslearn.db.before-<version>is a readable copy.docs/testing.mdsays how to add the fixture for a new release, as a step indocs/self-hosting.md"Releases".
Done when upgrade-check.sh dist/skrongle-0.1.2-aarch64.tar.gz passes against the 0.1.1 fixture and fails when a migration is removed from MIGRATIONS.
Metadata
Metadata
Assignees
Labels
No labels
Activity
alexbeeken commentedon Nov 12, 2026
Groomed 2026-11-12: what is left, and where
Done on
main:upgrade-check.sh, fixtures for 0.1.1 to 0.3.0, the rig andmatrix.shcalling it, the fix for the log line (#179), andscripts/release-qa/vm.sh(#180).Since #165 an update makes no copy of the database; every migration has a
.down.sqlandskrongle migratetakes the schema back (readsrc/db.rsmigrate_commandand docs/self-hosting.md "Updating").mainis now at schema v8 and the published 0.3.0 is at v5, so going back across a schema change can be tested for the first time. Nothing tests it today.Left
upgrade-check.sh: after a fixture is migrated up and checked, take it back down to the fixture's own schema the documented way (skrongle migrate …with the candidate binary), then start the old release binary on it and check it starts, the owner and the learner sign in and the progress is what the fixture recorded. Only for old releases whose binary can be downloaded for the architecture (the script already knows how to skip one that was never built). Releases that predate a way back for their schema step: read which.down.sqlfiles exist and saynotefor a step that cannot be undone, neverFAIL.vm.sh update: the "go back" step used the published release with the same schema as the candidate. With a v8 candidate, going back to 0.3.0 must follow docs/self-hosting.md "Updating" for a schema change (migrate down first, thenupdate.sh 0.3.0). Make the step do that and check sign-in after it. If the docs' steps do not work as written, fix the docs or the script and say which was wrong.old_binarytwo retries with a short wait before it reports a failure.docs/testing.md("Release QA", the upgrade check and "VMs") andscripts/release-qa/fixtures/README.mddescribe the new checks.Prove:
scripts/build-pi.sh aarch64 && scripts/package-release.sh <version> aarch64, thenscripts/release-qa/matrix.sh dist aarch64(upgrade columnok, with the new "back to vN" lines inresults/release-qa/<version>/aarch64.upgrade.log), andscripts/release-qa/vm.sh aarch64 up,install,update,down. Lima rule: only ever touch instances namedskrongle-qa-<arch>; nevercolima. Do not install software with brew; x86_64 VMs need QEMU, which is not installed, so leave them.Do not touch
compose.yaml,entrypoint.sh,e2e-run.shormatrix.sh's e2e part (another agent, #41) beyond what calling the new check needs.Part of #43andPart of #42.Upgrade check: a migration with no way back fails (#43)
vm.sh update: run the upgrade check in the guest; no database copy (#43)