Enforce payload layer-size budget against real history; add bootc signing runbook - #18
Merged
Conversation
The layer-SIZE half of test-containerfile-layer-budget.sh never actually ran: os-e2e invoked the guard only at the pre-build "Validate scripts" step, before build-iso.sh produced andromeda-v1-history.json, so the size check always emitted ANDROMEDA_CONTAINERFILE_LAYER_SIZE_SKIP and the default single-layer ceiling was untested against reality. That leaves the real failure mode uncaught: an over-consolidated payload layer overflowing the installer /var/tmp overlay during bootc staging (the recent outage). Split the guard into count/size/all modes (ANDROMEDA_LAYER_BUDGET_MODE): - count runs pre-build (static Containerfile DNF-layer floor, no image). - size runs post-build against the real history and FAILS, rather than skipping, when the history JSON is missing, so it can never silently no-op again. - all (default) keeps the guard unit-runnable, skipping size when no image has been built. The size check now always prints ANDROMEDA_MAX_PAYLOAD_LAYER_BYTES_OBSERVED=<n> threshold=<t> on both pass and fail, so the real baseline is greppable from CI logs. The default ceiling is lowered to a 3 GiB headroom value chosen to PASS the known-good image on the first post-build run while still catching gross over-consolidation; a comment and the failure message direct maintainers to read the OBSERVED line and tighten toward OBSERVED + margin once CI reports the real max. os-e2e now runs count pre-build and size post-build (before the long install so it fails fast). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Installs point --target-imgref at the mutable, unsigned ghcr.io/oratis/andromeda:edge (security-review.md finding #4). A strict signing policy cannot be turned on now: no real signing key exists, and a fail-closed policy.json would reject every registry pull and break the unsigned :edge update flow that os-e2e exercises. Ship a template and runbook only, without changing the effective policy: - os/signing/policy.json.example is a strict sigstore policy (default reject; cosign-verified ghcr.io/oratis/andromeda over docker; local containers-storage/oci/dir still accepted so offline install and the E2E OCI import keep working). It lives outside os/files/ so COPY os/files/ / can never install it as /etc/containers/policy.json; the image keeps the Fedora default (insecureAcceptAnything) and :edge pulls are unaffected. - installable-preview.md gains a runbook section, explicitly marked NOT YET ENFORCED, covering the cosign sign release step and how to activate enforcement once a key exists. - both kickstart --target-imgref comments now point at the template and runbook. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The first post-build guard run on this branch reported ANDROMEDA_MAX_PAYLOAD_LAYER_BYTES_OBSERVED=1289780224 (~1.20 GiB) for the known-good 23-layer payload, so the 3 GiB placeholder left 2.5x headroom -- too loose to trip before a consolidated payload transaction overflows the installer /var/tmp overlay. Tighten the ceiling to 2 GiB (~1.66x observed): the real image still passes with room for package growth, while a 2.5 GiB consolidated layer now fails (it passed under the placeholder). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Layer-size budget now actually runs (os-infra review #5)
The layer-SIZE half of
test-containerfile-layer-budget.shhad never run against a real image: os-e2e invoked the guard only at the pre-build Validate scripts step, beforebuild-iso.shproducedoutput/andromeda-v1-history.json. It therefore always emittedANDROMEDA_CONTAINERFILE_LAYER_SIZE_SKIP reason=no-history-json, leaving the default single-layer ceiling untested — so the real failure mode stayed uncaught: an over-consolidated payload layer overflowing the installer/var/tmpoverlay duringbootc install(the recent outage).count/size/allmodes (ANDROMEDA_LAYER_BUDGET_MODE). os-e2e runscountpre-build (static Containerfile DNF-layer floor, no image needed) and a newsizestep post-build against the real history, placed before the long install so it fails fast.sizemode FAILS (does not skip) when the history JSON is missing — the guard can never silently no-op again.all(default) keeps it unit-runnable, skipping size when no image is built.ANDROMEDA_MAX_PAYLOAD_LAYER_BYTES_OBSERVED=<n> threshold=<t>on pass and fail, so the real baseline is greppable from CI logs.3221225472) chosen to PASS the known-good image on the first post-build run while still catching gross over-consolidation. A comment and the failure message tell maintainers to read the OBSERVED line and tighten towardOBSERVED + marginonce CI reports the real max.The real observed baseline must be read from this PR's os-e2e run and the threshold tightened in a follow-up if warranted (I cannot build the ISO locally).
bootc signing: documented, NOT activated (security review #4)
Installs point
--target-imgrefat the mutable, unsignedghcr.io/oratis/andromeda:edge. A strict signing policy cannot be enabled now: no real key exists and a fail-closedpolicy.jsonwould reject every registry pull and break the unsigned:edgeupdate flow os-e2e exercises.os/signing/policy.json.example— strict sigstore template (default reject; cosign-verifiedghcr.io/oratis/andromedaoverdocker; localcontainers-storage/oci/dirstill accepted). It lives outsideos/files/, soCOPY os/files/ /can never install it as/etc/containers/policy.json; the image keeps the Fedora default and:edgepulls are unaffected. The effective enforced policy is unchanged.docs/development/installable-preview.mdgains a runbook section (explicitly NOT YET ENFORCED) covering thecosign signrelease step and how to activate enforcement once a key exists.--target-imgrefcomments now point at the template and runbook.Validation
shellcheck os/scripts/*.sh os/installer/*.sh os/files/usr/libexec/*— clean.andromeda-v1-history.jsonunder threshold passes, over threshold prints OBSERVED and exits non-zero;sizemode hard-fails on missing history.os-e2e.ymlparses (PyYAML); new size step sits after build, before install.