Skip to content

[architect] refactor(ci): enforce release-version invariant — project.conf release-version vs Justfile fsdk_version (adds .github/scripts/check-release-version.py, Justfile validate recipe) - #34

Merged
castrojo merged 1 commit into
mainfrom
architect/enforce-release-version-invariant
Sep 5, 2026

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Claimed cluster

Exact ground this PR occupies, for the next occupied-ground comparison:

No elements/, no files/, no .github/workflows/, no docs. Disjoint from #22/#25/#26/#27 (installer + PXE elements), #29 (sshd drop-in), and #18 (build.yml token scope).

Refactor

The asset version axis has two independently-computed sources of truth that were never compared:

Source Feeds
Declared project.confrelease-version every asset filename (bluefin-server-ddi-<v>.raw.zst, bluefin-server-installer-<v>.raw.zst, bluefin-server-<v>.efi, k3s-<v>.raw.zst)
Derived Justfilefsdk_version, grepped from the pinned elements/freedesktop-sdk.bst junction ref the release tag, via just version in build.yml

Renovate (and build.yml's own "Track and Resolve BuildStream Refs" step) moves the junction ref automatically. Nothing moves release-version. They had already drifted two point releases: project.conf said 25.08.13, the junction is pinned to freedesktop-sdk-25.08.15.

Failure mode this closes

While drifted, a main build publishes tag installer-v25.08.15 containing assets still named ...-25.08.13... — the upload steps copy by glob, so nothing objects. files/os/sysupdate.d/50-root.transfer, 60-uki.transfer, and 70-k3s.transfer all extract the version from the filename via @v against releases/latest/download/. systemd-sysupdate reads 25.08.13, matches what is already installed, and reports nothing to do. OS, UKI, and k3s sysext updates stop fleet-wide, with green CI and a fresh Release as evidence that everything shipped. There is no error surface anywhere in the pipeline.

Changes

  1. .github/scripts/check-release-version.py — parses release-version from project.conf and the freedesktop-sdk-X.Y.Z point release from the pinned junction ref, and exits non-zero with a remediation message when they disagree.
  2. Justfile validate: — runs the checker before the bst show graph checks. build.yml already invokes just validate in its "Validate Element Graph" step, so this is enforced in CI on every PR and push with no workflow change.
  3. .pre-commit-config.yaml — same checker, path-filtered to project.conf, elements/freedesktop-sdk.bst, and the script, so a Renovate FSDK bump without a matching release-version bump fails locally too.
  4. project.conf — corrects release-version to 25.08.15 so the invariant the repo already declares actually holds. This is the one behavior-affecting line in the PR and deserves explicit human sign-off: it renames the next release's assets to match the tag, which is the intended contract but is the first release since the drift began.

Note for reviewers

The natural home for this gate is a dedicated .github/workflows/version-consistency.yml. The hive App token lacks the workflows permission, so the push was rejected; the check is wired into just validate instead, which reaches the same CI surface via the existing "Validate Element Graph" step. A maintainer may prefer to lift it into its own workflow later.

Verification

$ python3 .github/scripts/check-release-version.py     # before the project.conf fix
ERROR: release-version drift.
  project.conf release-version          : 25.08.13
  elements/freedesktop-sdk.bst pinned ref: 25.08.15
  ...
$ echo $?
1

$ python3 .github/scripts/check-release-version.py     # after
OK: release-version 25.08.15 matches the pinned FSDK point release.

Also verified fail-closed against a synthetic 25.08.99 value, and both edited YAML files parse.

The invariant enforced here is the repo's own: docs/skills/avoid-over-engineering.md lists "The same version string in more than one .bst file" as a red flag and asserts "release-version in project.conf is the single source of truth" — the Justfile was an unlisted second source.

Refs #31


Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required. Do not merge without maintainer sign-off; the project.conf version correction affects the next release's asset names.

— hive: agent=architect backend=copilot model=claude-opus-5

project.conf declares release-version as the single source of truth for
asset filenames, while the Justfile independently derives fsdk_version
from the pinned elements/freedesktop-sdk.bst junction ref and build.yml
uses that derived value for the release tag. Nothing compared the two,
and they have drifted: project.conf said 25.08.13 while the junction is
pinned to freedesktop-sdk-25.08.15.

While drifted, a release publishes a new tag whose assets still carry
the old version string. files/os/sysupdate.d/*.transfer read that
version from the filename via @v, see no change, and hosts stop
updating with no error anywhere in the pipeline.

Add .github/scripts/check-release-version.py, which parses both values
and fails closed on mismatch. Wire it into the existing `just validate`
entry point (already run by build.yml's "Validate Element Graph" step)
and into pre-commit. Correct project.conf to 25.08.15 so the declared
invariant holds.

Refs #31

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com>

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed on live main that project.conf said 25.08.13 while elements/freedesktop-sdk.bst was pinned to 25.08.15 — exactly the drift this PR describes and fixes. The new checker script and pre-commit/Justfile wiring are sound. CI green. Note: #21 in this same review pass would re-bump the FSDK pin to 25.08.16 without updating project.conf, immediately re-drifting past this fix — flagged there.


Generated by Claude Code

@castrojo castrojo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by @castrojo for Hive auto-merge on green CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/architect Filed or owned by the architect agent. hive/hosted-projectbluefin-knuckle-gjvq Routed by the hosted Project Bluefin Hive deployment. hold Work is intentionally paused.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants