Repository navigation
Description
What's the problem
No test proves a stick-rooted rig can update. tests/os/phases/rigmedia.sh boots the 16G removable USB-bus guest but only proves the no-install facts (M14). The rig's own pithead rig-update check/update path (pithead#4013, open PR #4103, tests/os/rig-update-leg.sh) runs only on the disk-installed rig in tests/os/phases/rig.sh, and the token-authenticated check/update API (p2pool-starter-stack/rigforge#684) is exercised by no KVM leg. This is chunk 1 of the split of #4018; the stick's spare slot, the rig's own download, and Tor starting and stopping are unproven on the stick layout. Blocked by pithead#4013 (PR #4103, which must also land on develop-v2.1.0) and rigforge#684.
What it impacts
Dropping install-to-disk (#4019) and claiming stick updates would rest on an unmeasured layout: the spare-slot install, self-commit and /data identity across the slot swap are only proven on disk rigs.
How I found it
Split of #4018 (owner decisions of 2026-11-10, items 2, 5, 9, 11); docs/dev/rig-os-update.md follow-up table row 5 assigns the stick KVM legs to #4018.
How important is it
High for 2.1.0; it gates dropping install-to-disk.
Acceptance criteria
- A tier4-kvm leg on the
rigmediaphase boots a rig from a 16G USB-bus stick (the existing wizard submit shape,disk=usb), runs the API's check and update against the bench-local release seam (/data/pithead/os-update-test-baseserved via_serve_update_dir, bundle built by_build_bundle, running version aged withaged_version) and a local Tor fixture. - The update writes the idle slot; after reboot
rig-update.jsonsettlesupdated, the new slot self-commits,_rig_mining_uppasses, and role,rig.json, theACCESS_TOKENand the minerrig-idare unchanged — seed-and-hold per PR os: fix #3995 — automate battery M13: a rig Keep-everything reinstall KVM leg #4119's precedent; the rig-id row stays honestly red and named until pithead#4014 (rigforge#680) mints ids. - Tor is asserted not running before the check, after the check and after the update (
pgrep -x torempty between fetches). - A tier-1 selftest pins the leg's verdict logic; the leg cleans its fixtures (guest, served dir, seam file, aged VERSION) on failure like
_rigmedia_fail_cleanup. docs/dev/manual-qa/appliance/rig-battery.mdanddocs/dev/testing-strategy.mdrecord what is automated and what stays manual (real stick wear, firmware).
Possible solutions
- Extend
tests/os/phases/rigmedia.shwith the leg, reusingtests/os/rig-update-leg.sh(from PR appliance: fix #4013 — rig-side updater: signed bundle over Tor, spare-slot install, verdict in rig-update.json #4103) helpers rather than duplicating the seam dance; drive check/update through the rig's token API route once rigforge#684 lands, falling back to the verb call only if the API is the sole unlanded piece and say so in the PR.
Parent: #4018
Worker brief: Test tier: tier4-kvm (rigmedia phase), plus a tier-1 tests/os selftest for the verdict logic. Extend tests/os/phases/rigmedia.sh with a rig-update leg on the USB-bus stick layout; reuse the bench-local release seam (_serve_update_dir, /data/pithead/os-update-test-base, _build_bundle, aged_version) exactly as PR #4103's tests/os/rig-update-leg.sh does on the disk rig, and its --max-version/pending patterns only as style reference (chunk 2 covers refusals). Assert: check reports the seam release; Tor never runs except during a fetch (pgrep -x tor before/after); install lands the idle slot (rauc.slot cmdline), boot settles updated in /data/pithead/rig-update.json, mining resumes (_rig_mining_up), and role/rig.json/token/rig-id are unchanged (identity verdict + rig-id seeding per PR #4119; rig-id row honestly red until pithead#4014). Reboot and second-boot asserts per the existing rigmedia reboot leg. Fail-path fixture cleanup mirrors _rigmedia_fail_cleanup. Register the selftest where CI runs it; if you add a run.sh function, tests/os/selftest-run-modules.sh pins its function list and run.sh --help prints the header over a sed range that must move with it. Run make lint-file-budget and make lint-pithead-build on the changed files. No code comments, including develop-carried context lines in edited hunks. Prereqs: pithead#4013 (PR #4103) landed on this base and rigforge#684; if absent, return blocked naming them. Submit tier4-kvm phase rigmedia through $PITHEAD_DEVELOPER_ROOT/bin/bench-submit with --base develop-v2.1.0; a refusal citing the pre-forward-merge admission (#4175/#4502 open) is a condition per the base prompt, not a failure to work around.
Activity