* chore(migration-test): extend the release catalog through v1.3.1 The catalog stopped at v1.1.2 (the v1.2 upgrade census). The migration corpus already upgrades from v1.2.2, and the Bazel targets that replace migration-test.yml and cross-version-smoke.yml take their pinned release binaries from the catalog (@bd_releases), so it has to cover the releases since. Regenerated with `catalog generate` after raising maximumVersion to v1.3.1: five new stable versions (v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.3.1; three with a linux/amd64 asset) and five new proxy prereleases; no existing entry, drift record or repository-only exclusion changed. The count constants and the identity digest are updated to match, and the README now says how to add a release. Refs: ga-96smfk.19 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ci(bazel): run the historical-upgrade corpus under Bazel; retire migration-test.yml migration-test.yml ran scripts/migration-test/run.sh --version <release> for 14 reviewed releases in 3 shards on GitHub runners: it downloaded each release archive, built v0.9.1 from source with Go 1.25 through the module proxy, installed libicu74 and the dolt 2.1.8 runtime, all over the network. //tests/migration now has one target per corpus release (historical_upgrade_<release>_test) plus legacy_bridge_test, all hermetic: - Published releases come from @bd_releases (the release catalog's sha256-verified assets) through a per-target directory (HISTORICAL_RELEASE_DIR); lib/binary.sh uses it instead of downloading and still checks each binary's self-reported version. - v0.9.1 is //tests/migration:bd_source_tag, the same `go mod download` + `go build -trimpath` with CGO and Go 1.25.0, run offline as a build action: the module files come from tests/migration/source_tag_modules.json through a file:// GOPROXY tree (tools/bazel/go_module_proxy.bzl), the release's own zip is the catalog's source_zip, and go checks every dependency against the release's go.sum (SOURCE_TAG_SQLITE_BIN). - The external Dolt runtime is @dolt_test_runtime_linux_amd64 (dolt.bzl's dolt_release gains a version attribute; 2.1.8 is pinned to versions.sh's digest), passed as DOLT_BIN to the server-Dolt and wisp-plane releases. - The workers already provide jq, python3, sqlite3 and libicu74. The targets are untagged, so bazel-test runs them remotely on every PR, merge group and push; result caching replaces the path filter. Every release also passed inside a loopback-only network namespace. scripts/migration_corpus_bazel_test.go keeps the BUILD lists equal to versions.sh's corpus, the catalog digests equal to STRICT_RELEASE_SHA256, the source-tag lock equal to the catalog's source_zip, and the Dolt runtime pin equal to versions.sh's. migration-test.yml and the policy tests that pinned its shards, caches, apt step and runner are removed. Refs: ga-96smfk.19 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ci(bazel): run the historical-upgrade targets in the PR-core lane only The integration lane runs every untagged target too, and its check_testcases.py requires Go testcases, which a shell test's test.xml does not list. A new pr-core-only tag keeps //tests/migration out of --config=integration (bazelIntegrationExcludedTags adds it), so the corpus runs once, in bazel-test, against the release-shaped bd_for_tests (no integration tag). build_source_tag.sh carries the build-tags opt-out: it builds a historical release with that release's own go.mod, which predates gms_pure_go. Refs: ga-96smfk.19 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
162 lines
8.2 KiB
Bash
Executable file
162 lines
8.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Storage era definitions and upgrade path matrix.
|
|
|
|
if ((BASH_VERSINFO[0] < 4)); then
|
|
printf 'versions.sh: this migration-test harness needs bash >= 4 for associative arrays (found %s).\n' "$BASH_VERSION" >&2
|
|
printf 'versions.sh: macOS ships bash 3.2 by default; install a newer bash (e.g. "brew install bash") and invoke this script through it.\n' >&2
|
|
return 1 2>/dev/null || exit 1
|
|
fi
|
|
|
|
# The explicit export/import bridges for reviewed classic SQLite layouts. They
|
|
# are not in-place schema migrations: each SQLite source remains a rollback copy.
|
|
readonly CLASSIC_SQLITE_VERSION="v0.49.6"
|
|
readonly CONFIGURED_SQLITE_VERSION="v0.50.3"
|
|
readonly PRE_CANONICAL_SQLITE_VERSION="v0.17.0"
|
|
# This source-tag-qualified lane deliberately has no release asset.
|
|
readonly SOURCE_TAG_SQLITE_VERSION="v0.9.1"
|
|
readonly SOURCE_TAG_SQLITE_MODULE="github.com/steveyegge/beads"
|
|
readonly SOURCE_TAG_SQLITE_MODULE_SUM="h1:2KRCRCEtHvfMzmhYrpZzWl2rk2Y1Wq9p2awTdQIK9yY="
|
|
readonly SOURCE_TAG_SQLITE_GOMOD_SUM="h1:CNV215xONrxBs18j3BXx/xvl1qyCO2SeQRqiTN213Vg="
|
|
readonly SOURCE_TAG_SQLITE_COMMIT="e3c8554fa2c3e4b9caf7e296e9c8abbe24211a72"
|
|
readonly SOURCE_TAG_SQLITE_REF="refs/tags/v0.9.1"
|
|
readonly SOURCE_TAG_SQLITE_GO_TOOLCHAIN="go1.25.0"
|
|
|
|
# Representative, public release binaries for the historical-Dolt E2E test.
|
|
# These are deliberately a small, reviewed compatibility corpus rather than
|
|
# a discovery mechanism or an exhaustive tag matrix.
|
|
declare -ar HISTORICAL_DOLT_VERSIONS=(
|
|
"v0.55.4"
|
|
"v0.56.1"
|
|
"v0.57.0"
|
|
"v0.62.0"
|
|
)
|
|
|
|
# Reviewed direct embedded-Dolt sources. Unlike the server corpus, their own
|
|
# embedded data is opened and migrated in place by the candidate.
|
|
declare -ar EMBEDDED_DOLT_VERSIONS=(
|
|
"v0.63.3"
|
|
"v1.0.0"
|
|
"v1.0.1"
|
|
"v1.1.0"
|
|
"v1.1.2"
|
|
"v1.2.2"
|
|
)
|
|
|
|
# Embedded-Dolt sources whose wisp plane is close enough to the 1.3.0 input
|
|
# regimes to be worth seeding: v1.0.1 is the legacy single-target
|
|
# wisp_dependencies shape with no ignored-migration cursor, while v1.1.0,
|
|
# v1.1.2 and v1.2.2 are the post-split shape with the cursor parked at
|
|
# ignored-0011. Both regimes are replayed over populated rows by the candidate's
|
|
# main 0054-0066 + ignored 0012-0025 chain. v1.2.2 is the v1.1.2 tree re-tagged
|
|
# by the recovery release, so it adds no new regime — it is here because it is
|
|
# the tag people in the field actually upgrade from. Also selects the
|
|
# external Dolt oracle (DOLT_BIN) in tests/migration's targets.
|
|
declare -ar WISP_PLANE_VERSIONS=(
|
|
"v1.0.1"
|
|
"v1.1.0"
|
|
"v1.1.2"
|
|
"v1.2.2"
|
|
)
|
|
|
|
# The test server is an external compatibility fixture, not the runner's
|
|
# ambient Dolt installation. CI downloads this exact linux/amd64 archive.
|
|
readonly DOLT_TEST_RUNTIME_VERSION="v2.1.8"
|
|
readonly DOLT_TEST_RUNTIME_SHA256="f66318f08ed66e409fc39363ae0fff8ce6fbf6dba9f5bac632b91527b9632a74"
|
|
|
|
# Classic SQLite files that must be retained byte-for-byte for rollback before
|
|
# the manual bridge removes the active copies.
|
|
declare -ar CLASSIC_SQLITE_ROLLBACK_FILES=(
|
|
"beads.db"
|
|
"beads.db-wal"
|
|
"beads.db-shm"
|
|
"metadata.json"
|
|
"config.json"
|
|
"config.yaml"
|
|
"issues.jsonl"
|
|
)
|
|
|
|
# Legacy Dolt-server metadata that must be retained with the dolt/ directory
|
|
# before the manual bridge clears the active source.
|
|
declare -ar LEGACY_DOLT_ROLLBACK_FILES=(
|
|
"metadata.json"
|
|
"config.json"
|
|
"config.yaml"
|
|
"issues.jsonl"
|
|
)
|
|
|
|
# Release artifacts and expected qualification outcomes for strict CI lanes.
|
|
# Strict entries are deliberately explicit: adding a historical lane requires
|
|
# reviewing the official asset, checksum, source capabilities, and supported
|
|
# migration outcome instead of silently discovering them at runtime.
|
|
declare -Ar STRICT_RELEASE_ASSETS=(
|
|
["v0.17.0|linux|amd64"]="beads_0.17.0_linux_amd64.tar.gz"
|
|
["v0.49.6|linux|amd64"]="beads_0.49.6_linux_amd64.tar.gz"
|
|
["v0.50.3|linux|amd64"]="beads_0.50.3_linux_amd64.tar.gz"
|
|
["v0.55.4|linux|amd64"]="beads_0.55.4_linux_amd64.tar.gz"
|
|
["v0.56.1|linux|amd64"]="beads_0.56.1_linux_amd64.tar.gz"
|
|
["v0.57.0|linux|amd64"]="beads_0.57.0_linux_amd64.tar.gz"
|
|
["v0.62.0|linux|amd64"]="beads_0.62.0_linux_amd64.tar.gz"
|
|
["v0.63.3|linux|amd64"]="beads_0.63.3_linux_amd64.tar.gz"
|
|
["v1.0.0|linux|amd64"]="beads_1.0.0_linux_amd64.tar.gz"
|
|
["v1.0.1|linux|amd64"]="beads_1.0.1_linux_amd64.tar.gz"
|
|
["v1.1.0|linux|amd64"]="beads_1.1.0_linux_amd64.tar.gz"
|
|
["v1.1.2|linux|amd64"]="beads_1.1.2_linux_amd64.tar.gz"
|
|
["v1.2.2|linux|amd64"]="beads_1.2.2_linux_amd64.tar.gz"
|
|
# darwin/arm64: reviewed 2026-08-29 (ga-9sghx) so the corpus can run
|
|
# natively on Apple Silicon. Every asset below was confirmed to exist via
|
|
# `gh release view <version> -R gastownhall/beads`, and every checksum was
|
|
# taken from that release's own goreleaser-published checksums.txt (the
|
|
# same provenance as the linux|amd64 entries above).
|
|
["v0.17.0|darwin|arm64"]="beads_0.17.0_darwin_arm64.tar.gz"
|
|
["v0.49.6|darwin|arm64"]="beads_0.49.6_darwin_arm64.tar.gz"
|
|
["v0.50.3|darwin|arm64"]="beads_0.50.3_darwin_arm64.tar.gz"
|
|
["v0.55.4|darwin|arm64"]="beads_0.55.4_darwin_arm64.tar.gz"
|
|
["v0.56.1|darwin|arm64"]="beads_0.56.1_darwin_arm64.tar.gz"
|
|
["v0.57.0|darwin|arm64"]="beads_0.57.0_darwin_arm64.tar.gz"
|
|
["v0.62.0|darwin|arm64"]="beads_0.62.0_darwin_arm64.tar.gz"
|
|
["v0.63.3|darwin|arm64"]="beads_0.63.3_darwin_arm64.tar.gz"
|
|
["v1.0.0|darwin|arm64"]="beads_1.0.0_darwin_arm64.tar.gz"
|
|
["v1.0.1|darwin|arm64"]="beads_1.0.1_darwin_arm64.tar.gz"
|
|
["v1.1.0|darwin|arm64"]="beads_1.1.0_darwin_arm64.tar.gz"
|
|
["v1.1.2|darwin|arm64"]="beads_1.1.2_darwin_arm64.tar.gz"
|
|
)
|
|
declare -Ar STRICT_RELEASE_SHA256=(
|
|
["v0.17.0|linux|amd64"]="d4d08617a324c85b45c9628bc519d659a9ff9c7c37da67aa48727e0af7f19a75"
|
|
["v0.49.6|linux|amd64"]="8546dc9a47e11dc31ac2bc9a0224a9c690975e91850932cbb62623053fbb7db8"
|
|
["v0.50.3|linux|amd64"]="e94b09e0b6a9324bbc0e81ea36bccaaa42172a926bfedfb389e9a26dedb63184"
|
|
["v0.55.4|linux|amd64"]="e0fa25456dd82890230eef17653448a0bf995104c78864be91c5ed84426a5f49"
|
|
["v0.56.1|linux|amd64"]="4f9f6cc44465a11613ff529009901eaaf841c6b1f91c15e002b0ecda2015a15c"
|
|
["v0.57.0|linux|amd64"]="f8629d5627bed7d25f06f92334addc171d679f9aed9d08c5d42a9684205dc04b"
|
|
["v0.62.0|linux|amd64"]="4cca7265b22e5c3ca8d62ab0b9752bec31f68b7f5fa636282a4c7e5454c35535"
|
|
["v0.63.3|linux|amd64"]="5f4efd2e010209b3f381dbcd783b2a3a652f50ea72f40ef04c8ba434d408bf9e"
|
|
["v1.0.0|linux|amd64"]="7057db1e92428fcf5c08d5dc6b07ead57e588b262cba78b9a26893d55bd29fdb"
|
|
["v1.0.1|linux|amd64"]="1d2364d5d7083a4634a9e734ca87822fb79c2b6625988f9f791e3376313b1b77"
|
|
["v1.1.0|linux|amd64"]="b0f3dd607c3fb989ee08d0a6854fba80d0402971eb108f9af6170bc14d491a34"
|
|
["v1.1.2|linux|amd64"]="a72d71ed374955dc9f83a0f90b54bd7b6a0016709dd1676ae2e368651ed401c2"
|
|
["v1.2.2|linux|amd64"]="8140098a51d3b81d5548d1c5e6db1a2d9930e5d141efe2a4bff7d079c4d321e8"
|
|
# darwin/arm64 — see provenance note on STRICT_RELEASE_ASSETS above.
|
|
["v0.17.0|darwin|arm64"]="41479fabf76ff76912096bf2e9c1988a9b0d0dd673c7e693342f711770f6d763"
|
|
["v0.49.6|darwin|arm64"]="007dacd919eeac48a3a0ecb6aad305ef04e903de02c43a8163d2fd6a63d9ab7d"
|
|
["v0.50.3|darwin|arm64"]="26c15b93d82be45c3fa9b6318ffee9a6ae89841ba7ec4ad5c8db6fe6e42d3d3a"
|
|
["v0.55.4|darwin|arm64"]="18afdf4f562323a71687b2f7ed95c27750aee8d361b176a4a79caf176f00c0b9"
|
|
["v0.56.1|darwin|arm64"]="aa8a4309de2ab8c27a90c03b652cedc53a45880a5c94cd65881006da3c2f0812"
|
|
["v0.57.0|darwin|arm64"]="fbbcbdff64da29f72fbe939d4cc285305d73e830889919d182c4c6826a338ced"
|
|
["v0.62.0|darwin|arm64"]="4f441c616240c7063a2257ac26138d06eae060a961f029c81855928eae6ae1c0"
|
|
["v0.63.3|darwin|arm64"]="2b3ab41dd74a3c2a79bc47dd0b36c0a63a2c5d76f1e3081db5288d294124f245"
|
|
["v1.0.0|darwin|arm64"]="b8763b428e6b68550eb2b2505483797794b49ae497a2e265ed3c60f0f0a0bcd2"
|
|
["v1.0.1|darwin|arm64"]="f9d5e878fbee8a7051289743e36e52b0b17f1058587170afab7f2d2a30f43199"
|
|
["v1.1.0|darwin|arm64"]="c42e24d83b258f7ba9f52a6d2d5f6b055869dfe7807165055988b12e7ea8c564"
|
|
["v1.1.2|darwin|arm64"]="9b0137a83a2afd343e2abd2a506be72ea032721000f76669c2cf81729e78501d"
|
|
)
|
|
|
|
strict_release_asset() {
|
|
local value="${STRICT_RELEASE_ASSETS["$1|$2|$3"]:-}"
|
|
[ -n "$value" ] || return 1
|
|
printf '%s\n' "$value"
|
|
}
|
|
|
|
strict_release_sha256() {
|
|
local value="${STRICT_RELEASE_SHA256["$1|$2|$3"]:-}"
|
|
[ -n "$value" ] || return 1
|
|
printf '%s\n' "$value"
|
|
}
|