ci: mint beta images from a beta branch, and derive their version from git #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-beta-loop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #13.
Where the prerelease version comes from, and why not
Cargo.tomlbin/ci-versionderives it from git: newest stable tag, bumped by theconventional-commit range since that tag, plus a UTC timestamp.
Cargo.tomlis not read on the beta path, on purpose. Making it carry thenext version between releases would create a second source for a number git
already knows, and two sources for one fact disagree silently, because nothing
compares them.
lenno_web'sbin/ci-version— the house reference, and theloop the platform's Renovate rule is written against — never reads
mix.exseither.
There are three version surfaces here and it is worth being explicit about
which is which, because they will not always agree and that is correct:
org.opencontainers.image.versionbin/ci-version, from git/healthversionCARGO_PKG_VERSION/healthrevisionGITHUB_SHArevisionis the field to read when the other two disagree, which is why/healthis left alone rather than taught to report the derived version.On a release tag
Cargo.tomlis read, and the guard that the tag agrees withit moves out of the workflow and into the script.
/healthreportsCARGO_PKG_VERSION, so a release tag naming a different number is a lie theimage cannot correct.
The base is bumped before the suffix is added
0.1.2-beta.<ts>sorts below the released0.1.2, so beta would read asolder than production while running newer code. That is the cost I took
knowingly when cutting
v0.1.2-beta.20260826052605by hand, and this removes it:the next beta off this loop is
0.1.3-beta.<ts>.The suffix is digits, and that is not cosmetic
The platform's
clusters/fondue/*-beta/**rule takes-(beta|alpha)\.\d+$. Asha suffix parses as valid semver, is accepted by everything in this repo, and
is then unmatchable by the rule that maintains the deployment pin — no bump PR
is ever opened and beta silently stops moving. That is exactly how
caldav-mcp-betaran a pre-security-fix image for four days while readingSynced and Healthy.
Buildcache
Beta imports and does not export. #8 made
mainthe only writer after twoconcurrent exporters failed a run whose image had already been pushed, and
betaandmainget pushed within seconds of each other often enough toreproduce it. A partial cache hit when beta has diverged is the cheaper side.
Verified by mutation
bin/ci-versionis shell, so nothing else in this repository checks it.tests/ci_version.rsbuilds throwaway git repositories and runs it. Fivemutations, each against the full nine-test file:
patch→nonebeta_bumps_the_patch_for_an_ordinary_commit,beta_ignores_prerelease_tags_when_choosing_its_basebeta_ignores_prerelease_tags_when_choosing_its_baseCargo.tomlagreement guard removeda_release_tag_must_agree_with_cargo_toml%Y-%m-%dbeta_suffix_is_digits_only, aloneThe third row was a finding rather than a pass.
beta_suffix_is_digits_onlydied alongside four tests that pin exact version strings, which meant it was
carrying no weight of its own: every one of those tests injects
CI_BETA_TIMESTAMP, so none of them can see a change to how the suffix isactually generated. It now runs the script's own clock, and the fifth mutation
— changing only the default format — kills it and nothing else.
Gates
cargo fmt --check,cargo clippy -D warnings,cargo test --all-features(103 + 9),
cargo audit,cargo deny check bans licenses sources— greenlocally on
rustc 1.98.0.After this merges
Create the
betabranch frommainand push it; the first build off the loopmints
v0.1.3-beta.<ts>, Renovate's existing rule opens the bump, and the checkis the pod's digest rather than the PR.
19e232195cdd2460008a