Skip to content

[architect] refactor: use %{release-version} in os-release-flatcar.bst — single source for FSDK version - #89

Merged
castrojo merged 2 commits into
mainfrom
arch/release-version-single-source
Sep 13, 2026
Merged

[architect] refactor: use %{release-version} in os-release-flatcar.bst — single source for FSDK version#89
castrojo merged 2 commits into
mainfrom
arch/release-version-single-source

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Refactor

File: elements/bluefin-server/os-release-flatcar.bst
Cluster: FSDK version identity (project.conf release-version axis)

What changes

os-release-flatcar.bst stops re-deriving the FSDK point release from elements/freedesktop-sdk.bst via a bash regex and instead uses the %{release-version} project variable directly.

What is removed

  • sources: block that staged elements/freedesktop-sdk.bst into the sandbox purely for re-parsing
  • 10-line bash extraction loop (while read + BASH_REMATCH regex)
  • FSDK_VERSION intermediate variable

What replaces it

%{release-version} — already declared in project.conf, already validated against the junction ref by check-release-version.py, already in scope for every element.

Why

Three independent mechanisms parsed the same version string (project.conf declaration, Justfile grep, element regex). The element's was the most fragile: a junction ref format change would silently produce an empty FSDK_VERSION and a build failure. Using the project variable removes the coupling to the junction file's ref format.

Closes #88


Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.

— hive: agent=architect backend=copilot model=kimi-k3

…t instead of re-parsing junction ref

The element re-derived the FSDK point release from the junction file with
a bash regex, even though project.conf already declares release-version
(validated by check-release-version.py) and it is in scope for all
elements. Replace the extraction loop and the local source that read the
junction file with direct use of %{release-version}.

Fixes #88

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
@kubestellar-hive kubestellar-hive Bot added hold Work is intentionally paused. architecture Structural or interface design work. agent/architect Filed or owned by the architect agent. hive/hosted-projectbluefin-knuckle-gjvq Routed by the hosted Project Bluefin Hive deployment. labels Sep 10, 2026

@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.

The change is right; it now needs a rebase — the conflict is real and new

The idea here is correct: reading %{release-version} instead of re-parsing the junction ref out of freedesktop-sdk.bst with a bash regex removes a parser that exists only to recover a value BuildStream already knows. 4 insertions, 21 deletions for that is a good trade.

But main moved under you since this was opened, and the conflict is genuine — not a stale GitHub reading:

$ git checkout -B t89 origin/main
$ git -c commit.gpgsign=false merge --no-gpg-sign refs/remotes/pr/89
CONFLICT (content): Merge conflict in elements/bluefin-server/os-release-flatcar.bst

$ git diff --name-only --diff-filter=U
elements/bluefin-server/os-release-flatcar.bst

A non-empty --diff-filter=U is the reliable tell, so this isn't the signing-hook or shallow-clone false positive that these usually turn out to be.

Cause: #92 (f7c3add, "feat(kernel): add Flatcar LTS kernel & ZFS sysext…") edited the same file — it added include/arch.yml, switched build-depends to base/base-stack.bst, and added the strip-binaries: "" variable. Your diff was written against the version before that. main is now at 3772407.

The good news is the conflict is contextual, not semantic: main still carries the full re-parsing block your PR deletes —

# Extract the FSDK point release (e.g. 25.08.13) from the pinned junction ref.
while read -r line; do
  if [[ "${line}" =~ ref:[[:space:]]+freedesktop-sdk-([0-9]+\.[0-9]+\.[0-9]+)- ]]; then

— so nothing has taken your change's place and the rebase should be mechanical. Rebase onto 3772407, keep #92's build-depends/arch.yml/strip-binaries lines, and re-apply your %{release-version} substitution over the parsing block.

Worth doing promptly: that regex hardcodes a NN.NN.NN shape, and this repo just had a silent Renovate failure from a version filter anchored to a series the junction no longer tracks (#84). Deleting the second hand-rolled version parser in the same tree is the right direction.

Re-review once it's rebased — the CI evidence on the previous head was good (build succeeded with a full DDI build).


Generated by Claude Code

castrojo
castrojo previously approved these changes Sep 13, 2026

@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.

lgtm

@castrojo
castrojo merged commit e0d4d5f into main Sep 13, 2026
2 checks passed
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. architecture Structural or interface design work. 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.

[architect] os-release-flatcar.bst re-derives FSDK version from junction ref instead of using %{release-version}

2 participants