feat(wizard): the role select — one stick, three machines (#797 R3) - #847
Merged
Conversation
The installer page's first disclosure, above the disk, is now what the machine IS: Pithead / Pithead + RigForge / RigForge. One page, three shapes, everything downstream reshaping exactly the way the disk choice already does. - Pithead: today's flow byte for byte — the default and the regression bar; every existing wizard test passes unchanged. - Pithead + RigForge: Pithead's form with the local-miner switch preset to Yes. The role IS local_miner.enabled, so this leg is fully live end to end on the shipped boot contract. - RigForge: the form collapses to a pool address (pre-filled by the host's LAN discovery of a Pithead at pithead.local:3333, published to the spool like the disk inventory, failing open to an empty field), a worker name defaulting to the machine's own, and an optional stratum password. The disk section gains "Run from this USB stick" as a first-class target for this role only; the card shows the worker name and where it points — a rig has no dashboard and no login. Validation-before-erase (the host dials the pool before anything irreversible), keep semantics (keep means KEEP in every role — no role change crosses a survivor), the card-then-ack gate, self-power-off and the headless first boot are identical in every role. The accepted role lands under the machine-role contract the boot path reads: /data/pithead/machine-role plus rig.json for the rig role; a disk install stages pithead-rig.json on the ESP (carried by pithead-install beside the other pre-seeds) and the target's first boot lands and scrubs it. The rig BOOT LEG belongs to the next phase: a rig-marked machine states its role on the console and stops — nothing mines yet, and the message says so. Also: _console now narrates every line to the journal, not just the first — messages that lived only on a physical console cost a bench session an hour once. Covered at the owning tiers: wizard pytest server contracts (73), frontend render probes (35), stack tests for the discovery publisher, rig consumption, the marker and the boot stub (1935 suite total), plus docs in docs/dev/appliance-wizard.md. Part of #797 (phase R3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 3, 2026
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.
Phase R3 of #797: the installer page's first disclosure, above the disk, is now what the machine IS — one select reading exactly Pithead / Pithead + RigForge / RigForge. One page, three shapes; everything downstream reshapes to the answer exactly the way the disk choice already reshapes the form.
The three shapes
local_miner.enabled, the switch below stays live, and R2's boot leg already honours it — this role is fully live end to end on the current image.pithead.local:3333, published to the spool asrig-defaults.jsonthe way the disk inventory travels, failing open to an empty field), worker name (defaults to the machine's own), optional stratum password. The disk section gains Run from this USB stick as a first-class target for this role only. The card shows the worker name and where it points — no dashboard credentials, because a rig has none.Identical in every role: validation-before-erase (the host dials the pool before anything irreversible, the same discipline
preflight_remote_nodesgives remote nodes), keep semantics (keep means KEEP — the survivor config wins and no role change crosses), the card-then-ack gate, self-power-off, headless first boot.The machine-role contract
The accepted role lands where the boot path reads it, documented in
docs/dev/appliance-wizard.md:/data/pithead/machine-role—pithead|both|rig; absent meanspithead. Coordinator values are derivable fromconfig.json; the rig value is load-bearing (a rig has no config.json)./data/pithead/rig.json— rig only: pool, worker, optional stratum password.pithead-rig.jsonon the ESP (carried bypithead-installbeside the other pre-seeds); the target's first boot lands it as the two files above and scrubs the ESP copy.Phasing, stated plainly: the rig BOOT LEG is R4, not this PR. A machine carrying the rig marker states its role on the console and stops — "rig provisioning lands with the next phase … nothing mines yet". The Both role is the one that goes end-to-end today.
Also in here:
_consolenow narrates every line to the journal, not just the first — the honest-stub messages were journal-invisible without it, the same console-scrollback failure the wizard docs already record.Coverage at the owning tiers
tests/web/test_wizard.py63 → 73 (rig channel, pool shape gate, shared disk gates + usb, keep-path regression, rig defaults fail-open, status honesty)tests/frontend/wizard.test.mjs25 → 35 (select as first disclosure, three role shapes, discovery pre-fill, usb target rig-only, rig submit body, rig card, keep collapse)tests/stack/run.sh→ 1935 passing (discovery publisher fail-open,firstboot_consume_rigvalidate-before-erase, marker + boot stub, staged-rig landing + ESP scrub)make lintgreen; dashboard coverage 96.65%; patch coverage vsdevelop-v2100%🤖 Generated with Claude Code