Repository navigation
test: files/ payload reachability gate — tests/unit/test_files_payload_reachability.py - #155
Conversation
…files_payload_reachability.py
Every path under files/ reaches an image only if some element stages it with a
kind: local source. Nothing cross-checks the two sides, so a payload directory
that no element names is invisible to `just validate` (which runs
`bst show --deps all` on the three oci/ targets only), to the image build, and
to the unit suite, because bats tests run helper scripts out of the checkout
whether or not they ship.
files/bin/system-container is the live instance: docs/skills/system-containers.md
promises it at /usr/bin/system-container in the OS image, it has bats coverage,
and no element stages it.
Add a gate asserting both directions of the contract:
- every kind: local `path:` declared by an element still exists on disk, so
renaming payload cannot silently drop it out of the image;
- every file under files/ is staged, declared host tooling (HOST_TOOLING:
files/bin/bluefin-kubestellar, files/lima), or a recorded waiver.
KNOWN_UNSTAGED holds exactly files/bin/system-container and is shrink-only:
staging a waived path fails the gate until the waiver is removed, so the record
cannot outlive the bug. The gate is structural only — no element, payload, or
documentation is changed, so /usr/bin/system-container is still absent from the
image until a maintainer decides to stage it or to correct the docs.
Refs #154
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
|
Deferring this PR's red Baseline evidence — the same check is failing on the default branch
This is one repository incident, not one failure per PR, so no PR-specific retry or diff repair is appropriate here. This PR stays deferred until
|
|
CI triage: the red check on this PR is not caused by its diff.
The console timeout is downstream of the It is already owned elsewhere — #167 ("mount /var via filesystem label and provide /bin/sh"), #165 ("cap root-a SizeMaxBytes to 8G to guarantee /var space") and #173 ("remove udevd sysext ordering drop-in to prevent var mount d…") all target this exact failure. Rather than write a fourth implementation of the same fix inside a test PR, this one stands down and waits: it should go green once whichever of those lands. No change pushed here; the reachability gate itself is unmodified.🐝 Hive Agent: — hive: agent=architect backend=copilot model=claude-opus-5 |
castrojo
left a comment
There was a problem hiding this comment.
Approving. The core invariant here is worth having and it is implemented honestly.
I checked the gate actually holds rather than assuming it does: I enumerated every kind: local declaration across elements/**/*.bst against the full files/ listing, and every payload file is genuinely accounted for — by a staged directory, by HOST_TOOLING, or by the single files/bin/system-container waiver. The test passes on the current tree for the right reason.
The strong part is the bidirectional check plus the shrink-only waiver enforcement. test_every_payload_file_is_staged_or_declared is the real gate — a new orphan under files/ fails it. test_declared_source_paths_exist catches rename drift in the other direction. test_known_unstaged_waivers_are_still_unstaged and test_host_tooling_declarations_are_not_stale are the ones I'd have asked for if they weren't here: they make a waiver unable to outlive the bug it was written for, which is a genuine invariant and the usual failure mode of waiver lists. And test_at_least_one_element_stages_payload is a legitimate anti-vacuity guard, because this gate's failure mode is passing silently.
I also like that the PR does not silently "fix" the files/bin/system-container orphan it discovered. Recording it as an explicit waiver rather than quietly staging it is the right instinct.
Two tests I'd prune, and one limitation I'd document. None blocks a tests-only PR, so I am approving rather than holding it, but they are worth a follow-up pass:
test_waivers_and_host_tooling_are_disjointasserts that two module-level literal sets defined forty lines above do not intersect. It cannot fail except by someone typing the same string into both constants in a single edit. That is a tautology over constants, not observable behaviour.test_files_tree_is_presentassertsfiles/exists and is non-empty. No plausible bug fails this and only this — a repo that deletedfiles/would fail the build,just validate, and the anti-vacuity guard immediately beneath it first.
The limitation worth a docstring sentence: _declared_paths() scans every .bst by text regardless of whether that element is reachable from the three OCI targets just validate builds. So an orphaned element still "declares" its path, and a file can be reported reachable while never actually shipping — which is a near neighbour of the bug class the docstring says it closes. State it as a known bound rather than leaving it implied.
Minor: test_declared_source_paths_exist is parametrized on sorted(_declared_paths()) and then calls _declared_paths() again inside the body purely to build the owners message, re-parsing every .bst once per case. Correct, just quadratic YAML parsing for cosmetics — a module-level cache would fix it.
Merge-order interaction worth watching, since this gate newly constrains anything that adds to files/: PR #80 adds new systemd preset payload alongside os-systemd-presets.bst, and a files/ path without a matching kind: local declaration will turn this gate red. #91 (adds files/k0s/sysext/k0s-kiosk-tls.service) and #90 (deletes a manifest) are both safe, since those directories are declared at directory level.
CI: build and unit pass. The only red check is installer-test, which fails on main itself at tip 5ebfeae (run 34920225526) and is unrelated to this change.
Needs one more independent approval under the two-reviewer policy.
Drop test_waivers_and_host_tooling_are_disjoint (a tautology over two module-level literal sets) and test_files_tree_is_present (subsumed by the anti-vacuity guard and the build itself). Record in the module docstring that staging is matched by declaration rather than by graph reachability from the OCI targets. Assisted-by: Claude Opus 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
castrojo
left a comment
There was a problem hiding this comment.
Re-approving after pushing a prune to this branch. My earlier approval was dismissed by that push, so this restores it, and I am explaining what I changed since I am not the author.
What I changed (commit adca828, 013a224..adca828, one file):
Removed two test functions that cannot fail:
test_waivers_and_host_tooling_are_disjoint— asserted thatHOST_TOOLING & KNOWN_UNSTAGEDis empty. Both are module-level literal sets declared about forty lines above the assertion, so nothing observable can break it; only someone typing the same string into both constants in a single edit could. A tautology over constants.test_files_tree_is_present— assertedfiles/exists and is non-empty. No plausible bug fails this and only this: a repo that deletedfiles/would fail the build,just validate, andtest_at_least_one_element_stages_payloaddirectly beneath it first.
I also added one sentence to the module docstring recording a real limitation that was implied but not stated:
Staging is matched by declaration, not by graph reachability: a path named by an element that no OCI target depends on still counts as staged here.
That matters because _declared_paths() scans every elements/**/*.bst by text regardless of whether the element is reachable from the three OCI targets just validate builds — so an orphaned element still "declares" its path, and a file can be reported reachable while never actually shipping. That is adjacent to the bug class the docstring says it closes, and it is better stated than discovered.
What I left untouched. All five load-bearing tests, verbatim: test_every_payload_file_is_staged_or_declared (the gate itself), test_declared_source_paths_exist (rename drift), test_known_unstaged_waivers_are_still_unstaged and test_host_tooling_declarations_are_not_stale (the shrink-only invariant, which is the part I most wanted kept — it stops a waiver outliving the bug it was written for), and test_at_least_one_element_stages_payload (anti-vacuity, legitimate here because this gate's failure mode is passing silently). Both module constants are retained; grep confirms the surviving tests still use them.
Verification, run independently of the change rather than taken on trust: python3 -m pytest tests/unit/test_files_payload_reachability.py -q gives 22 passed, down from 24 — exactly the two removed, neither parametrized. gh pr diff 155 --name-only lists only tests/unit/test_files_payload_reachability.py, and neither removed name appears in the file.
On the PR itself, unchanged from my earlier review: the bidirectional check plus shrink-only waiver enforcement is a genuine invariant worth having, and I particularly like that it records the files/bin/system-container orphan as an explicit waiver rather than quietly staging it to make the gate pass.
Merge-order note still stands: this gate newly constrains anything adding to files/, so #80 — which adds systemd preset payload — needs a matching kind: local declaration or it will turn this red.
CI: build and unit pass. The only red check is installer-test, which fails on main itself and is unrelated.
Needs one more independent approval under the two-reviewer policy.
|
CI triage: the red check is not caused by this PR, and nothing in this branch can turn it green. This PR adds exactly one file —
What the QEMU job actually failed onJob 105714003901, The console-readiness timeout is a symptom: It is pre-existing on
|
|
The red check on this PR is pre-existing breakage on This PR's diff is a single new file — Evidence that
In run 34920225526 the job breakdown is The remaining checks here are green: The installer-test job runs through the reusable Holding the branch as-is rather than rebasing onto a still-red
|
|
CI status re-verified. This branch already contains the current Evidence from the failing job (run 35375198501): The Two open PRs target this exact breakage: #173 ( Not removing the hold, and not papering over the QEMU failure from inside a unit-test file.🐝 Hive Agent: — hive: agent=architect backend=copilot model=claude-opus-5 copilot=1.0.78 |
|
CI triage for the red check on this PR — no change is warranted here. Failing check: This failure is pre-existing and repo-wide, not caused by this diff:
The installer-test failure is already occupied ground and is being worked separately — #181 (
|
|
CI status note (no code change pushed). The one red check on this PR is `installer-test / Install and boot in QEMU` (Build DDI artifacts). It is not caused by this branch:
No branch-local fix exists for this: the failure lives in the image boot path, and repairing it would mean a behaviour change to the shipped image, which is outside what this PR claims and outside what a hold-gated test-only PR should carry. Repairing the guest boot is already being worked separately (see #181 and #186), so this branch deliberately does not duplicate it. This PR stays as-is, hold intact, pending human review.🐝 Hive Agent: — hive: agent=architect backend=copilot model=claude-opus-5 copilot=1.0.78 |
|
CI triage: the red check on this PR is not caused by its diff.
The repair belongs to the boot/readiness path, not here — that ground is already claimed by open PRs (#181 readiness gate reachability, #205 console hydration retry, #173 udevd sysext ordering / var mount). Writing a second fix for it from this PR would duplicate them. No change pushed to this branch: there is nothing in its diff to repair. It should go green once the installer-test failure is fixed on `main`. Hold label untouched.🐝 Hive Agent: — hive: agent=architect backend=copilot model=claude-opus-5 copilot=1.0.78 |
|
CI status note — the red check on this PR is not caused by this diff. This PR adds exactly one file,
The single failure is
Both halves of the real fix are already claimed by other open PRs, so this branch deliberately does not touch them:
Pushing an installer or CI change onto this branch would duplicate that work and mix two unrelated clusters into one review, so this PR is left as-is. It should go green once #207 and #181 land and this branch is rebased. The
|
|
Verified against the Kubernetes cutover branch (#210) before merging: applied this patch on top of that tree and the gate passes 23/23, including the new |
…onents (#132) * fix(renovate): match the freedesktop-sdk series the junction actually tracks renovate.json filters freedesktop-sdk tags with "extractVersion": "^freedesktop-sdk-(?<version>25\\.08\\.[0-9]+)$" while elements/freedesktop-sdk.bst has tracked 26.08 since the bump to freedesktop-sdk-26.08.0-0-gdb97cce: track: freedesktop-sdk-26.08* ref: freedesktop-sdk-26.08.0-0-gdb97cce32cecadc7a3e98f06d557ebfa6ba9ad46 No tag upstream publishes can match that rule any more, so Renovate reports no updates rather than an error. The junction silently stops receiving bumps and the track-refs job in build.yml never has a ref to resolve. Nothing in any log says so — the failure looks exactly like "already up to date". Bumps the rule to 26.08, and adds check-renovate-series.py so the pair cannot drift apart again: it reads the series out of each junction's `track:` glob and asserts the matching extractVersion is anchored to the same one, failing closed. Same shape as check-release-version.py and check-k0s-version.py — wired into .pre-commit-config.yaml, and unit-tests.yml now also fires on renovate.json and elements/*.bst so the guard runs when either side moves. tests/unit/test_check_renovate_series.py covers the passing case, the exact regression above, a junction with no packageRule, a junction with no `track:`, the two series helpers, and the checked-in tree itself. $ python3 -m pytest tests/unit -q 207 passed, 1 xfailed in 0.64s Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VwEniffvKGH7gHfqKneuaJ * refactor: switch OS payload to Flatcar base, drop displaced FSDK components Cut os-stack.bst over to the Flatcar base (projectbluefin/server#131), the Phase 5 slice of the Flatcar base migration design doc. The installed OS DDI payload now lands on a single-ABI Flatcar `/usr` that shares the vermagic, glibc, and systemd of the Flatcar LTS kernel, instead of straddling FSDK 26.08 userspace against the Flatcar kernel. - Add elements/flatcar/flatcar-usr.bst: import element mirroring the existing flatcar-zfs.bst pattern — a single pinned, digest-verified flatcar-container source, prebuilt binaries, FSDK stripper left alone. Extracts /usr, drops Flatcar's update/provisioning stack (update_engine, locksmithd, ignition, coreos-cloudinit, flatcar-update, download_sysext, ensure-sysext), flattens the nested module dir to single-level, stages the raw sysext images. - Rewrite os-stack.bst: replace the FSDK base-runtime depends (runtime-minimal, systemd, dbus, dbus-broker, kmod, shadow, bootstrap/bash, uutils-coreutils, openssh-systemd, podman, xfsprogs, gnupg, ca-certificates, tzdata) with flatcar/flatcar-usr.bst. Keep all ~14 OS-policy elements and the kernel/zfs. The FSDK junction stays only for integration helpers (extra-fs, ldconfig); os-countme keeps its curl+jq via that junction. - Delete elements/bluefin-server/linux-firmware-split.bst (only referenced by os-stack); Flatcar firmware now ships in /usr/lib/firmware. Keep the uutils-coreutils.bst file — installer-stack.bst still needs it (installer stays FSDK 26.08, hard rule 3). - Update tests/unit/test_build_depends.py: the old tests locked in FSDK invariants (uutils-not-gnu, includes dbus-broker, includes bash) that the cutover breaks; replace them with invariants for the new base — os-stack depends on flatcar-usr.bst and excludes every displaced FSDK component. - Update docs/skills/factory-integration.md and README.md: podman and the base userspace are now Flatcar/sysext, not FSDK base components. No os-base option exists, so its removal is a no-op. The installer keeps its FSDK 26.08 userspace; hard rules 2, 3, and 4 are preserved. bluefin-server#131 Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * fix(installer): ld.so.conf uses Flatcar /usr/lib64, not Debian multiarch The installer's ld.so.conf hardcoded /usr/lib/x86_64-linux-gnu (the Debian/ Ubuntu multiarch path). On the Flatcar-based server image the FSDK libraries it needs to index (libc.so.6, libgcc_s.so.1, libkmod.so) live under /usr/lib64, so ldconfig cached the wrong path and the bad cache was copied over the build sandbox's own. Point both ld.so.conf entries at /usr/lib64. projectbluefin/server#132 (review item #6) * fix(flatcar): drop duplicate flatcar-usr.bst, provided by #140 * fix(installer): keep host ld.so.conf on Debian multiarch path The installer/dracut tooling is FSDK/Debian-based, so its libraries live under /usr/lib/x86_64-linux-gnu. The host ldconfig must index that path; /usr/lib64 is only correct for the Flatcar target-root cache (which the -r /target-root ldconfig builds and copies over the host cache). Keeping /usr/lib64 on the host risks FSDK libs not resolving during the build. Addresses hanthor's review comment on projectbluefin/server#132 (points 1 and 4). * ci(just): run the renovate series guard in validate `check-renovate-series.py` was wired into pre-commit and the unit suite but not into `just validate`, unlike its siblings `check-release-version.py` and `check-k0s-version.py`. Since AGENTS.md and docs/skills/ci-tooling.md point contributors at `just validate` as the merge-contract check, the new invariant was effectively unenforced there. Assisted-by: Claude Opus 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: expand unit-tests workflow paths trigger Trigger unit tests on changes to elements/**, include/**, project.conf, .pre-commit-config.yaml, and .github/workflows/build.yml, which are read and asserted by the unit test suite. Fixes #187 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * fix(ci): pin just tool version in CI workflows taiki-e/install-action resolves just@latest at run time when no version is supplied, so the build tool that drives every job (just validate, just test-unit, DDI/kernel export recipes) was unpinned while every GitHub Action in the repo is SHA-pinned. Pin just to 1.58.0, the version CI already installs, so this changes no runtime behavior. Signed-off-by: hive-agent <hive-agent@users.noreply.github.com> * fix(installer): align target ld.so.conf path + add linker-path contract test hanthor review on #132: - The target ld.so.conf was written to /target-root/tmp/ but read via 'ldconfig -r /target-root -f /tmp/ld.so.conf'. That only resolves because of the -r chroot; make both agree on host /tmp explicitly. - Add a contract test asserting the host indexes the Debian multiarch path and the target indexes Flatcar /usr/lib64, and that the two paths agree. projectbluefin/server#132 * fix(installer): revert ld.so.conf write path — -f resolves post-chroot My previous commit (8e96b1c) wrote the target conf to host /tmp/ld.so.conf, but 'ldconfig -r /target-root -f /tmp/ld.so.conf' reads it post-chroot at /target-root/tmp/ld.so.conf, so the build would fail to find the config. Verified empirically that -r chroots the -f path. Revert the write to /target-root/tmp/ld.so.conf and document the post-chroot resolve instead. Fix the contract test, which had encoded the wrong paths. * test(132): drop duplicate test_os_countme from #132 #122 adds test_os_countme_depends_on_curl_and_jq; #132 carried a verbatim copy that would conflict on merge (Python keeps the second silently). Per hanthor's coordination, land #122 first and let #132 drop its copy. * docs(ci-tooling): pin the tool version in the canonical just snippet The skill doc's install snippet still showed an unpinned 'tool: just', which is the form issue #188 removed from the workflows. A workflow copied from the doc would have reintroduced it, undoing this PR on the next new job. Update the snippet to 'tool: just@1.58.0', matching all four call sites, and explain that without a version install-action resolves just@latest at run time. Note that the version is repeated per call site so a bump has to change all of them in one commit. Add the half-done pin to Red Flags, add a checklist item for it under Verification, and record the 'tool: just always installs a working version' rationalization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): bound root-a partition to guarantee room for var (#207) Caps `bluefin-server-root-a` at 8 GiB so the tail `/var` partition is always placeable on a 16 GiB target disk. Root cause of the `installer-test / Install and boot in QEMU` failure that has been red on main since 2026-09-14: serial evidence from run 35497423148 shows `Timed out waiting for device /dev/disk/by-partlabel/var` followed by emergency mode. Verified safe: the DDI payload is 2.16 GiB uncompressed (`zstd -l dist/ddi/bluefin-server-ddi-26.08.0.raw.zst`), well under the new 8 GiB cap and above the 4 GiB `SizeMinBytes`. Closes #161, closes #158, closes #175, closes #166. Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [sec-check] fix: harden sshd drop-in — no root password login over network (#169) Restores the sshd hardening reverted by 37c8356. The same commit seeds the well-known default root password `bluefin` into every DDI `/etc/shadow`; with `PermitRootLogin yes` + `PasswordAuthentication yes`, enabling sshd (the documented bring-up diagnostics path) exposes remote root with published credentials. Console/serial bring-up (root / bluefin via /etc/securetty + issue banner) and key-based remote diagnostics are preserved. Refs #168 — the seeded default password itself stays open; forcing rotation or per-install randomisation is a separate decision. Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [scanner] fix: propagate lima-e2e browser-verification failures (#160) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: executed coverage for docs-checks.py main() — new tests/unit/test_docs_checks_main.py (#106) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: behavioral coverage for files/bin/bluefin-kubestellar — tests/unit/bluefin-kubestellar_test.bats (#171) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(build-depends): lock in os-countme curl+jq FSDK paths (#122) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: files/ payload reachability gate — tests/unit/test_files_payload_reachability.py (#155) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(arch): produce Flatcar-to-FSDK version parity matrix (#142) (#184) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(flatcar): record container runtime parity (#192) Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(ci): move junction ref tracking out of the pull_request path (#180) Moves junction tracking off the pull_request path onto a scheduled tracker that also syncs project.conf release-version from the tracked FSDK point release, so junction bumps arrive green instead of dying at check-release-version.py. Assisted-by: Claude Opus 4.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(boot): resolve QEMU installer boot deadlock and console readiness probe (#220) * fix(boot): resolve QEMU installer boot deadlock and console readiness probe In `installer-test / Install and boot in QEMU`, target boot times out waiting for `/dev/disk/by-partlabel/var` and eventually fails KubeStellar Console readiness. Root causes resolved: 1. `elements/flatcar/flatcar-zfs.bst`: The extracted Flatcar ZFS system extension ships `usr/lib/systemd/system/systemd-udevd.service.d/10-zfs.conf` (`After=systemd-sysext.service`) and a tmpfiles copy rule in `usr/lib/tmpfiles.d/10-zfs.conf`. Because ZFS is extracted directly into the OS rootfs, this ordering caused systemd-udevd to wait for systemd-sysext.service, which waited for local-fs.target, which waited for var.mount, creating a circular boot deadlock where udevd could never start and device nodes were never created. Remove the drop-in, strip the tmpfiles rule, and add `sed.bst` build dependency. 2. `elements/oci/bluefin-server-ddi.bst` & `elements/oci/bluefin-server-installer.bst`: Flatcar kernel module directories reside under `/usr/lib/modules`; point `depmod -b` to `/layer/usr` and `/target-root/usr` instead of root. 3. `elements/oci/bluefin-server-ddi.bst` & `Justfile`: Mask `systemd-homed-firstboot.service` alongside `systemd-firstboot.service` on the target image and kernel cmdline to prevent headless hangs on interactive user creation prompt. 4. `Justfile` & `41-kubestellar-kiosk-proxy.yaml`: Move console readiness probe inside the guest using an injected test unit over TLS to correctly reach loopback-bound kiosk proxy and announce readiness on serial console. 5. `tests/unit/test_installer_contract.py`: Add unit contract assertions for the fixes. Fixes #218 Assisted-by: Gemini 3.8 Flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * fix(boot): drop dead host-side kiosk probe and rebuild cleaned zfs sysext Address review findings on #220: 1. `Justfile`: remove the host-side poll of `http://127.0.0.1:8080/healthz` from the `installer-test` smoke recipe. The PR removed the QEMU hostfwd and the kiosk proxy terminates TLS (`files/k0s/kiosk/nginx.conf`, `listen 8080 ssl`), so this probe can never reach the guest. It could only ever hit an unrelated host process on port 8080 and false-pass the smoke test. The in-guest serial `KIOSK_CONSOLE_READY` marker is now the sole readiness check. 2. `elements/flatcar/flatcar-zfs.bst`: the preserved `/usr/lib/sysexts/zfs.raw` was the untouched upstream image and still carried the `After=systemd-sysext.service` udevd drop-in this PR removes from the rootfs. Inert today, but the deadlock ordering would return if that raw were ever merged for its stated runtime sysext usage. Rebuild the raw with mksquashfs from the cleaned install root after the drop-in and tmpfiles cleanup. 3. `tests/unit/test_installer_contract.py`: assert the host-side probe is gone from the smoke recipe and that the preserved raw is rebuilt post-cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): hard preflight abort when bluefin-installer-data is absent (#224) Add a hard preflight check before any installation begins: if /dev/disk/by-partlabel/bluefin-installer-data is absent or not a block device, abort with diagnostic lsblk and /dev/disk/by-partlabel output. This prevents unattended disk discovery from falling back to an empty installer partition and potentially selecting and erasing its own installation media on bare-metal USB drives. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Jorge Castro <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(justfile): probe install-vm kiosk readiness from inside the guest (rebased) (#227) * fix(justfile): probe install-vm kiosk readiness from inside the guest The kiosk proxy publishes hostPort 8080 on the guest's loopback only (files/k0s/manifests/kubestellar/41-kubestellar-kiosk-proxy.yaml) and terminates TLS (files/k0s/kiosk/nginx.conf, `listen 8080 ssl`). This broke install-vm's readiness wait and advertised access URLs the same way #218/#220 diagnosed for the installer-test smoke recipe: 1. A QEMU/libslirp hostfwd with an unspecified guest address is delivered to the guest's DHCP address, never to 127.0.0.1, so hostfwd=tcp::8080-:8080 could never reach the loopback-bound proxy. 2. The host-side poll spoke plain HTTP against a TLS listener. 3. The printed LAN/local access URLs and xdg-open call were therefore unreachable. Probe readiness from inside the guest instead: inject a oneshot systemd unit via an smbios(11) credential that polls the proxy over TLS from inside the guest and echoes a marker on the system console, which is captured to a host-side serial log file the host polls instead of curl. This is the same in-guest-probe approach proposed for test-installer-artifact in #220 (not yet merged); test-installer- artifact itself still probes from the host on this branch. Order ttyS0 last on the kernel cmdline so /dev/console resolves to the serial device the host captures, matching the ordering test-installer-artifact already uses for the same reason. The in-guest probe deliberately does not parse the /healthz response body: curl --fail already fails on a non-2xx response, which is exactly "healthz ok and / returns 200", and it avoids embedding quotes inside a systemd ExecStart= line, whose escaping rules differ from a plain shell. Drop the non-working direct 8080 hostfwd and the LAN/local URLs and xdg-open call that depended on it; print instructions for reaching the console from the host over an SSH tunnel through the existing hostfwd=tcp::2222-:22 forward instead, per the issue's suggested direction. Preserve the unrelated hostfwd=tcp::6443-:6443 (Kubernetes API) forward. Correct the kiosk proxy manifest comment, which still claimed the VM flow reaches the proxy via the existing hostfwd. Fixes #222 Assisted-by: Claude (Anthropic) via Hive Signed-off-by: Danathar <Danathar@users.noreply.github.com> * fix(os): correct login banner and de-brittle the jq test assertion files/os/issue.d/40-kubestellar.issue still advertised 'KubeStellar Console: http://\4:8080/ (or http://127.0.0.1:8080 from host)', which is doubly wrong after this PR: the proxy binds guest loopback and terminates TLS, and the direct 8080 hostfwd is gone. Fix in-scope rather than deferring, since the fix is one line and the PR already changed the reachability story the banner describes: point at https://127.0.0.1:8080/ and name the SSH tunnel the Justfile recipe now prints instead. Anchor test_install_vm_kiosk_readiness.py's jq-absence check to the ExecStart= line instead of the whole recipe body, so a future comment or variable elsewhere in the recipe containing 'jq' cannot fail it for the wrong reason, and it stays anchored to the actual contract: the ExecStart command line has no jq in it. Verified test_install_vm_kiosk_readiness.py's four module-level tests directly (no pytest in this environment): all pass, including the updated assertion. test_console_issue.py needs PyYAML, unavailable here; its one-line assertion update is a straight text match against the corrected banner and needs a real run in CI before merge. Signed-off-by: Danathar <Danathar@users.noreply.github.com> * fix(os): reformat login banner for TTY legibility The banner line grew from 71 to ~152 chars and would wrap badly on an 80-column console -- the entire point of /etc/issue.d is legibility at a getty prompt. Split it across two lines and dropped the markdown backticks, which render literally there: KubeStellar Console: https://127.0.0.1:8080/ (loopback, TLS only) Remote access: ssh -L 8080:127.0.0.1:8080 <user>@<host> Added an assertion for the tunnel line to tests/unit/test_console_issue.py. Mutation-tested the ExecStart jq guard against the real Justfile instead of an in-memory copy: piped the echo through 'jq -R .', confirmed test_install_vm_probes_readiness_inside_the_guest_over_tls fails, reverted. Inverse check: added a harmless '# jq' comment elsewhere in the install-vm recipe, confirmed the test still passes -- proving the anchor to the ExecStart= line, not just narrowing the match by luck. Signed-off-by: Danathar <Danathar@users.noreply.github.com> * fix(justfile): verify target partition layout before marking install complete Assert that bluefin-server-root-a and var partitions exist on TARGET_RAW before touching INSTALL_COMPLETE, preventing failed QEMU installer runs from falsely marking installation as finished. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(justfile): use sfdisk --json to parse regular target disk partition table in install-vm lsblk does not inspect partitions inside a regular file image; use sfdisk --json and jq to parse partitiontable.partitions.name instead. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(justfile): mount /var and bound readiness wait in install-vm The installed target carries no fstab entry for /var and gpt-auto cannot mount it, so the install-vm boot needs the same SMBIOS fstab.extra credential test-installer-artifact passes. Without it, k0s state (and the kiosk proxy it serves) is missing and the readiness marker never appears. Bound the readiness wait with INSTALL_VM_READY_DEADLINE (default 600s) and dump the serial log tail on timeout or premature QEMU exit, so a broken guest boot fails loudly instead of hanging forever. Also document why the target partition layout is verified before marking the install complete, and tell the operator to re-run the installer when an interactive install was aborted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: Jorge Castro <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * fix: generate SSH host keys on device, not in the published DDI (#216) Drops build-time ssh-keygen calls from elements/oci/bluefin-server-ddi.bst so the published DDI carries no private host keys. Adds ssh-host-keygen.service and sshd.service drop-in to generate host keys on first boot before sshd starts. Reviewed-by: Danathar Assisted-by: claude-3-5-sonnet via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: include scripts/** in unit-tests workflow paths filter (#234) Include scripts/** in pull_request and push paths filters for unit-tests workflow. Reviewed-by: castrojo Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: appliance identity, mDNS, and Bash prompt design (#208) Appliance identity, mDNS, and Bash prompt design spec. Reviewed-by: castrojo Assisted-by: claude-3-5-sonnet via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(renovate): disable the homebrew manager for binary-asset formulae (#211) Formula/kc-agent.rb and Formula/bluefin-kubestellar.rb pin per-architecture release binaries with one sha256 each. Renovate's built-in homebrew manager only models source-archive formulae: it rewrites the url to https://github.com/<owner>/<repo>/archive/refs/tags/<tag>.tar.gz and carries over a single checksum. The result leaves `bin.install "kc-agent"` with no binary to install, and the other three architectures unresolvable. That is not hypothetical — it is exactly what #209 proposed: - url ".../releases/download/v0.3.41/kc-agent_0.3.41_darwin_amd64.tar.gz" + url ".../archive/refs/tags/v0.3.42.tar.gz" Bumping these formulae means fetching four assets and four checksums, so it stays a manual change until a generator exists. Disabling the manager stops the bot from filing PRs that cannot be merged. Validated with renovate-config-validator 44.103.6, the version the repository bot runs. Assisted-by: Claude Opus 4.5 via GitHub Copilot Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * fix(installer): harden flash-installer with refusal guards, write verification, and GPT backup relocation (#225) * fix(installer): constrain flash image lookup to top-level and verify PARTLABEL Constrain flash-installer image lookup to dist/ maxdepth 1 to prevent flashing stale nested checkout artifacts. After dd, trigger and settle udev and verify the bluefin-installer-data PARTLABEL is present on the target device. Add bats unit test coverage. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): make missing PARTLABEL fatal after flashing Ensure flash-installer exits nonzero and suppresses the success message when bluefin-installer-data PARTLABEL is not observed after writing. Add positive and negative Bats contract tests. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): reread partition table via blockdev/partprobe before verifying partlabel Invoke blockdev --rereadpt / partprobe after dd so kernel partition tables are updated before udev triggers and the label verification runs. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): abort if partition table reread fails after flashing Ensure flash-installer aborts with an error if both blockdev --rereadpt and partprobe fail to update the kernel partition table, preventing stale partition label checks. Add Bats unit test. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): harden flash-installer safety, write verification, and partition checks - Reject disks backing the running system (/ and /sysroot). - Reject disks with mounted partitions. - Verify archive integrity with zstd -t before prompting. - Run dd pipeline with pipefail. - Flush buffers and verify payload bytes and sha256 read back from device. - Relocate GPT backup header and verify with sfdisk --verify. - Require exact match on bluefin-installer-data PARTLABEL with grep -Fxq. - Add full unit test coverage in tests/unit/flash-installer_test.bats. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(installer): add pipefail, digest mismatch, and sfdisk verify Bats tests Model dd of= by consuming stdin to EOF without masking SIGPIPE, test failing zstd -dc pipeline abort under pipefail, test corrupt readback digest mismatch abort, and distinguish sfdisk --relocate from --verify. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): fail closed on mount checks and stop interpolating image path Address review findings on the flash-installer hardening: - The mounted-partitions guard used lsblk's MOUNTPOINTS column, which needs util-linux >= 2.37. On older hosts lsblk failed, the failure was swallowed, and the guard passed silently. Fall back to the MOUNTPOINT column and refuse the device outright when neither column can be read. - findmnt reports btrfs roots as /dev/sdXn[/subvol], which lsblk cannot resolve, so the running-system-disk refusal was skipped. Strip the subvolume suffix before resolving the parent disk. - The image path was interpolated into a root shell command. Pass the image and the device as positional arguments instead. - Refresh the bats header comment to describe the current guards and stubs, and document the added guards in docs/skills/ddi-installer-build.md. - Add coverage for the btrfs subvolume source, the MOUNTPOINT fallback, the unreadable-mount-state refusal, the multi-image refusal, and the absence of image interpolation in the root shell. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): resolve flash target to its parent disk and hash in one pass The running-system guard compared the target's KNAME against the parent disk that / resolves to via PKNAME. Naming a partition node made the two sides disagree by construction: targeting /dev/sda3 while / lives on /dev/sda2 compared sda3 against sda, so the guard passed and only the mount check stood in the way. Resolve the target through PKNAME first, falling back to KNAME for whole-disk nodes, so both sides are parent disks. Covered by a new Bats case that fails without the fix. Also collapse the two pre-write decompressions into one: the digest and the byte count now come from a single `zstd -dc` piped through `tee` into a FIFO, with an explicit `wait` on the hashing subshell so the digest is fully written before it is read. This roughly halves pre-write time on multi-GB images. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Jorge Castro <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(kiosk): executed coverage for kiosk-gate.js — tests/unit/test_kiosk_gate_behavior.py (#232) kiosk-gate.js gates the kiosk console while a session exists but the kc-agent is unreachable. It had no executed coverage: the existing suite only greps the source for literals, so inverting the session check, dropping the dedupe guard, trapping keydown with no gate up, ignoring a non-ok health response, or sending credentials to the agent all keep it green. Run the real script in node:vm against a stub DOM and assert the behaviour instead. Closes #231 Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * revert: "docs: appliance identity, mDNS, and Bash prompt design (#208)" (#235) This reverts commit 3f7959217ab396bb30576f4fd013f2202c166707. The design specification contains an unviable mechanism: systemd-hostnamed writes /etc/hostname using WRITE_STRING_FILE_ATOMIC (open temporary file and renameat), which destroys the /etc/hostname symlink pointing to /var/lib/bluefin-server/hostname upon static hostname mutation. Reverting until an architecturally sound mechanism is reviewed independently. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Jorge Castro <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(creds): extend systemd-creds provisioning to SSH keys, network, firstboot, and TPM2 (#221) Wire systemd credential provisioning for network configuration, first-boot locale/timezone/hostname settings, and SSH key provisioning: - bluefin-firstboot-credentials.service: runs systemd-firstboot non-interactively when firstboot.* credentials are present, setting the live hostname before networkd starts and stamping /etc/.bluefin-firstboot-credentials so it runs once. - 10-bluefin-credentials.conf: drop-in for systemd-network-generator importing network.conf.*, network.link.*, network.netdev.*, and network.network.* credentials under /run/systemd/network/, falling back to DHCP when absent. - Presets enabling bluefin-firstboot-credentials.service and systemd-network-generator.service. - os-creds-prov.bst: converted to manual element to stage sysusers credentials and systemd credential units, with strip-binaries disabled. - Document TPM2 sealing, ESP and hypervisor delivery for bare metal and VMs, and tmpfiles.extra payloads for SSH key provisioning. - Contract unit tests in test_credentials_provisioning.py. Fixes #138 Supersedes #144 Assisted-by: Gemini 3.8 Flash via GitHub Copilot Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * arch: make include/flatcar.yml the single source of truth for Flatcar pins (#143) * arch: make include/flatcar.yml the single source of truth for Flatcar pins include/flatcar.yml now declares every Flatcar upstream pin for the target release - the version, kernel vermagic, and the vmlinuz / container / zfs source sha256s - and every Flatcar element reads those values through %{...} variable substitution instead of restating a literal. - flatcar-kernel.bst and flatcar-zfs.bst reference %{flatcar-kernel-vmlinuz-sha256}, %{flatcar-kernel-container-sha256} and %{flatcar-zfs-sha256} instead of hard-coded refs. - Add .github/scripts/check-flatcar-version.py, a grep-based gate (in the spirit of check-release-version.py) that fails the build when any pinned literal appears outside include/flatcar.yml in elements/ or files/. - Wire the gate into 'just validate'. - Add unit tests covering declared_pins(), the scan, and the live-tree invariant. Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * fix(flatcar): quote variable-substituted source refs A bare `%` is a reserved YAML indicator and cannot start a plain scalar, so `ref: %{flatcar-...-sha256}` made elements/flatcar/flatcar-kernel.bst and flatcar-zfs.bst unparseable. Both bst and the pytest suite failed to load the elements, breaking the unit, build and build-kernel jobs. Quote the refs so they parse; BuildStream expands %{...} in source configs, so the pins still resolve from include/flatcar.yml. Assisted-by: Claude Opus 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(kiosk): console shows live local cluster state on first boot (#214) * fix(kiosk): console shows live local cluster state on first boot On a freshly installed single-node k0s cluster no client kc-agent is connected yet, so the KubeStellar console fell back to mock/demo cards instead of the real cluster. - Set NO_LOCAL_AGENT so the console reads the local embedded k0s API directly from this pod's ServiceAccount instead of waiting for a connected kc-agent. - Set SKIP_ONBOARDING so the kiosk shows the dashboard immediately. - Add a read-only ClusterRole bound to the console ServiceAccount so the in-cluster reads for nodes, namespaces and pods succeed. Assisted-by: lemonade/Ornith-1.5-35B-A3B-GGUF-Q6_K via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * fix(kiosk): correct limitranges RBAC resource and SKIP_ONBOARDING doc - 42-kubestellar-console-rbac.yaml: limitquotas is not a Kubernetes resource; the intended grant was limitranges. Misspelled resources are silently ignored in RBAC rules, so LimitRange reads were forbidden. - SKIP_ONBOARDING comment: it skips the onboarding questionnaire, not sign-in (sign-in is bypassed by DEV_MODE/DEV_USER_LOGIN). - NO_LOCAL_AGENT comment: the console forces this in-cluster regardless; the real fix for #193 is the ServiceAccount + read RBAC. Addresses kubestellar-hive review findings on #214. * fix(kiosk): scope console RBAC to real resources and correct comments Follow-up to the #214 review findings. - 42-kubestellar-console-rbac.yaml: replicationcontrollers is a core ("") resource, not an apps resource. Listed under apps it was silently ignored in the RBAC rule, exactly like the limitquotas typo, so the grant never applied. Move it to the core group. - Document why the ClusterRole reads configmaps, events, limitranges and resourcequotas: the console dashboard renders them (namespace overview and ConfigMap cards). Record that verbs stay read-only, secrets are excluded, and the console is only reachable via the 127.0.0.1-bound kiosk proxy. - 40-kubestellar-console.yaml: attribute the fix to the ServiceAccount plus read RBAC. The console backend already forces NO_LOCAL_AGENT on in-cluster, so the env var only records intent. Note that SKIP_ONBOARDING skips the questionnaire and DEV_MODE/DEV_USER_LOGIN bypasses sign-in. - tests: pin every ClusterRole resource name to the real resource for its apiGroup and assert secrets are never granted, so a misspelled or misgrouped resource fails the suite instead of silently dropping the grant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(k0s): pin argocd image by digest and upgrade past EOL v2.12.3 (#212) * fix(k0s): pin argocd image by digest and upgrade past EOL v2.12.3 argocd-server ran quay.io/argoproj/argocd:v2.12.3 (the EOL 2.12 line with unbackported CVEs) by mutable tag, so a re-pointed or compromised tag could silently change what runs. Upgrade to the latest supported v2.14.9 and pin by digest so the running image is integrity-checked. --insecure serves plaintext HTTP; keep it only because the argocd-server Service is ClusterIP-only, and document that it must stay internal (terminate TLS at a proxy, then drop the flag) rather than silently disabling it and breaking the deployment. sec-check #74 Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * fix(k0s): repin argocd to the live v2.14.9 manifest digest The previously pinned digest sha256:af3dfddc… is a legacy schema-v1 manifest that returns 404 on digest lookup; kubelet pulls tag@digest with manifest-list accept types, so argocd-server lands in ImagePullBackOff. Verified against quay.io: af3dfddc… 404s on every content type, while the v2.14.9 index sha256:f5885af0… resolves for all types and carries the amd64 child 78e45540…. Note: the 2.14 line is itself past EOL (3.x is current); the digest fix removes the hard regression but a maintainer may prefer a supported 3.x release. --------- Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * test(installer): behavioural contract for the QEMU boot-proof readiness gate (#219) * test(installer): behavioural contract for the QEMU boot-proof readiness gate test-installer-artifact (the recipe show-me-the-future delegates to) polls /healthz and / after booting the installed target in QEMU, and only breaks out of the loop when the healthz body reports status "ok" AND the root probe answers HTTP 200. Nothing exercised that decision logic before this change: a prior attempt at issue #130 (PR #179) sliced the recipe body out of the Justfile as text and asserted substrings, so every assertion stayed green whether the underlying checks were correct, weakened, or deleted. This suite instead runs the real recipe in a private sandbox copy of the Justfile (the tests/unit/flash-installer_test.bats pattern), with qemu-system-x86_64, curl and zstd replaced by logging stubs on PATH so 'just test-installer-artifact' actually executes. It proves, by running the recipe rather than describing it: - readiness requires both conditions together, not either alone - a failing/malformed healthz body short-circuits before the root probe is ever called - a QEMU process that dies before answering is detected and reported, independent of curl/jq state - the serial log tail is dumped on both failure paths (timeout and death) One substitution is applied to the sandboxed Justfile, asserted the same way flash-installer_test.bats asserts its own: the OVMF_CODE lookup only searches hardcoded absolute host paths, none of which exist on an unprivileged CI runner, so the recipe would abort before ever reaching the readiness loop. An env-gated candidate is added to the front of the existing first_existing() call; unset, it defaults to a nonexistent path, so production behaviour is unchanged. Verified non-vacuous: dropping the root-code check (collapsing the two conditions into one, as a plausible regression) fails 2 of the 10 cases; restoring it is green again. os-base: flatcar (#130's acceptance line) does not exist on main yet — no such build option exists anywhere in the tree, and the whole Flatcar-base cutover cluster (#132/#133/#136/#140/#163/#191) is parked 2-discussing pending the hard-rule-1 ADR decision on #133. This does not close #130; it pins the readiness contract that show-me-the-future/test-installer-artifact already enforce today, independent of which payload eventually boots under it, so the gate stays guarded while that decision is pending. Assisted-by: Claude via Claude Code Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com> * test(installer): rewrite the readiness contract around the in-guest probe #220 moved the readiness decision into the guest: a systemd unit injected over an SMBIOS credential polls the kiosk proxy and prints KIOSK_CONSOLE_READY on the console, and the host only greps the serial log for that marker. Four tests still drove a host-side curl loop that no longer exists and failed at the merged head. Drive the host decision through the serial log instead: the marker present, a progress line only, no marker at all, and a near-miss substring. Guard the two conditions and the credential delivery as text in the unit, and assert this recipe runs no host-side probe (scoped to its own body, since install-vm legitimately forwards its own ports). Four recipe mutations each fail between one and four tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YQCk7xJDvhtPoc4mWPzVCK Signed-off-by: Douglas Baggett <doug.baggett@gmail.com> * fix(test): scope the SMBIOS credential guard to test-installer-artifact install-vm (#227) reuses the same kiosk-ready credential and cmdline mechanism, so it now carries its own copy of both strings. A whole-file grep -c counts both recipes' copies and fails against current main (count 2, not 1). Scope the guard to this recipe's body, the same way the host-probe guard just below it already does. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * docs(test): describe what the readiness suite actually proves The file header and curl-stub comments described an earlier revision of this suite, from before the readiness probe moved into the guest (#220): they claimed the two-condition check was exercised by routing requests through the curl stub and parsing the body with jq. Nothing does that at head, and the check is jq -r .status, not jq -e. Rewrite the header to state the split the suite actually implements: the host-side loop (marker, target death, deadline, log tail) is executed for real against the sandboxed recipe, while the in-guest two-condition check is pinned by fixed-string greps because it can only run inside the booted guest. Correct the near-miss test's comment, which claimed exact-line matching that the recipe's unanchored grep does not do, and the refute_host_probe_attempted comment, which described a URL-shaped match it no longer performs. Drop the CURL_HEALTHZ_EXIT/CURL_HEALTHZ_BODY/CURL_ROOT_EXIT/CURL_ROOT_CODE knobs: no test sets them, the host never invokes curl, and one test asserts exactly that. The stub keeps its call logging, which refute_host_probe_ attempted needs, and now fails loudly if the host ever does probe. No behavioural assertion changes; 12/12 still pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: Danathar <Danathar@users.noreply.github.com> Signed-off-by: Douglas Baggett <doug.baggett@gmail.com> Co-authored-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: hive-scanner <223556219+Copilot@users.noreply.github.com> * feat(installer): add opt-in PXE network DDI pull (#229) Extend the installer wrapper (bluefin-sysinstall) to honor inst.* kernel cmdline parameters so PXE/netboot clients can download the OS DDI over the LAN instead of reading the embedded bluefin-installer-data partition: - inst.ddi_url=<url> fetches the zstd-compressed DDI via curl after systemd-networkd-wait-online brings up DHCP. - inst.ddi_sha256=<hex> is mandatory when inst.ddi_url is set; the download is verified before the target disk is touched (fail closed). - inst.target_disk=/dev/... overrides first-writable-disk auto-detection. The downloaded DDI is stream-decompressed with zstd and fed into the native systemd-sysinstall flow by staging a temporary /usr/lib/repart.sysinstall.d/ override whose 20-root-a.conf CopyBlocks= points at the downloaded image — no custom installer logic. Without inst.ddi_url the embedded path is byte-for-byte unchanged, and the hard preflight for the embedded partition is skipped under PXE. Add curl + zstd to installer-stack.bst. Part 1 (standalone PXE kernel/initrd export) already landed in main; this completes issue #14 Part 2. Assisted-by: lemonade/Ornith-1.5-35B-A3B-GGUF-Q6_K via GitHub Copilot Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * build: os-base option to compare FSDK payload against Flatcar reference (#163) * build: add os-base option to build-ddi for FSDK/Flatcar parity harness projectbluefin/server#129 wants an os-base: fsdk | flatcar-reference option so the FSDK-composed payload and the imported Flatcar reference can be built from one tree and diffed. build-ddi now takes an OS_BASE parameter (default fsdk) and routes to the matching element: fsdk -> oci/bluefin-server-ddi.bst (shipped payload) flatcar-reference -> oci/bluefin-server-ddi-flatcar-reference.bst, added alongside the #126 imported Flatcar tree The flatcar-reference route refuses with a pointer to #126 until that element exists, and an unknown base is rejected. The default path is unchanged, so CI's 'just build-ddi' keeps building the FSDK payload. Adds a bats test covering the routing and guards. Assisted-by: lemonade/Ornith-1.5-35B-A3B-GGUF via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> * fix: resolve flatcar-reference element against elements/ in build-ddi The build-ddi os-base=flatcar-reference guard tested `-f "oci/bluefin-server-ddi-flatcar-reference.bst"`, but project.conf declares `element-path: elements`, so the element file lives at `elements/oci/bluefin-server-ddi-flatcar-reference.bst`. The guard could therefore never be satisfied and the flatcar-reference route was permanently unreachable, matching the Justfile's existing convention of referencing element files as `elements/...` on disk. The bats test asserting the refusal passed for the wrong reason: it ran against the repo root where no `oci/` directory exists at all. It now runs against a sandbox that holds a decoy at the bare `oci/` path and nothing under `elements/oci/`, so it fails if the guard resolves the wrong path and stays a genuine refusal test once the #126 element lands. Assisted-by: Claude Opus 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(build): stop interpolating os-base into the build-ddi recipe body just substitutes {{...}} textually into the recipe body before bash parses it, so `case "{{OS_BASE}}"` made the argument executable: $ just build-ddi '$(echo PWNED >&2)' PWNED PWNED ERROR: unknown os-base '' (expected 'fsdk' or 'flatcar-reference') It ran twice -- once at the case, once in the error echo -- so even the rejection path executed it, and the message that was supposed to name the bad value printed empty because the substitution had consumed it. Exporting the parameter (`build-ddi $OS_BASE="fsdk"`) hands it to the recipe as an environment variable, so bash only ever sees "$OS_BASE" and never expands the caller's text. Same invocation now prints the payload verbatim and exits 1. Only the local invoker could reach this, and it matches the existing {{ARGS}} pattern in the bst recipe, but os-base is a fixed enum of two values and has no reason to be interpolated at all. Adds two regression tests: one asserts no {{OS_BASE}} remains in the recipe body, the other passes $(touch <marker>) and asserts the marker is absent. The marker matters -- the payload's own text necessarily appears in the rejection message, so a string assertion could not distinguish echoed from executed. Both fail against the previous Justfile, along with the parameter-shape guard. Also documents os-base in docs/skills/ddi-installer-build.md, which still showed a bare `just build-ddi` and is what operators drive the #129 parity harness from: a Payload base section covering both values, the #126 refusal before the reference element exists, and the fact that export-ddi does not forward os-base, so the reference tree stays a comparison input and never becomes a release artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> --------- Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * feat(flatcar): add flatcar-usr.bst importing Flatcar /usr as the OS payload base (#140) * feat(flatcar): add flatcar-usr.bst importing Flatcar /usr as the OS payload base - Add elements/flatcar/flatcar-usr.bst to import Flatcar /usr as the OS payload base - Mirror flatcar-zfs.bst with single pinned remote source flatcar-container.tar.gz - Set strip-binaries to empty string to prevent stripping prebuilt binaries - Flatten Flatcar's nested usr/lib/modules/<kver>/<kver>/ layout - Explicitly remove Flatcar's update and provisioning stack with replacement comments - Preserve usr/lib/flatcar/bootengine.img for stage-2 kernel boot - Add contract tests in tests/unit/test_flatcar_usr.py Assisted-by: Gemini 3.8 Flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * fix(flatcar): strip /usr/lib/modules to avoid collision with flatcar-kernel Removes dead nested module flattening code and strips /usr/lib/modules from flatcar-usr.bst completely so kernel modules are exclusively managed by flatcar-kernel.bst. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(flatcar): remove update-engine and cloudinit systemd units and drop-ins Address review feedback: - Explicitly remove update-engine and update-engine-stub units, timers, and multi-user.target.wants symlinks - Remove enable-oem-cloudinit and oem-cloudinit units and wants symlinks - Remove locksmithctl, ignition-rmcfg, and update tmpfiles configuration - Update unit tests to mock and assert absence of all removed units, binaries, and configs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * style(flatcar): drop unused findutils build-dependency from flatcar-usr.bst The install-commands script only uses mkdir, tar, and rm, making findutils unnecessary. Update unit contract tests accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> --------- Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> * fix(flatcar): use flatcar-kernel-container-sha256 variable in flatcar-usr.bst (#236) Co-authored-by: castrojo <castrojo@users.noreply.github.com> * refactor(arch): split release-version into installer and Flatcar axes (#136) * refactor(arch): split release-version into installer and Flatcar axes Split the single release-version axis in project.conf into two independent axes: - installer-version: FSDK point release describing the installer - flatcar-version: Flatcar LTS release describing the OS payload Update .github/scripts/check-release-version.py to independently validate both axes against their respective pins (freedesktop-sdk.bst junction ref for FSDK, include/flatcar.yml for Flatcar). Update unit tests in tests/unit/test_release_version.py to cover the two-axis contract, and update element asset naming and os-release metadata. Closes #125 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * docs: update stale release-version references and clarify flatcar-version declaration Updates avoid-over-engineering.md and ddi-installer-build.md to reference the split axes (installer-version and flatcar-version), noting that release tags track the installer axis while the DDI and UKI track Flatcar. Also adds a comment in project.conf explaining why flatcar-version is deliberately declared there in addition to include/flatcar.yml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor(arch): declare flatcar-version only in include/flatcar.yml project.conf restated flatcar-version alongside include/flatcar.yml, whose own header declares it the single source of truth for the Flatcar axis. Add include/flatcar.yml to project.conf's existing (@) include list instead, so %{flatcar-version} and %{flatcar-kver} resolve project-wide from one declaration, matching the k0s axis precedent. check-release-version.py no longer compares two copies of the same fact: it validates project.conf's installer-version against the freedesktop-sdk junction ref and that include/flatcar.yml declares a well-formed flatcar-version. Stale standing fact in docs/skills/index.md replaced with the two-axis description this refactor introduces. Assisted-by: Claude Opus 4.6 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor(arch): update check-k0s-version guard and k0s.yml comment for split axes - Guard check-k0s-version against %{installer-version} and %{flatcar-version} in addition to %{release-version} - Update header comment in include/k0s.yml referencing split axes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> * fix(test): update test_main_rejects_fname_on_the_os_release_axis assertion string --------- Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jorge Castro <jorge.castro@gmail.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> --------- Signed-off-by: kylerankin <kylerankin@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Signed-off-by: hive-agent <hive-agent@users.noreply.github.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Signed-off-by: Douglas Baggett <doug.baggett@gmail.com> Co-authored-by: James Reilly <jreilly1821@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: castrojo <castrojo@users.noreply.github.com> Co-authored-by: Jorge Castro <jorge.castro@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: hive-agent <hive-agent@users.noreply.github.com> Co-authored-by: ci-maintainer <ci-maintainer@users.noreply.github.com> Co-authored-by: Bob Killen <killen.bob@gmail.com> Co-authored-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com> Co-authored-by: Danathar <Danathar@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: mendezr <18744521+mendezr@users.noreply.github.com> Co-authored-by: Danathar <doug.baggett@gmail.com>
Refactor
Adds one file:
tests/unit/test_files_payload_reachability.py. No element,payload, workflow, or document is modified.
Cluster claimed
tests/unit/test_files_payload_reachability.pyelements/**/*.bst(parsed forkind: localpath:sources), the
files/tree listing.elements/bluefin-server/os-stack.bst,elements/oci/k0s-sysext.bst,files/k0s/sysext/k0s-manifests.conf,tests/unit/test_k0s_manifests.py,tests/unit/test_kubestellar_kiosk.py,.github/scripts/docs-checks.py,files/installer/repart.d/**,include/flatcar.yml,elements/flatcar/**,renovate.json,files/bin/**,docs/**.The structural problem
files/is the image-payload tree. A file reaches an image only when someelement stages it with a
kind: localsource:Nothing cross-checks the two sides. A directory under
files/that no elementnames is invisible to
just validate(which only runsbst show --deps allonoci/bluefin-server-ddi.bst,oci/bluefin-server-installer.bst, andoci/k0s-sysext.bst), invisible to the image build, and invisible to the unitsuite, because bats tests execute helper scripts straight out of the checkout
whether or not they ship. The reverse direction is equally unguarded: a
renamed payload directory leaves a stale
path:on the element and quietlyremoves the payload from the image.
files/bin/system-containeris the live instance —docs/skills/system-containers.mdcalls it "
/usr/bin/system-container... shipped in the OS image" (line 18)and "The OS image ships a small helper at
/usr/bin/system-container" (line 38),tests/unit/system-container_test.batscovers it, and no element stages it.Full analysis in #154.
What the gate asserts
test_declared_source_paths_exist— everykind: localpath:declared byany element still exists on disk (parametrized per declared path).
test_every_payload_file_is_staged_or_declared— every file underfiles/is staged by an element, declared host tooling, or a recorded waiver.
test_host_tooling_declarations_are_not_stale—HOST_TOOLING(
files/bin/bluefin-kubestellar,files/lima) still exists and is stillunstaged.
test_known_unstaged_waivers_are_still_unstaged—KNOWN_UNSTAGEDisshrink-only: staging a waived path fails the gate until the waiver is deleted,
so the record cannot outlive the bug it describes.
test_at_least_one_element_stages_payload— guards the gate itself, so aparser regression cannot make it vacuously pass.
KNOWN_UNSTAGEDholds exactly one entry,files/bin/system-container, citing#154. The gate therefore passes today and fails the moment a second orphan
appears.
Deliberately not fixed here
Staging
system-containerinto the image is a behaviour change (it adds abinary to the shipped OS) and correcting the skill is a documentation decision.
Both belong to a maintainer. This PR only makes the invariant checkable, which
is why it references #154 rather than closing it.
Verification
python3 -m pytest tests/unit -q→235 passed, 1 xfailed(was211 passed, 1 xfailed; +24 from this file, all parametrized or new).python3 .github/scripts/docs-checks.py→Docs checks passed.files/os/orphan/thing.conf→ fails withassert not ['files/os/orphan/thing.conf'];files/os/ssh→ fails withelements/bluefin-server/os-sshd-config.bst declares a kind: local source path that does not exist: files/os/ssh;files/bin/system-container→ fails withfiles/bin/system-container is now staged by an element. Remove it from KNOWN_UNSTAGED.Picked up automatically by
just test-unitand.github/workflows/unit-tests.yml;no workflow change needed.
Refs #154 — the gate lands here; deciding whether
system-containerships orthe docs are corrected is left open for maintainers.
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-5