[architect] refactor: use %{release-version} in os-release-flatcar.bst — single source for FSDK version - #89
Conversation
…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>
hanthor
left a comment
There was a problem hiding this comment.
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
Refactor
File:
elements/bluefin-server/os-release-flatcar.bstCluster: FSDK version identity (project.conf
release-versionaxis)What changes
os-release-flatcar.bststops re-deriving the FSDK point release fromelements/freedesktop-sdk.bstvia a bash regex and instead uses the%{release-version}project variable directly.What is removed
sources:block that stagedelements/freedesktop-sdk.bstinto the sandbox purely for re-parsingwhile read+BASH_REMATCHregex)FSDK_VERSIONintermediate variableWhat replaces it
%{release-version}— already declared inproject.conf, already validated against the junction ref bycheck-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_VERSIONand 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