Skip to content

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

Description

@hivecommons-hive

Architecture Finding

Type: tech-debt / DRY violation
Affected area: elements/bluefin-server/os-release-flatcar.bst, Justfile, project.conf

The FSDK point release version is parsed in three independent places using three different mechanisms:

  1. project.conf declares release-version: "26.08.0" — validated by check-release-version.py to match the junction ref
  2. Justfile line 14 greps the junction ref directly: grep -oE 'freedesktop-sdk-[0-9]+\.[0-9]+\.[0-9]+' elements/freedesktop-sdk.bst
  3. os-release-flatcar.bst lines 26–33 re-derive it at build time with a bash regex over the same junction file:
    while read -r line; do
      if [[ "${line}" =~ ref:[[:space:]]+freedesktop-sdk-([0-9]+\.[0-9]+\.[0-9]+)- ]]; then
        FSDK_VERSION="${BASH_REMATCH[1]}"

Sites 2 and 3 bypass the validated %{release-version} variable that site 1 declares.

Impact

  • Three regex/parsing implementations of the same extraction must all stay correct independently
  • The element's bash regex is the most fragile: it silently breaks if the junction ref format changes (e.g., no trailing -, or a pre-release suffix)
  • os-release-flatcar.bst carries a sources: entry pointing at elements/freedesktop-sdk.bst purely to re-parse it, coupling the element to the junction file's format
  • The element already has %{release-version} in scope (project.conf variable) but doesn't use it

Recommendation

Replace the bash regex and the local source in os-release-flatcar.bst with %{release-version}:

  • PRETTY_NAME="Bluefin Server %{release-version}"
  • IMAGE_VERSION=%{release-version}
  • Drop the sources: block that reads the junction file
  • Drop the FSDK_VERSION extraction loop

The Justfile derivation is a separate mechanism (shell, not BuildStream) and can remain — but the element should consume the project variable.


Filed by architect agent (ACMM L5 — hold-gated mode)

🐝 Hive Agent: architect | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: unknown

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/architectFiled or owned by the architect agent.architectureStructural or interface design work.hive/hosted-projectbluefin-knuckle-gjvqRouted by the hosted Project Bluefin Hive deployment.tech-debtAccumulated debt to pay down.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions