Repository navigation
Description
What's the problem
The remaining scope of pithead#3911 is its PR B: a new opt-in realupgrade KVM phase (that issue's acceptance criteria 1-5 and 7, per the architect's standing ruling there). PR A (#3922) has merged — the cheap dashboard/fault-leg assertions, failure artefacts and the releasing.md binding. Today no KVM scenario upgrades a guest the way an owner's appliance is upgraded: crossupdate is opt-in, installs with a bare rauc install and stops minutes after commit; the update legs fake an older VERSION; no tier-4 row reads a rolled_back verdict or its blocking list. That gap let the 2026-11-02 field rollback of v2.0.2 pass every release job. Its root causes #3909 and #3910 are now fixed (PRs #3919 and #3914, merged), so the owner-level scenario phase is the reproduction proof for them.
What it impacts
Every appliance owner who takes an OS update — the default update path — and the release battery's assurance on it.
How I found it
This is a split chunk of #3911 handed to a local session whose group was too large; it carries the issue's own PR B under the architect ruling there (answers to that issue's seven questions are recorded there and baked into the criteria below).
How important is it
High (per #3911): the release battery gives false assurance on the default update path, and this phase is the proof #3909/#3910 stay fixed.
Acceptance criteria
- New phase tests/os/phases/realupgrade.sh, opt-in and excluded from
--phase all, registered in tests/os/run.sh (phases block, the--phaseusage list, source line and dispatch) so bench-ci's tier4 phase allowlist accepts it. It starts from the published N-2 GitHub release image (checksum verified, fetched the way crossupdate fetches its old image), provisions through the wizard, and updates to N-1 through the dashboard (check, download, verify, install, typed REBOOT), requiringoutcome=updatedand a committed slot. - The guest is aged fresh every run from fixtures: a chain-data sentinel/pruned fixture, a warm Tor directory from a real boot, public-address-only test wallets, a config customized through the dashboard API (pinned dashboard host name, non-default stratum port, changed dashboard password), a certificate minted by the old version with a late ULA address (extending tests/os/image-upgrade-certificate-leg.sh), and at least one stratum client.
- The candidate is built from the exact SHA with the real bundle layout; images come by the digests the tree pins (never the LAN debug registry); cosign verification runs through the release's code path, signed with a test key in CI. If unpublished candidate digests need a staging-registry mirror, that part is infra and reported as such; the rest lands without it.
- Installed through the dashboard with a real in-flight flag, following every prompt an owner would: no reboot is offered while the new slot verifies;
outcome=updatedand norolled_back; no reboot other than the ordered one; time-to-commit recorded against a named budget (the boot-gate timeout plus 50%). - After commit, a named 10-minute soak window with one extra reboot: doctor passes without PITHEAD_BOOT_GATE=1, no failed units, slot good; config still saveable and unchanged; wallets, login and chain sentinels intact; TLS fingerprint and SANs unchanged; mDNS name resolves; the stratum client stays connected with accepted shares.
- Negative control B: a hard reset of the uncommitted slot rolls back with an explicit recorded cause, and the old version's configuration stays saveable (Dashboard asks for a second reboot while the new slot is verifying, which rolls back a healthy update #3909/A rolled-back update leaves config.json stamped by the newer version, so the old version blocks saving #3910 fixes are merged; read the tests PRs Refuse a second reboot while the new OS slot is still verifying (#3909) #3919/Defer the config_version stamp until the booted slot commits (#3910) #3914 already add and do not duplicate them — this asserts the owner-level scenario). Show each Dashboard asks for a second reboot while the new slot is verifying, which rolls back a healthy update #3909/A rolled-back update leaves config.json stamped by the newer version, so the old version blocks saving #3910-dependent assertion red at the shipped v2.0.2 commit (or with the fix reverted) and green on your head, quoting both runs.
- On any failure the job saves the failed boot's
pithead-bootjournal, the verdict JSON, grubenv and doctor output. - Guest-less selftests for the new helpers under tests/os/selftest-*.sh, registered where CI runs them.
- The bench job is capped at 240 minutes: if the phase runs longer, split it into two jobs and say where. docs/dev/releasing.md lists the phase as a required job bound to the exact tag SHA, states the runtime, and requires crossupdate, provision and this phase to rerun after any post-battery change.
Possible solutions
- Assemble from crossupdate.sh (start guest), update-dashboard.sh (dashboard door and download seam), update-healthgate-leg.sh (fault bundle) and image-upgrade-certificate-leg.sh (late address); drive and read the guest through the dashboard API, serial console and libvirt, since the release image has no SSH.
- Traps to check first: tests/os/run.sh --help prints a fixed header range and pins the usage line — adding a phase touches both and has selftest coverage; docs/dev/releasing.md's status-recipe block is pinned by tests/integration/selftest/selftest-release-status-recipe.sh, whose stale pin aborts the whole selftest loop. N-2 images land in the job's own workspace or crossupdate's cache; creating a new persistent bench directory is a host change to report as infra, never to make.
Parent: #4160
Worker brief: Test tier: tier4-kvm, the realupgrade phase alone, one phase at a time, plus tiers 1-3 green for the selftests and run.sh registration.
Objective: land #3911's PR B — the new opt-in realupgrade phase with acceptance criteria 1-5 and 7 exactly as this child issue lists them (aged N-2 guest, dashboard install of the exact-SHA N-1 candidate with a real in-flight flag, prompt-following asserts, 10-minute soak with one extra reboot, hard-reset negative control with the #3909/#3910 asserts now that PRs #3919/#3914 have merged, failure artefacts, selftests, releasing.md requirement). The architect's limits are already baked into the criteria: fixtures-built aged state each run, published release assets with checksums for N-2, test cosign key in CI, named constants for the soak and commit budget, opt-in outside --phase all, and a report-as-infra escape for the staging-registry part of the candidate rule.
Register the phase in tests/os/run.sh (usage list included, or bench-ci refuses the phase at submit) and check the run.sh --help header pin and the releasing.md status-recipe pin before pushing. Show every new assertion and negative control red with its guard broken, then green, and quote the tier4-kvm jobs on the final head with unedited bench-ci evidence blocks; the phase may need two jobs under the 240-minute cap — say where. No comments in code. The PR body carries Closes #3911 on a line of its own plus its own child issue's keyword, and lists the Decisions taken inherited from the architect ruling.
Activity
pithead-developer commentedon Nov 18, 2026
Grouped with #4191, but PR #4256 does not close it: Its proof is the new opt-in realupgrade tier4-kvm phase itself (up to 240-minute jobs, N-2 release-image fetch, aged fixtures) — a different bench tier and job than the tier4-e2e evidence this group's diff needs, and the acceptance criteria already anticipate splitting it across jobs. It needs its own session and its own jobs; a dedicated session for it has been started meanwhile.. Released for its own pick.
pithead-developer commentedon Nov 19, 2026
Implementation reconnaissance (local session, no code landed)
The local session holding this issue completed the full seam survey before editing and is handing implementation on; nothing was pushed. Everything below was verified against the tree at
eb3381937(currentdevelop-v2.0.5tip). The group split applies: this issue keeps this branch for its own PR only.Registration checklist (mechanical, all verified)
tests/os/run.sh:|realupgradein the[--phase ...]usage printf (line 192 — bench-ci reads the phase vocabulary from this line at the submitted commit;bench_ci/catalogue.py:718_KVM_PHASE_REparses the checked-out file, so no bench-ci change is needed — the staticKVM_PHASEStuple feeds only tier display and bench-config group checks), headerPhases:entry stating it is not run by--phase all(mirror the crossupdate entry), re-count thesed -n '2,49p'range (nothing pins the number; wrong N silently truncates--help), source line with# shellcheck source=directive, and dispatch armrealupgrade) _run_phase realupgrade phase_realupgrade ;;. Do not add to theall)arm.tests/os/phases/realupgrade.sh: guard with# shellcheck shell=bash+: "${OS_RUN_SUITE:?source via the suite runner}"+OS_RESERVED_NODE_CONSUMER=0(precedentphases/tor-heal.sh:1-5;selftest-provision-legs.shpins the non-consumer selection).tests/os/selftest-run-modules.sh: in-place edits only to lines 4 (modules order — position must match the source lines), 5/12 (function completeness string — every top-level function of the new file, in source order), 69 (source the new file). File-budget ceiling: the file is exactly at its recorded 462 lines and ceilings only go down — zero net new lines.tests/os/selftest-marker-images.shscans every non-selftesttests/os/*.shfor_build_image/_build_bundlemarkers; reusecandidateor add the marker totests/os/dashboard-markers.jsonor CI fails.make test-integration-selftestglobstests/os/selftest*.sh(Makefile:60) — a new file is picked up with no registration.tests/os/README.md§Phases and the stale list at line 468;docs/dev/repo-map.mdopt-in-phase paragraphs near line 384;docs/dev/testing-strategy.mdan opt-in-phase row (precedents at ~388, ~567).The releasing.md landmine
tests/integration/selftest/selftest-release-status-recipe.shexecutes both pinned ```bash blocks ofdocs/dev/releasing.md§Which gates are automated and asserts exact payload shape: `length == 8`, `.[0:7]` slice, `.[7]` as the e2e job, the 11-line URL trace diff, and the failed-leg `== 7` count. Adding a realupgrade submission as a ninth payload requires updating all of those plus the prose counts (releasing.md lines 429/502/562/566, the `KVM jobs:` printf line 498) and `docs/dev/appliance-release.md:568` ("the seven ... jobs"). Acceptance criterion 9 (required job bound to the exact tag SHA, post-battery rerun of crossupdate/provision/realupgrade) extends the sentence at releasing.md line 509. A new phase as its own job in the recipe is unavoidable; folding it into an existing `phases` array breaks whole-array equality pins.Reusable seams (the phase is an assembly, per the issue's own list)
_vm_boot_disk(phases/boot.sh:240) then_wizard_provision_capture 0(phases/update.sh:239) — token off$SERIAL,/auth//submit//api/handoffover HTTPS, yieldsDASH_USER/DASH_PASS.HARNESS_WALLET(lib/core.sh:30) is already the public-address-only address. Post-provision readiness without SSH must poll/api/state(phases/update-dashboard.sh:41-82shows the readiness +.os_update.stepshape) —provisioning_settledis SSH-based and cannot pre-upgrade run._serve_update_dir+ theos-update-test-baseseam +releases-latest.json+aged_version+_os_step check/download/verify/install/reboot+ verify-window os-reboot refusal probe +outcome=updatedverdict wait (phases/update-dashboard.sh:84-399), in-flight flag read at line 285, persistedreboot-pending, boot-id discipline via_boot_id/_wait_new_boot.phases/image-upgrade.sh:63-101(fetch asset +.sig,cosign verify-blobwith repocosign.pub;fixtures/v1.20.0/generate.shadds thesha256sum -cpin pattern). Appliance assets arepithead-os-v<V>.img.xz+<asset>.sha256(scripts/release/package-appliance.sh:25,42). Derive N-2 as the greatest published tag below the tree'sVERSIONunless an env pin overrides.tests/os/image-upgrade-bundle.shsourcesscripts/release/bundle.sh(make_bundle) withCOSIGN_ENABLED=1and a generated key — but pulls stack images from$PITHEAD_REGISTRY(the LAN debug registry), which criterion 3 forbids. The realupgrade builder variant must take the five image refs from the tree's compose pins instead; the unpublished-digest/staging-mirror half is the issue's explicit report-as-infra escape.rolled_back+ blocking list off the persisted verdict (os-update-state.json) after avirsh destroymid-verify — update-dashboard leg 4 already proves the verify-window and refused-reboot probe; do not duplicate#3919/#3914rows.Decisions the implementer must take early (cheap to probe, expensive to guess)
os/rauc/mkbundle.sh:75,os/rauc/mkimage.sh:50); bench-ci itself refusesold_imagecaches "built with a different signing certificate". A dev-chain_build_bundlewill not install onto a guest running the release image unless the test trust cert is planted into the scratch old-image copy offline before boot (thelibvirt/qemu-nbdroute the issue names) oroptions.old_image_commit(nightly-cache images, which answer SSH and trust the dev chain) is accepted as "fetched the way crossupdate fetches its old image". Pick one and record it in the PR body under Decisions.os-update-test-base, chain sentinel and any backdating all need in-guest root before the upgrade; the wizard/dashboard APIs cannot write arbitrary paths. The offline scratch-image edit is the same class of honest seam as the nightly's baked test SSH key; document it.tests/integration/lib/mergemine-probe.sh; a bench-host stratum client against the guest's port with accepted-share monotonicity (crossupdate's/api/stateshare read atphases/crossupdate.sh:258is the pattern for the read side).Bench
--phase realupgrade,timeout-minutes 240(same window as tor-heal; the phase may need two jobs — say where, per criterion). Admission follows the usage line at the submitted SHA, so the first probe submission needs only this branch's head plus whatever old-image input the chosen decision requires.pithead-developer commentedon Nov 20, 2026
Questions before work continues (answer here, then remove the
questionlabel):Leave Tor recovery: clear the stale directory cache and catch a stale consensus or onion-only outage #4261 and Dashboard: treat RigForge control status busy as a terminal retry-later outcome and show its reason (#3985 slice 1/2) #4255 out of this PR and keep only
closes #4193(plus KVM: add a real-appliance upgrade scenario to the release battery and rerun it on the exact published SHA #3911 as the brief says)? Default: yes. Dashboard: treat RigForge control status busy as a terminal retry-later outcome and show its reason (#3985 slice 1/2) #4255 is already implemented by open PR fix(control): handle rigforge busy status, mark rig ownership in e2e (#3985) #4023 (develop-v2.1.0 base; busy status handled in both pollers, with tier4-e2e evidence), so fixing it here would duplicate that work. Tor recovery: clear the stale directory cache and catch a stale consensus or onion-only outage #4261 is a Tor entrypoint, tor-recover and heal-ladder change that needs tier4-e2e Tor proof and builds on unmerged Tor auto-heal: advance past a rejected NEWNYM to state reset and restart (#4075) #4095. Putting it beside a 240-minute KVM phase would couple two unrelated proofs.RAUC trust for the published N-2 image: which seam counts as 'fetched the way crossupdate fetches its old image'? Release images only trust the signing keyring baked at their build. A candidate bundle built from this tree with a CI test key therefore will not install onto a published release image. Default: fetch the published
pithead-os-v<N-2>.img.xz, verify its.sha256and cosign signature as image-upgrade.sh does, then plant the test trust cert and the aged state into a scratch copy offline withlosetup -Pf(the pattern tests/os/phases/rig.sh already uses; no new tool). The scratch copy is boot-identical to the release image apart from that cert, and I record the seam in the PR under Decisions. Alternative: take bench-cioptions.old_image_commit(a nightly-cache image, which already trusts the dev chain and has a baked test SSH key). That is cheaper but is not the published release image criterion 1 names. Which do you want?Is it acceptable that the PR adds a ninth payload to docs/dev/releasing.md's pinned status recipe? Default: yes. That means updating
selftest-release-status-recipe.sh(length 8 to 9, the slice and index pins, the URL-trace diff, the failed-leg count), the prose counts at releasing.md lines 429, 502, 562 and 566, and appliance-release.md:568 in the same change, with realupgrade as its own job bound to the tag SHA.Is this session's $16 budget enough, given that no guest can be run locally and every iteration is a bench job of up to 240 minutes? Default: yes for the draft PR with the phase, selftests, docs and the first targeted bench job, returning
waitingon it. If you want the phase split into two jobs from the start (provision plus aged upgrade, then soak plus negative control B), say so now; otherwise I split only if the first job exceeds the 240-minute cap.pithead-architect commentedon Nov 20, 2026
Ruling: Take your defaults, with the limits below. The architect's ruling on #3911 (2026-11-06) already closed the question rounds for this work: from here on, list each choice under "Decisions taken" in the PR body and come back only for a product decision. (1) Yes. Keep #4255 and #4261 out of this PR. The PR carries
Closes #3911andCloses #4193, each on a line of its own, and no keyword for either of the other two. Release them back to the queue with a one-line reason: #4255 is #3985 slice 1, which PR #4023 covers, and #4261 is Tor tier4-e2e work that builds on PR #4095. (2) Take the published-image seam. Fetch the published N-2pithead-os-v<N-2>.img.xzand verify its.sha256and cosign signature the wayimage-upgrade.shdoes. Then patch a scratch copy in the job workspace offline withlosetup -Pf, the patterntests/os/phases/rig.shalready uses. Four limits apply. (a) Add the test trust next to the release trust, never in place of it, and do it in every anchor the N-2 update path checks: the RAUC keyring, plus the cosign public key the N-2 dashboard verifies with if that is a separate file. (b) Patch only when the candidate is test-signed. The rerunreleasing.mdrequires on the signed release artefacts for the tag SHA must boot the published image unmodified. (c) The phase records the published image's sha256 and each path it planted. If the patched copy fails to boot, or the rootfs is integrity-protected so an offline edit cannot hold, stop and report what you saw. Do not switch to the nightlyold_image_commitimage: AC 1 names the published release. (d) Use only the job workspace or crossupdate's existing cache. Any new persistent directory on a bench isinfra. (3) Yes. Add the payload to the status recipe and update every pin in the same change:selftest-release-status-recipe.sh(the length, slice and index pins, the URL-trace diff, the failed-leg count), the prose counts indocs/dev/releasing.md, andappliance-release.md:568. Bind it to the tag SHA. If the phase ends up as two jobs, that is two payloads, and the pins follow. (4) The session budget is the runner's business, not a question. Open the draft PR with the phase, selftests and docs, submit one targetedtier4-kvmrealupgradejob on the head, and returnwaitingwith it inbench_jobs. Don't split in advance. Do make the negative-control-B leg selectable on its own from the start, and log a timestamp for each leg, so that a split, if the first job shows the phase needs one, is a submit option and not a rework. Proof is unchanged: every new assertion and negative control is shown red with its guard broken (the #3909/#3910 ones at the shipped v2.0.2 commit or with the fix reverted) and green on your head, quoted withbench-ci evidence <id>@<sha>.pithead-developer commentedon Nov 21, 2026
Questions before work continues (answer here, then remove the
questionlabel):AC6 (F4274-1): may the green run of the rollback-cause rows be deferred, tracked in os: realupgrade phase fidelity gaps left by #4193 (aged Tor and ULA certificate, accepted shares, digest-pinned signed candidate, typed REBOOT) #4338, until a published N-2 carries the Dashboard asks for a second reboot while the new slot is verifying, which rolls back a healthy update #3909/A rolled-back update leaves config.json stamped by the newer version, so the old version blocks saving #3910 fixes? Default: no; I first try the reviewer's untried route, a head-built old slot with a lower VERSION baked into the image, for one or two bench runs, and come back if pithead-boot still records
updated. The newest published tag, v2.0.3, predates the fixes, and a head-built old slot that shares the candidate's VERSION recordsupdatedafter a hard reset (jobs 786 and 471).AC1 to AC5 (F4274-2): do you accept narrowing os: realupgrade phase — an aged N-2 appliance upgraded through the dashboard, required in the release battery (#3911 PR B) #4193 to what the phase proves, with the rest moved to os: realupgrade phase fidelity gaps left by #4193 (aged Tor and ULA certificate, accepted shares, digest-pinned signed candidate, typed REBOOT) #4338, and the PR keeping
Part of #4193instead of closing it? Default: yes. The items moved are the typed REBOOT (a UI-only gate with no API surface), the warm Tor and pruned-chain fixtures and the late-ULA certificate, the digest-pinned cosign-signed candidate (the staging-registry half of AC3 is infra), and accepted shares (the bench has no synced chain behind the proxy; the phase proves an accepted stratum connection).Limit (b) (F4274-4): do you accept that the phase always patches the scratch N-2 copy? It appends the test signer to the RAUC keyring beside the release cert, and sets
/etc/pithead-variant=debugbecause the dev-chain candidate is a debug build and the dashboard refuses a variant change. Default: yes. The phase can only build a dev-signed candidate, so a 'patch only when test-signed' condition would never be false, and the unmodified signed-release boot is already proved by the release gate's provision and crossupdate jobs on signed artefacts.2 remaining items
pithead-developer commentedon Nov 27, 2026
Waiting on a transient artifact_read condition, not on another issue. bench-ci evidence 397@6e975c14f394f36c9d5bc30ca0edc90d5de80427 fails with 'Connection refused' on all five client retries, and again on my own retry after a minute. The runner re-checks it (first at 2026-11-27T07:45Z, at most 5 times).
pithead-developer commentedon Nov 27, 2026
Blocked on #4537. The PR is blocked on #4537. The only failed required check on head f6b8dc4 is Build image (dashboard), and this PR's code did not cause it. Trivy flags
libzstd1CVE-2026-124851 (HIGH, fixed in 1.5.7+dfsg-1+deb13u1) in the debian 13.7 base image (run 46040382195). The PR changes no Dockerfile or image input; its diff is limited to tests/os, tests/integration/selftest and docs. The fix is open as draft PR #4563 against develop-v2.0.5. Done: the realupgrade phase, selftests and docs, with passing tier4-kvm jobs 784, 605 and 787 and red job 603 quoted. After #4563 merges and closes #4537, I merge develop-v2.0.5 into this branch, wait for tiers 1-3 to go green, and run onerealupgradetier4-kvm job on the new head. Whoever merges #4563 unblocks it. I posted this on PR #4274.The runner resumes this issue when that one closes.
pithead-developer commentedon Nov 28, 2026
Blocked on #4569. I am still blocked, now on the forward merge #4569. #4537 is closed, but its fix (#4604) landed on
develop.develop-v2.0.5receives it only through #4569 ("Forward-merge 2.0.4 into develop-v2.0.5"), which is still open. This branch already contains everything on origin/develop-v2.0.5 (tip 36c8af8), so there is nothing newer to merge. Build image (dashboard) stays red on head f6b8dc4 with the same libzstd1 CVE-2026-124851. I will not mergedevelopinto a tests/docs PR, since that would pull in unrelated post-2.0.4 changes. Done: the phase, selftests and docs, with tier4-kvm jobs 784, 605 and 787 passed and red job 603 quoted. After #4569 merges: merge develop-v2.0.5 in, confirm tiers 1-3 are green, and run onerealupgradejob on the new head. Whoever merges #4569 clears it. I posted this on PR #4274.The runner resumes this issue when that one closes.
tests/os: require the realupgrade rollback cause from v2.0.3 (#4193)
docs: name the e2e gate change for the split realupgrade jobs (#4193)
pithead-developer commentedon Nov 28, 2026
Waiting on a transient bench_outage condition, not on another issue. bench-ci coordinator refuses every connection (Errno 61) for health, log 4679 and submit over ~40 minutes; the tier4-kvm realupgrade-negctl submit on 2757b1a was lost after 5 attempts, retry with idempotency key 2d9937ba-2f15-4aaa-8cf9-0c19fe75a1b1. The runner re-checks it (first at 2026-11-28T19:21Z, at most 5 times).
pithead-developer commentedon Nov 29, 2026
Merged in #4274.
os: fix #4193 — realupgrade phase: an aged published appliance upgrad…