cf1862c8ab
network_gate() runs before mode dispatch. Hub reachable -> return with ZERO new behavior (asserted). Unreachable -> diagnose (physical-NIC table with raise-first carrier read; installer 192.168.100.2-fallback signature named when present), then — ONLY while no install state file exists, doubly confined by the unit's ConditionPathExists=!done-flag — sweep: per candidate re-point vmbr0's bridge-ports (atomic tmp+mv, always derived from the pristine copy) -> ifreload -> bounded dhclient (20s) -> hub probe (any HTTP status = reachable; the hub answers 302). First success persists winner + DHCP addressing (original kept as interfaces.felhom-bak) and proceeds; total failure restores the config BYTE-IDENTICALLY, paints a calm Hungarian console screen (spec copy, print_pairing_banner pattern) and retries every 60s with the unit held in activating — waiting is not failing (v1.21.0). Trigger is always hub-unreachable, never the fallback signature (spike F-P6: the truth-changed-after-install variant has no signature). Design inputs: SPIKE-firstboot-nic-sweep-2026-07-22 F-P1..F-P8. Harness: +4 scenarios (G1 zero-behavior in D incl. zero-sleeps + fixture-untouched, G2 sweep-success/persist/proceed, G3 sweep-fail byte-identical + screen content, G4 state-file-present = never sweep), gate seams (FELHOM_NET_SYS/INTERFACES_FILE/CONSOLE_DEV), ip/ifreload/ dhclient fakes, hub-probe oracle incl. follow:<nic> mode. Red-proofs run and restored: (A) restore-on-failure dropped -> G3 byte-identical FAILs; (B) state gate removed -> G4 zero-call FAILs; (C) early return removed -> all five G1 invariants FAIL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UuFPHmHNrCJj1VhY6QdDMU