You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: first-run setup wizard and WAN detection - #139
Add the first-run setup wizard for factory images and Alpine installs, including browser timezone guidance, WAN protocol detection, LAN conflict handling, WiFi setup, and the normal plan/apply/confirm flow.
Add mr wan detect and POST net.wan_detect with bounded PPPoE, DHCP OFFER, and IPv6 RA probing.
Add first-run markers for new or erased writable storage and GET wifi.defaults for factory radios.
Improve the wizard for non-expert users: no raw JSON preview, readable WAN results, required first-run passwords, shared WiFi-name control, optional regulatory region selection, and no literal null placeholders.
Why
Fresh AX6000 images start with no WiFi radios and no administrator password, while deferred Alpine installs previously left Alpine networking services competing with the router. New users need one guided flow that detects the upstream connection, avoids LAN overlap, enables WiFi, and applies changes through the existing rollback safety window.
The first-run marker is the authoritative wizard signal. A factory marker remains pending after the initial password is set so the user continues into the wizard; old overlays without a marker do not re-enter it after an upgrade. install.sh writes the marker only for MR_APPLY=0; an install that already asked for WAN/password and applied with MR_APPLY=1 goes directly to the overview. Disabling WiFi in the wizard removes its radios and country from the pending configuration, restoring them if WiFi is enabled again.
Verification
cd mr && go vet ./... && go test ./...
sh tools/ci.sh — ALL CHECKS PASSED
GitHub Actions installs ppp and pppoe for the real WAN-detect integration test.
Static CI assertion verifies install.sh writes first-run only inside the MR_APPLY=0 branch.
Chinese 360px mock screenshots cover all five steps, PPPoE detection, DHCP/upstream conflict, and LAN conflict guidance: runs/2026-10-17-minirouter/a4-wizard-shots.tgz
Firmware logs: runs/2026-10-17-minirouter/pr139-build.log and runs/2026-10-17-minirouter/pr139-selftest.log
WAN fixture cleanup verified: no pppoe-server -I pps or detect dnsmasq processes remain after CI.
Fixed P3b first-run marker handling: provisioned .firstboot no longer creates a marker; markers are created only for fresh or factory-reset rootfs_data.
Added server-side upgrade safety: an existing accepted generation plus administrator password suppresses stale markers, while a factory marker without a password still enters first setup.
Prevented unknown WAN detection recommendations from being written to router configuration.
Added/updated selftest coverage for P1, P3b, P4, and P6 first-run state.
Final head 2c6ac15 is pushed. The last full local CI run passed (ALL CHECKS PASSED), including the real PPPoE/dnsmasq WAN-detect integration after adding dnsmasq readiness synchronization. The final m3 rebuild returned BUILD_EXIT:0; final firmware selftest reports P1, P2, P3, P3b, P4, P5, P5b, P6, P7, P8 all ok and all self-tests passed.
Merged origin/main into the wizard branch with a regular merge commit f7d4319 (no rebase/force push).
Conflict resolution:
tools/ci.d/net.sh: retained the wizard branch's PPPoE/DHCP detect namespaces and dnsmasq readiness wait, plus main's modem/macvlan namespace cleanup.
apply.go, hooks.go, mod_net*.go, api.go, and mr-preinit merged cleanly; both service restart filtering, gateway /32/proxy-ARP/DNS6/lan6 handling, REMOTE_ADDR normalization, and first-run/firstboot behavior are present.
Verification after merge:
go vet ./... and go test ./...: passed.
sh tools/ci.sh: ALL CHECKS PASSED.
m3 rebuild: BUILD_EXIT:0.
selftest: P1, P2, P3, P3b, P4, P5, P5b, P6, P7, P8 all ok; all self-tests passed.
Logs updated: runs/2026-10-17-minirouter/pr139-build.log and runs/2026-10-17-minirouter/pr139-selftest.log.
Final N1 regression test update is pushed at ccdf52f: the test now models factory-done plus administrator password, render-produced gen/applied.yaml, and an empty history directory, and confirms session.wizard remains pending via firstRunPending().
Final verification:
Local go vet ./... and go test ./...: passed.
Local sh tools/ci.sh: ALL CHECKS PASSED.
WAN fixture cleanup: pgrep -af '[p]ppoe-server -I pps' and detect dnsmasq process scan are empty after CI.
GitHub checks for ccdf52f: both passed.
No mr-preinit or build/m3 files changed in this remediation, so the previously uploaded green firmware selftest logs remain applicable.
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
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.
What
mr wan detectandPOST net.wan_detectwith bounded PPPoE, DHCP OFFER, and IPv6 RA probing.GET wifi.defaultsfor factory radios.nullplaceholders.Why
Fresh AX6000 images start with no WiFi radios and no administrator password, while deferred Alpine installs previously left Alpine networking services competing with the router. New users need one guided flow that detects the upstream connection, avoids LAN overlap, enables WiFi, and applies changes through the existing rollback safety window.
The first-run marker is the authoritative wizard signal. A factory marker remains pending after the initial password is set so the user continues into the wizard; old overlays without a marker do not re-enter it after an upgrade.
install.shwrites the marker only forMR_APPLY=0; an install that already asked for WAN/password and applied withMR_APPLY=1goes directly to the overview. Disabling WiFi in the wizard removes its radios and country from the pending configuration, restoring them if WiFi is enabled again.Verification
cd mr && go vet ./... && go test ./...sh tools/ci.sh—ALL CHECKS PASSEDpppandpppoefor the real WAN-detect integration test.install.shwritesfirst-runonly inside theMR_APPLY=0branch.runs/2026-10-17-minirouter/a4-wizard-shots.tgzruns/2026-10-17-minirouter/pr139-build.logandruns/2026-10-17-minirouter/pr139-selftest.logpppoe-server -I ppsor detect dnsmasq processes remain after CI.Related to #86