fix(os): one baked-image loader for both boot owners; the battery now proves containers refresh - #807
Merged
VijitSingh97 merged 5 commits intoAug 1, 2026
Conversation
…as red on the branch Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… now proves the containers refresh (#798) The sha-keyed archive loader lived twice: the wizard's copy (stamp-file semantics, wizard path only) and the boot-path loop added for the live find. Now there is one function — load_baked_images in the pithead CLI, exposed as 'pithead load-images' — keyed on the archive digest recorded beside the store on /data. pithead-boot runs it every provisioned boot; the first-boot wizard calls the same function, naming the image it needs so a wiped store forces a load past a stale record. Keep-reinstalls, A/B updates and first boots all converge on the shipped images the same way. Coverage, per the issue: - update phase: harness builds stamp a marker INTO the dashboard image (served at /static/os-test-marker.txt); after the committed update the page served must carry the NEW image's marker — the tag never changes, so 'containers run' proves nothing about staleness. - install phase keep leg: reinstall from a NEWER stick over a /data that already holds the old dashboard image and its digest record; the image ID must change and the served page must come from the newer image. - provision phase: digest records are dropped with the corrupted Caddyfile before the unaided reboot and must come back — pithead-boot itself running the loader on a provisioned machine. - tier 1: load_baked_images tested against a stub engine — first-boot load, unchanged-archive skip, changed-archive reload, missing required image, and no record on a failed load. Closes #798. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed digest just reloads next boot Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verifier finding on the shared loader: machines provisioned before the record moved beside the podman store still carry .wizard-image-sha; the loader now removes it, at the cost of one reload on the first boot after upgrading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ix/798-baked-images-boot-path # Conflicts: # docs/dev/appliance-wizard.md
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.
Closes #798.
Commit 838a18d put a loader loop into
pithead-boot; this PR finishes the job the issue asks for: one shared mechanism, and a battery that can actually catch the regression.One loader, both boot owners
load_baked_imagesnow lives in thepitheadCLI (exposed as plumbing:pithead load-images). Digest-keyed: sha256 of each/opt/pithead/imagesarchive against a record at/data/pithead/data/.loaded-<archive>.sha— beside the store it describes, same path the committed boot loop already used. Load on mismatch, record only on success (a failed load must retry next boot, not skip).pithead-bootcalls./pithead load-imagesbeforerender/up— every provisioned boot, so keep-reinstalls and A/B updates converge without wizard involvement..wizard-image-shastamp) is gone;firstboot_wizardcalls the same function, naming the image it needs so a wiped store forces a load past a stale record (the one behavior the wizard had that the boot loop lacked). The old stamp file is simply orphaned; first boot on this build reloads once and starts the per-archive records.What the next KVM battery will assert (NOT run here — see below)
os/build-image.sh: harness builds (PITHEAD_TEST_MARKERset) stamp the marker into the dashboard image at a served path (/static/os-test-marker.txt), as an extra layer. Release builds are unchanged. This makes v1/v2 dashboard archives actually differ and lets the battery see WHICH image answers./datapre-planted with the old dashboard image and its digest record (viapodman --rootfrom the installer VM — the exact machine state that hit the bench). Asserts the dashboard image ID changed and the served page carries the newer marker.pithead-bootitself (not the wizard) running the loader on a provisioned machine.Tier 1
tests/stack/run.shreplaces the old sha-modeling block with tests of the real function against a stub engine: first-boot load, unchanged-archive skip, changed-archive reload, missing-required-image force, and no-record-on-failed-load.Docs
docs/dev/appliance-wizard.mdboot contract is now four steps (images are derived, converged every boot);docs/dev/appliance-release.mdbattery table updated with the new assertions and counts.Verified locally
make lintgreen (includes shellcheck/shfmt, docs voice, operator strings — the new console/help strings carry no issue numbers). The branch'smake lintwas red on an unrelated import sort intest_data_service.py; fixed in its own commit.tests/stack/run.sh: 1807 passed, 0 failed (includes the 6 new loader assertions).build/dashboardpytest for the touched test file: all pass.pithead load-imageswith a stub podman — one load, digest recorded, second run a silent no-op, option rejection works.Not verified
The KVM battery (
tests/os/run.sh) has not run — it needs the bench. The new update/install/provision assertions are untested against a live VM; the next battery run exercises them, and the keep leg'spodman --rootplant is the piece most worth watching on that run.🤖 Generated with Claude Code