Skip to content

Ask three questions at setup on the CLI and in the browser wizard #3577

Open

Description

@pithead-developer

What's the problem

Part of #3557. The default DIY path asks the user about a dozen things: package install, Monero wallet, local node, Tari mode, pool tier, dashboard user and password, fast sync, onion, Telegram, local miner, stratum password, hostname, HugePages and start. The tier-1 suite pins this at 11 reads in wizard_ask_core and 6 in wizard_ask_shape (tests/stack/test-wizard-setup.sh:8-13). The browser wizard shows 16 fields on the default path and up to 25 (web/static/wizard/setup.mjs). Three builders must be kept in step by hand: 24-config-wizard.sh:302-369, wizard/form.py build_config, and wizard_config.py with wizard/defaults.py explicit_wizard_config.

Ruling 1 adds that DIY must be as easy as the appliance and DIY users choose at setup between the browser wizard and the CLI. The browser wizard exists today only for the appliance first boot: firstboot_wizard (lib/pithead/12-firstboot-wizard.sh) serves a token-gated form from the dashboard image in a pithead-wizard container, and --cli already switches to the terminal wizard.

Target default path: for DIY, one interface choice (browser recommended, or this terminal). Then Q1 Monero payout address (required, validation as today), Q2 Tari wallet (optional: blank means Tari off, filled means the bundled node; tari.mode is derived), Q3 profile (Performance / Balance / Privacy, Enter means Balance, one plain sentence each plus the sync-exposure warning for Performance). Consents stay with plain wording: install packages, HugePages/GRUB change with reboot, start now. Local or remote Monero node, remote Tari, onion, Telegram, local miner and stratum password leave setup (Advanced or later in Settings).

what it impacts

Every new DIY and appliance user, the ./pithead setup flow, docs/getting-started.md and the appliance docs, and the tests that pin prompts. Existing installs are not asked anything. #2543 stays open as the wizard screens issue (scope in #3566); this issue owns the questions, the DIY interface choice and the parity test.

How I found it

Read-only scan of develop at 9249b0b on 2026-10-21 from the lean roadmap's Setup questions table and the paths above. Nothing was run. Unknowns to settle in a first spike PR before the DIY browser leg: whether the dashboard image exists when setup starts on DIY, how the wizard page gets TLS on a non-appliance host (the appliance mints it via 26-appliance-tls-provisioning.sh), which port the page uses on shared hosts (dashboard.port exists for co-hosting), and whether a container engine is present before dependencies are installed.

how important is it

High: it is the north-star user path (install to mining by answering three questions). Blocked by the profile, automatic-defaults and key-diet issues.

acceptance criteria

  • Tier-1: tests/stack/test-wizard-setup.sh replaces the read-count pins with an exact ordered prompt list (interface choice, Monero wallet, Tari wallet, profile; consents listed separately). Adding any prompt fails the test. tests/stack/test-wizard-tari.sh: blank Tari asks nothing more and writes tari.mode = off; a filled address writes local; checksum and wrong-network re-prompts remain.
  • Tier-1 parity: the same three answers give the same config.json (ignoring generated credentials) from the CLI wizard (piped), the browser submit path and, until that form is removed at the dashboard cutover, the no-JS builder. One golden file is read by the bash test and by pytest (dashboard/tests/web/test_wizard_form.py, test_wizard_setup_and_install.py).
  • Tier-1: the wizard submit endpoint accepts exactly the three answers (plus the appliance role and disk fields) and provisions with the defaults from the defaults, profile and automatic-defaults issues; older fuller submissions are still accepted; profile is written explicitly. The page itself is rebuilt in Sovereign: redesign setup token, role and essential configuration steps #2543 (scope in v2.1.0 lean UI spec: four pages, one profile control, an Advanced drawer #3566), not here.
  • Tier-1 (stubbed container engine): on a tty ./pithead setup offers the choice; --cli and no tty skip it (as ensure_config_exists refuses non-interactive today, 24-config-wizard.sh:18-20); if the browser leg cannot be served it falls back to the terminal and prints the reason.
  • Tier-1 (stubbed container engine): the browser leg prints one URL and a one-time setup token, and the wizard endpoint rejects a request without the token.
  • The login is generated and shown once, as in the automatic-defaults issue, on both interfaces.
  • docs/getting-started.md becomes the single path from deployment choice to first accepted share (closes Guide new users from deployment choice to their first accepted mining work #3182); the 12-to-3 question claim is verifiable from the pinned list.
  • No new explanatory code comments.

possible solutions

  • Reuse firstboot_wizard for DIY behind the choice prompt, with the spike deciding image and TLS handling.
  • Browser wizard served by a short-lived container started by setup only after dependencies and the image are present; fall back to CLI otherwise.
  • One shared builder (Python, called from bash) so the CLI stops carrying its own jq assembly; larger change, removes the parity risk. Otherwise keep three builders and rely on the parity test.

Part of #3557.

Activity

  1. added this to the v2.1.0 milestone on Oct 21, 2026
  2. added
    enhancement
    setup
    appliance
    on Oct 21, 2026
  3. added
    blocked
    on Oct 21, 2026
  4. removed
    blocked
    on Nov 16, 2026
  5. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    1. Scope of Ask three questions at setup on the CLI and in the browser wizard #3577 in this one PR: may I deliver only the CLI side (the exact ordered prompt list of interface choice, Monero wallet, Tari wallet and profile, with consents separate; blank Tari writes tari.mode = off; the shared golden file read by bash and pytest for CLI/browser/no-JS parity; the wizard submit endpoint accepting the three answers while still accepting older submissions; getting-started doc) and leave the DIY browser leg (token URL, TLS on non-appliance hosts, port, engine-before-dependencies, fallback to terminal) for a follow-up issue that starts with the spike? Default: yes. The issue itself says the spike must settle image, TLS, port and engine questions first, and one tier-4 job plus a $16 budget cannot cover a new served-page flow. Until that follow-up lands, the interface choice would offer only the terminal on DIY. Is that acceptable, or do you want the choice prompt held back entirely until the browser leg exists? Default: hold the prompt back so no dead option ships, keep --cli/no-tty behaviour unchanged. 2) Let the privacy profiles set the project donation route #3707: Add coordinated privacy profiles and Tor-only inbound peering #3632's profile table already carries xvb.tor (lib/pithead/19a-config-defaults.sh). docs/privacy.md:318 currently says 'Project donation keeps its separate donation.tor choice; profiles do not enable it', which contradicts the issue. Do you confirm the issue's ruling (donation.tor governed: Performance false, Balance true, Privacy true) and that I should correct privacy.md and donation.md to match? Default: yes, the issue body is the owner's spec. 3) KVM legs for a USB-bus stick rig: update over on-demand Tor, fallback, revoke, internal disk untouched #4018 (USB-stick rig KVM legs) is blocked by open Rig-side updater: download the signed bundle over Tor, verify, install into the spare slot, self-commit or fall back #4013, Rig wizard: mine to a Pithead or any other pool (with TLS choice); stop pinning control to the pool's address #4009, Make the rig role's memory use role-aware so small machines mine instead of over-reserving and failing #4010, rigforge#684 and rigforge#681 and shares no code path with the wizard or profile work. May I leave it out of this group via left_out? Default: yes. 4) Test tier: the CLI wizard, config render and profile-resolver changes touch lib/pithead apply/render paths, so after tiers 1-3 I would run one tier4-e2e targeted job on the head. Does that match your expectation for Ask three questions at setup on the CLI and in the browser wizard #3577 and Let the privacy profiles set the project donation route #3707 together? Default: yes.
  6. added
    question
    on Nov 24, 2026
  7. pithead-architect commented on Nov 24, 2026

    @pithead-architect

    Ruling: (1) Split as you propose, and hold the interface-choice prompt back so no dead option ships. On DIY, ./pithead setup keeps today's behaviour for --cli and when there is no tty. The ordered-prompt test pins Monero wallet, Tari wallet and profile now, with consents listed separately. Before the PR asks for review, file one follow-up issue in v2.1.0 as a native sub-issue of #3557, using the six sections. It starts with the spike's four unknowns from this issue's "How I found it" (whether the image is present, TLS on a non-appliance host, which port, an engine before dependencies). Move these acceptance lines into it word for word: the tty choice and the terminal fallback with its reason, the single URL with a one-time token, and the token rejection. Add the interface choice to the pinned list in that issue. Your PR may close #3577 only once those lines live in the follow-up and are linked. List the split under "Decisions taken". (2) Confirmed: profiles govern donation.tor (Performance false, Balance true, Privacy true), and an explicit donation.tor overrides the profile. #3707 applies the owner's 2026-10-27 donation priority and the Performance definition of no Tor on anything. docs/privacy.md:318 describes things before this feature, and #3707's acceptance criteria replace it, so correct both privacy.md and donation.md. Clearnet by choice still holds: a direct donation route never requires turning the firewall off and never shows as a leak. If it needs a firewall exemption that the existing per-container mechanism does not already give, that belongs to the firewall-choice child and not to this PR. Do not narrow any option to get around it. (3) Yes, leave #4018 out via left_out. (4) Not enough. The config render and profile resolver need tiers 1-3 plus one tier4-e2e targeted job on the head. This PR also changes the wizard submit endpoint (wizard/form.py), and appliance first boot serves that endpoint. The wizard and first-boot row therefore also needs one tier4-kvm job on the same head: the phase that provisions from the first wizard submit (docs/dev/testing-strategy.md names the stack phase). Quote both jobs with bench-ci evidence.

  8. removed
    question
    on Nov 24, 2026
  9. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Waiting on a transient chain_sync condition, not on another issue. tier4-e2e submit of lifecycle on the base tip refused: 503 baseline_unhealthy (live-stack baseline fenced by an unproved wallet fixture or Tari snapshot restore after job 4569); no job created. The runner re-checks it (first at 2026-11-24T08:01Z, at most 5 times); the durable fix is tracked in #4175.

  10. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4175. Blocked on the tier4-kvm stack proof, which needs develop forward-merged into develop-v2.1.0 (#4175, an operator hold). The bench refuses the KVM battery until the branch includes #4120 (job 4570). I did not fold an 85-commit merge into this PR. The wizard submit endpoint (wizard/form.py) is served at appliance first boot, so the operator requires that proof; unblock by landing the forward merge, then merge the base into this branch and resubmit tier4-kvm with phases=stack. Finished: PR #4465 has tiers 1 to 3 green on head 9619acc. tier4-e2e lifecycle shows the same 5 red rows on the head (jobs 4569, 4588) and on the unmodified base tip (job 4587), so they are not from this change. #4373 owns them (a 2.0.4 baseline config on 2.0.3 code). The other 266 rows pass on the head. The evidence blocks and this explanation are posted on the PR. #4464 carries the deferred browser-leg criteria.

    The runner resumes this issue when that one closes.

  11. added
    blocked
    on Nov 24, 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

    applianceblockedenhancementsetup

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions