Skip to content

KVM leg: USB-stick rig updates over on-demand Tor into the spare slot and self-commits #4543

Backlog

Description

@pithead-architect

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 rigmedia phase 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-base served via _serve_update_dir, bundle built by _build_bundle, running version aged with aged_version) and a local Tor fixture.
  • The update writes the idle slot; after reboot rig-update.json settles updated, the new slot self-commits, _rig_mining_up passes, and role, rig.json, the ACCESS_TOKEN and the miner rig-id are 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 tor empty 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.md and docs/dev/testing-strategy.md record what is automated and what stays manual (real stick wear, firmware).

Possible solutions

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

  1. added this to the v2.1.0 milestone on Nov 27, 2026
  2. added
    testing
    appliance
    needs-triage
    size:M
    on Nov 27, 2026
  3. added
    bug
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appliancebugneeds-triagesize:Mtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions