Repository navigation
Description
What's the problem
Part of #4464 (spike first). #4464 adds a browser-or-terminal interface choice to DIY ./pithead setup and reuses the appliance firstboot browser wizard for DIY. Four facts must be settled before the browser leg can be built: (1) whether the dashboard image exists when setup starts on DIY; (2) how the wizard page gets TLS on a non-appliance host (the appliance mints it via lib/pithead/26-appliance-tls-provisioning.sh); (3) which port the page uses on shared hosts (dashboard.port exists for co-hosting; wizard_start_page binds host 80/443); (4) whether a container engine is present before dependencies are installed. This chunk settles them; no behavior ships.
What it impacts
Only the design of the #4464 browser leg: image source, TLS posture, port choice, and where the interface choice gates on engine presence. No user-visible change.
How I found it
The four unknowns were recorded on #3577 and carried to #4464 by the owner. Starting points read on develop-v2.1.0 at 190234b on 2026-11-26: setup() is lib/pithead/38-setup-command.sh; container_engine() is lib/pithead/05-doctor-checks.sh:54; the appliance page starts only via firstboot_wizard() (lib/pithead/12-firstboot-wizard.sh) calling wizard_start_page() (lib/pithead/12a-wizard-page.sh: -p 80:8000 -p 443:8443, WIZARD_TOKEN, WIZARD_TLS_CERT/KEY set only with a cert fingerprint); lib/pithead/11-baked-images.sh is the appliance's image story.
How important is it
High for #4464: the operator held the interface-choice prompt back so no dead option ships, and #4464 requires these facts settled before the browser leg is built. Not a release emergency; no user is affected until the browser leg lands.
Acceptance criteria
- Each unknown gets a recorded answer with
file:lineevidence (one uneditedbench-ci evidenceblock from a single targeted job only where reading cannot settle it): image presence at setup start on DIY; TLS source on a non-appliance host; the port to use when 80/443 are taken and howdashboard.portinteracts; engine presence before dependency install and where the browser leg should gate on it. - A recorded design decision: reuse
firstboot_wizard/wizard_start_pagevs a short-lived container started bysetup; DIY TLS posture (LAN HTTP vs self-signed); the port-selection rule; the exact setup point where the browser leg is offered and where it falls back with a reason. - The decision is posted as a comment on DIY setup: browser wizard behind a CLI or browser interface choice (spike first) #4464 and on this issue (DIY setup: browser wizard behind a CLI or browser interface choice (spike first) #4464's acceptance allows a documented decision in the issue). If a doc page lands instead, tiers 1 to 3 prove it.
- No behavior change, no new explanatory code comments.
Possible solutions
- Read the paths above end to end; avoid tier-4 unless a probe is unavoidable (
options.mode: checkproves nothing; usetargetedif anything). - Record decisions as issue comments; a short docs/dev note is optional.
Parent: #4464
Worker brief: Test tier: tiers 1 to 3 (docs/decision only); submit a bench job only if code reading cannot settle an unknown, then tier4-e2e targeted with --base develop-v2.1.0 and quote its evidence block unedited. Base: develop-v2.1.0. Answer the four #4464 unknowns — dashboard image existence when setup starts on DIY; wizard TLS on non-appliance hosts; port on shared hosts vs dashboard.port; container engine presence before dependency install — with file:line evidence (start at lib/pithead/38-setup-command.sh, 05-doctor-checks.sh container_engine, 12-firstboot-wizard.sh, 12a-wizard-page.sh, 11-baked-images.sh, 26-appliance-tls-provisioning.sh, 33-render-env.sh dashboard.port). Then record the design decision (reuse firstboot_wizard/wizard_start_page vs short-lived container; TLS posture; port rule; fallback point) as a comment on #4464 and on your issue. No code or behavior change.
Activity
pithead-developer commentedon Dec 4, 2026
Decision: DIY browser wizard (spike #4548, parent #4464)
Read at develop-v2.1.0
190234b0. Reading settled all four unknowns, so no bench job was submitted and nothing changed in the repo.The four answers
Dashboard image at
setupstart on DIY: absent.setup_confirmed(lib/pithead/38-setup-command.sh:20-60) callsload_baked_imagesonly whenis_appliance(:23), andis_applianceneeds the RAUC config andpithead-install(10-installer-preseed.sh:165-170). The archive load in11-baked-images.sh:33is never reached on DIY.export_build_provenance(19-small-utilities.sh:147-157). A source checkout getspithead-dashboard:dev, built by compose. A release bundle gets:vX.Y.Z, pulled from the registry.provision_toronly brings uptor(32-onion-provisioning.sh:20,--pullpolicy fromresolve_pull_policy,01-lifecycle.sh:53-59). The dashboard comes up instack_up, afterprompt_start_stack(38-setup-command.sh:60).verify_release_images,03-release-verify.sh:93, called fromstack_up01-lifecycle.sh:228). The browser leg must not pull the dashboard image outside that path.TLS on a non-appliance host: the mint code already works there.
stage_wizard_spool→wizard_mint_cert→appliance_mint_cert(11a-wizard-spool.sh:178,26-appliance-tls-provisioning.sh:292,320) needs onlyopenssl. It writes a self-signed RSA-2048 pair underappliance_tls_dir($PWD/data/tls,:44) and copies it into the spool.appliance_site_names(:86). On DIY,is_applianceis false, so it holds only$HOST_IPorhostname(:60-68). Thehostname -Iaddress expansion (:90-97) and the<host>.localname run only on the appliance. A DIY cert therefore does not cover the LAN IP or mDNS name the operator types.dashboard/mining_dashboard/wizard/server.py:642-650). Otherwise it serves plain HTTP, so a failed mint silently drops TLS. The existing banner already prints the right scheme (12a-wizard-addresses.sh:35-48).Port on a shared host: the wizard's 80/443 publish is hard-coded and
dashboard.portdoes not apply.wizard_start_pagepublishes-p 80:8000 -p 443:8443(12a-wizard-page.sh:9). If either is taken,runfails anderrorstops setup (:14-18), so there is no fallback today.dashboard.portisHOST_PORT, read inparse_and_validate_config(28-parse-and-validate-config.sh:284) and used only to render Caddy's site address (35-caddyfile-and-auth-helpers.sh:88-100). No config exists yet when the browser leg would start, because the wizard is what writes it (ensure_config_exists,38-setup-command.sh:25). So the setup page cannot honordashboard.port.server.py:21-22) and the host side of each publish is free to change.Engine before dependency install: not guaranteed.
check_prerequisites(38-setup-command.sh:24,23-setup-and-credentials.sh:36-94) is where docker is detected, offered through apt, and then proven reachable (docker info,:89).container_engine(05-doctor-checks.sh:54-66) returnsdockerwhen nothing is installed, so its answer is not evidence that an engine exists.--skip-depsskips all of this (:37-40).Design decision
setup. Callstage_wizard_spool,wizard_start_pageand the spool-consume loop, because they already do the token gate, the TLS fallback and the host-side validation. Starting a second container would duplicate that trust shape. Reuse needs three DIY adjustments:wizard_start_pagetakes the host ports as parameters instead of the fixed 80/443.wizard_host_addressesneeds a path that does not depend onagettyand/run/issue.d(12a-wizard-addresses.sh). Those are console-only, and on DIY the URL and token go to the terminal.restore_submission_dirdefaults to/run/pithead-restore-submit(09a-restore-volatile.sh:8).check_prerequisitesand beforeensure_config_exists, so between38-setup-command.sh:24and:25. The engine is proven there, and nothing has been written yet.--skip-deps, run"$(container_engine)" infofirst and fall back to the terminal if it fails.[ ! -t 0 ]): terminal path only. The browser option is never offered.stack_upwould use.docker compose build dashboard, or fall back to the terminal ifdocker image inspect pithead-dashboard:devis missing and the build fails.verify_release_images. If the pull or the verify fails, fall back to the terminal with the reason.server.py:645-648).12-firstboot-wizard.sh:104).run, not by parsing the engine's error.dashboard.portis already set in an existingconfig.json(re-run), prefer it as the first candidate. A fresh DIY has no value to read.ensure_config_exists) at the same point, with no state left behind (pithead-wizardcontainer removed, spool cleared).What is not settled by reading
Whether a DIY host's real LAN addresses all reach the container through the engine's port publish, and rootless Docker or podman edge cases. The first browser-leg PR should prove these with a
tier4-e2etargeted job.pithead-developer commentedon Dec 4, 2026
Questions before work continues (answer here, then remove the
questionlabel):The worker reported done but no PR exists for branch
agent/4548-spike-settle-image-tls-port-and-engine-u. I read the code and answered the four unknowns with file:line evidence. I posted the decision as comments on #4464 and #4548, and no PR was opened. Branch HEAD equals origin/develop-v2.1.0, so nothing was committed, which is what the acceptance criteria allow for a decision-only spike. No bench job was submitted because reading settled every unknown. (1) On DIY the dashboard image is absent whensetupstarts. (2) The existing TLS mint needs only openssl, but on a non-appliance host the cert's names do not cover the LAN IP or mDNS name. (3) The wizard's 80/443 publish is hard-coded anddashboard.portdoes not apply, because no config exists yet at that point. (4) An engine is not guaranteed beforecheck_prerequisites. The decision reusesfirstboot_wizardandwizard_start_pagewith parameterised ports and a DIY spool, offers the browser leg betweencheck_prerequisitesandensure_config_exists, uses a self-signed cert with no plain-HTTP fallback, and falls back to the terminal with a stated reason on any failure. Still unproven: whether all LAN addresses reach the container through the engine's port publish, and rootless docker/podman cases. The first browser-leg PR should prove these with atier4-e2etargeted job.pithead-architect commentedon Dec 4, 2026
Ruling: Accepted as done. This is a decision-only spike, and its acceptance criteria allow that: each of the four unknowns has a
file:lineanswer, and the design decision is posted on #4464 and on this issue. Reading settled everything, so skipping a bench job is correct. No PR is needed and the empty branch is fine. Do not open one. Carry the two unproven items forward by name, so #4464's first browser-leg PR cannot skip them. They are (a) whether every LAN address reaches the wizard container through the engine's port publish, and (b) rootless docker and podman. That PR needs atier4-e2ejob on its head, because it touches the wizard, setup and port-publish paths. The decision that follows from the spike is to reusefirstboot_wizardandwizard_start_pagewith parameterised ports and a DIY spool. It offers the browser leg betweencheck_prerequisitesandensure_config_exists. It uses a self-signed cert with no plain-HTTP fallback, and any failure falls back to the terminal with a stated reason. It does not remove or narrow the terminal path, so the clearnet-by-choice and no-removed-choice rulings are not touched. The owner can redirect on #4464 before the browser leg is built. Clear thequestionlabel and returndone.pithead-developer commentedon Dec 4, 2026
Questions before work continues (answer here, then remove the
questionlabel):The worker reported done but no PR exists for branch
agent/4548-spike-settle-image-tls-port-and-engine-u. Decision-only spike, accepted by the operator. No PR was opened and the branch has no changes. The four-unknown answers and the design decision are on #4548 and #4464. I added a comment on #4464 naming the two unproven items the first browser-leg PR must prove: (a) whether every LAN address reaches the wizard container through the engine's port publish, and (b) rootless docker and podman. That comment also says the PR needs a tier4-e2e job on its head. I ran the label-removal command forquestionon #4548 and it returned no error. I did not check the label list afterwards.pithead-architect commentedon Dec 4, 2026
Ruling: Done. The spike's acceptance criteria allow a decision-only result. Each of the four unknowns has a
file:lineanswer, the design decision is on #4464 and #4548, and reading settled every unknown, so no bench job was needed. Do not open a PR or push anything: an empty branch is correct. Returndoneand ask nothing further. The two unproven items, every LAN address reaching the wizard container through the engine's port publish and rootless docker and podman, are already named on #4464. That issue's first browser-leg PR must prove both and carry atier4-e2ejob on its head. Thequestionlabel is still on this issue. Your removal call returned no error but did not take effect. The runner clears it when it recordsdone, so do not retry it by hand.pithead-developer commentedon Dec 4, 2026
Questions before work continues (answer here, then remove the
questionlabel):The worker reported done but no PR exists for branch
agent/4548-spike-settle-image-tls-port-and-engine-u. Decision-only spike, done. No PR was opened and nothing was pushed. The four-unknown answers and the design decision are on #4548 and #4464. #4464 also names the two unproven items its first browser-leg PR must prove: every LAN address reaching the wizard container through the engine's port publish, and rootless docker and podman. That PR needs a tier4-e2e job on its head. I did not retry the label removal. Thequestionlabel stays on #4548 until the runner clears it.pithead-architect commentedon Dec 4, 2026
Ruling: Same answer as the last two rounds, and this time close the loop yourself. The spike is accepted: the four unknowns each have a
file:lineanswer, and the design decision is on #4464 and on this issue. No PR is owed, so nothing will ever carry aCloses #4548, and that is why the runner keeps reading yourdoneas an open question. Close #4548 as completed with one short comment that links the decision comment and #4464's follow-up comment naming the two unproven items: every LAN address reaching the wizard container through the engine's port publish, and rootless docker and podman. If closing it does not take effect, say that once and returndone. Do not open a PR, push, or re-ask. #4464's first browser-leg PR owns both unproven items and needs atier4-e2ejob on its head.pithead-developer commentedon Dec 4, 2026
Spike complete. The decision is in #4548 (comment) (also on #4464). The two items reading could not settle, every LAN address reaching the wizard container through the engine's port publish and rootless docker and podman, are named in #4464 (comment). #4464's first browser-leg PR owns both and needs a tier4-e2e job on its head.