Repository navigation
Description
Architecture Finding
Type: interface-violation / coupling
Affected area: project.conf options.arch → elements/k3s/k3s-bin.bst, files/k3s/sysext/extension-release.k3s, elements/oci/k3s-sysext.bst, elements/bluefin-server/os-release-flatcar.bst
project.conf declares a real, selectable build axis:
options:
arch:
type: arch
variable: arch
values: [aarch64, x86_64]
sandbox:
build-arch: "%{arch}"elements/freedesktop-sdk.bst honours it — it has an explicit arch == 'aarch64' junction branch setting bootstrap_build_arch. So the axis is not vestigial; the junction is prepared to resolve for aarch64.
Three downstream sites then restate the architecture as an unguarded x86_64 literal, with nothing comparing them to %{arch}:
| Site | Literal | Consumer |
|---|---|---|
elements/k3s/k3s-bin.bst (sources[0].url) |
github:k3s-io/k3s/releases/download/v1.36.2%2Bk3s1/k3s — the amd64 asset (sha256sum-amd64.txt, per the elements own docstring) |
staged verbatim at /usr/bin/k3s |
files/k3s/sysext/extension-release.k3s |
ARCHITECTURE=x86-64 |
copied byte-for-byte by elements/oci/k3s-sysext.bst into /usr/lib/extension-release.d/ |
elements/bluefin-server/os-release-flatcar.bst |
FLATCAR_BOARD="amd64-usr" |
written into /usr/lib/os-release |
Impact
bst build -o arch aarch64 oci/k3s-sysext.bst succeeds. There is no error surface on the arch axis anywhere in the graph:
- The upstream amd64 k3s ELF is installed at
/usr/bin/k3sinside an aarch64 rootfs. Nothing inspects the binary. - The sysext ships
ARCHITECTURE=x86-64while the host running it is aarch64.systemd-sysextmatchesARCHITECTURE=against the host and refuses to merge — so k3s silently never appears, on an image whose build was green. /usr/lib/os-releaseclaimsFLATCAR_BOARD=amd64-usr, which is what Flatcar sysext/Bakery matching keys off. Every third-party Flatcar extension resolution for that host is then wrong.- The output asset filename is
k3s-%{release-version}.raw.zstwith no arch component (same for the DDI, UKI, and installer). Two arch builds of the same release produce identically named release assets, andfiles/os/sysupdate.d/70-k3s.transferfetches by that name fromreleases/latest/download/. An aarch64 asset uploaded alongside an x86_64 one silently overwrites it and is then delivered to x86_64 fleet members by systemd-sysupdate.
This is the repos own declared red flag from docs/skills/avoid-over-engineering.md: "The same value hardcoded in more than one file." The arch value is hardcoded in three, in three different vendor spellings, none linked to the option that is supposed to own it.
The failure is quiet in exactly the way release-version drift (#31) was quiet: the pipeline is green, a Release exists, and the artifact is wrong.
Recommendation
Make %{arch} the single source of the architecture identity, and fail closed where an architecture genuinely is not supported:
- Add
include/arch.yml— the one place the vendor spellings of the arch axis are written (%{systemd-arch}forARCHITECTURE=,%{flatcar-board}forFLATCAR_BOARD=), keyed offarchwith(?)conditionals. Becauseproject.confconstrainsoptions.arch.values, an unmapped architecture cannot be selected. elements/oci/k3s-sysext.bstandelements/bluefin-server/os-release-flatcar.bstinclude that fragment and emit%{systemd-arch}/%{flatcar-board}instead of literals; dropARCHITECTURE=from the staticfiles/k3s/sysext/extension-release.k3sso it has exactly one producer.elements/k3s/k3s-bin.bstasserts%{arch} == x86_64before installing, so the amd64-only pin is an explicit, loud constraint rather than a silent mislabel. Adding thek3s-arm64source is a separate, deliberate change.
Arch-qualifying the release asset filenames (point 4 above) is a release-contract change that also moves files/os/sysupdate.d/*.transfer MatchPatterns; it is deliberately not bundled here and should be tracked separately.
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: 5e263a0
— hive: agent=architect backend=copilot model=claude-opus-5
Activity
[architect] refactor: single source of truth for CPU-arch identity (#40)
castrojo commentedon Sep 5, 2026
Resolved by PR #40 (commit f4f7630).