Skip to content

feat(start-wrt): show what a page cannot represent in place of its settings - #4611

Merged
helix-white merged 12 commits into
masterfrom
wrt/unrepresentable-config
Nov 10, 2026
Merged

helix-white merged 12 commits into
masterfrom
wrt/unrepresentable-config

Conversation

@Dominion5254

Copy link
Copy Markdown
Member

Refs #3678 (the MVP; the optional affected-files list and "Fix it" are follow-ups) and #4607. Stacked on #4602: merge that first, or review only the last commit.

A hand edit or a LuCI change StartWRT cannot represent used to show up in one of three ways: a red toast every five seconds, wrong values, or an overwrite on save. Two boot repairs also acted on settings they could not read. Now each affected page lists those changes, with their file and line and a link to LuCI, in place of its settings. A change StartWRT reads but does not manage is noted above the settings instead.

What it does

  • config.check (ctrl/src/config_check.rs) reads ddns, dhcp, firewall, network, startwrt and wireless. It reports each finding with its file, one-based line, section, option and value, and the pages it affects:
    • A file that does not parse. It affects every page whose requests read that file.
    • A section that fails the typed read a page relies on. This covers interfaces, devices, bridge VLANs, Wi-Fi devices and interfaces, the LAN and profile DHCP sections, zones, forwardings and profiles.
    • A value a page reads but cannot show or keep:
      • a WAN or WAN6 protocol the WAN page has no mode for;
      • a LAN or profile interface that is not static;
      • an RA or DHCPv6 mode other than server/disabled;
      • a DHCP section set to ignore;
      • a second access point on a radio;
      • a Wi-Fi interface that is not an access point, is disabled, or is on a network other than lan;
      • encryption other than psk2/none;
      • a lease with several MACs.
    • A section a page requires that is missing: br-lan, lan, wan, the wan zone, or a profile's interface.
    • A notice rather than a block: the entries after the first of a list ipaddr or list ip6addr. The page reads the first, a save leaves the rest in place, and the page says so above its settings. Secondary IPv4 addresses on an interface are invisible to StartWRT — profile allocation can reuse their subnet (ctrl/src/profiles.rs guard_subnet_collision) #4607 covers managing them.
  • Settings is never replaced. Backup, factory reset and the LuCI link stay reachable.
  • The UI. The shell shows CustomConfig in place of a page with blocking findings; it has "Launch LuCI Interface" and "Check again". ConfigNotices renders notices above a page. FormService sends a load error caused by configuration StartWRT cannot read or model (codes 1003–1006, 1009–1012, 1022) to the same page instead of toasting it on every poll. The page clears on navigation and reports again if it still fails.
  • Forms StartWRT can read without loss are read, not flagged:
    • A Vec field reads an option line as its whitespace-separated words, as OpenWrt's own scripts do. option proto 'udp' on a LuCI rule used to read as an empty list, which the reserved-port and inbound checks treat as every protocol.
    • #[uci(accept_list)] reads the first item of a list, and a write replaces that item and keeps the rest. It covers DhcpHost.mac, NetworkInterface.ipaddr and ip6addr.
    • ipaddr is an Ipv4Address that keeps a prefix length. ipv4() and ipv4_netmask() give callers the address and the mask the prefix implies, which wins over netmask as it does in netifd.
  • uciedit:
    • Typed-read errors name the line, option and value.
    • MissingOption and ExpectedSectionType point at the section header.
    • ConfigBytes keeps the line when it adds the file name.
    • parse_each parses files independently.
  • Boot repairs:
    • heal_ipv6_state now acts only on a dhcp.lan in the off state StartWRT writes.
    • bootstrap_admin_profile no longer appends a second Admin profile (and a second preferences section) when the existing one fails its typed read.

Not included: #4601 (profile save deleting LuCI rules, on its own branch), the affected-files list, "Fix it", and managing secondary addresses (#4607).

Verification

  • make start-wrt-test: all pass, 820 startwrt-core and 36 uciedit. New tests cover: a stock firstboot config yields no findings; one test per finding kind, including the DHCP ignore, the disabled or moved Wi-Fi interface, and the two-address notice in both its list-only and option-plus-list forms; a Vec field reading an option as words, with the write replacing the option line; an option replacing earlier list items; accept_list on an optional field keeping later items and dropping only the first; Ipv4Address bare and prefixed forms; located typed-read errors; the IPv6 repair leaving a relaying or unreadable dhcp.lan alone; bootstrap keeping an unreadable Admin profile.
  • Other checks: npm run check:wrt, npm run check:i18n:wrt, make start-wrt-rpc-bindings-check and make format-check pass. The production web build runs as part of deploying.
  • Bench router (bench.sh deployed on the final commit):
    • config.check on the bench's own customised config, with 5 profiles, VPN interfaces, custom firewall rules and published ports: 0 findings. lan.ipv4-get, wan.ipv4-get, profiles.list and devices.list read as before.
    • Each scenario below was committed with uci and never reloaded unless stated:
      • A CIDR LAN address with no netmask: lan.ipv4-get returns the address and the mask the prefix implies, the Admin profile's devices keep their subnet, 0 findings, and the LAN page renders.
      • Two list ipaddr entries on lan: one unmanaged notice at the second entry's line for the LAN and Profiles pages. In headless Chromium, /lan and /profiles show their forms with a warning banner naming the address, file, line and section; /wan shows nothing. A lan.ipv4-set of the same address writes option ipaddr and option netmask and keeps the second entry as a list line; the notice stays after the save.
      • A LuCI-style rule with option proto 'udp' accepting port 5555 from the WAN: published-ports.set adding TCP 5555 applies with no collision; adding UDP 5555 reports the collision. The port and the rule were removed afterwards.
      • dhcp.lan.ignore=1, a disabled wifi-iface and a wifi-iface on guest: three unsupported findings with their lines. /lan and /wifi show the Custom configuration page listing them; /settings and /wan render normally.
      • Check again: with /lan blocked, reverting the config and pressing the button restores the form without navigating.
    • Reboot: smoke passes, no StartWRT errors in the log, IPv6 state intact, five profiles, one preferences section and 0 findings.
    • Afterwards the snapshot was restored and smoke passes.
  • Not run: a real LuCI session, a real Wi-Fi client, os-bench (unreachable), and translations reviewed by native speakers.

uciedit tokenized values with inpt's Quoted/SingleQuoted/Spaced, which
does not match libuci. libuci writes an apostrophe as '\'' on every
commit (LuCI Save & Apply, `uci commit`, StartWRT's own WAN-schedule
cron job), and uciedit's lazy single-quote match stopped at the first
quote with no backtracking, so the whole file failed with BadOption.
It also unescaped backslashes inside single quotes, which libuci keeps
literally, and wrote values containing an apostrophe with Rust's {:?}
double-quoting, whose \n and \u{..} escapes libuci reads as letters.

The tokenizer now follows libuci's parse_str: adjacent quoted and
unquoted pieces join, single-quoted text is literal, a backslash
elsewhere keeps the next character or continues the line, quoted
values may span lines, an unquoted # starts a comment and ; ends a
statement. It also accepts package lines, the one-letter keywords and
an option with no value, as libuci does. Tokens keep their source
text, so untouched lines still round-trip byte for byte; new values
are written in libuci's quoting.

Closes #4600
…exer tests

A value quoted with no inner apostrophe decodes without copying, which
is nearly every line libuci writes. Tests add CRLF continuation, \#,
a quote followed directly by #, a backslash at end of input, and the
empty word. The fragment is selected for release notes: one apostrophe
saved through LuCI made a whole config unreadable.
…ting

A file that ends in an unmatched backslash lexes as a token whose
raw text ends in that backslash. Written back unchanged, the newline
the dump adds after it became a line continuation, so an option
appended to that section joined the previous value and the saved file
failed with too many arguments. Display now re-quotes the decoded
value when the raw text ends in a dangling escape, including a
backslash before a bare carriage return.

Found by review on #4602.
…ttings

A hand edit or a LuCI change StartWRT cannot represent made the affected
page fail with a red toast every five seconds, show wrong values, or
overwrite the change on save, and two boot repairs acted on settings they
could not read.

config.check reads ddns, dhcp, firewall, network, startwrt and wireless
and reports each finding with its file, one-based line, section, option
and value, and the pages it affects:
- a file that does not parse, for every page that reads it;
- a section that fails its typed read, for the pages whose requests read
  it (interfaces, devices, bridge VLANs, wifi devices and interfaces, the
  LAN and profile DHCP sections, zones, forwardings, profiles);
- values a page reads but cannot show or keep: a WAN or WAN6 protocol the
  WAN page has no mode for, a LAN or profile interface that is not
  static, an RA or DHCPv6 mode other than server/disabled, a DHCP section
  set to ignore, a second access point on a radio, a non-AP, disabled or
  non-LAN Wi-Fi interface, encryption other than psk2/none, a lease with
  several MACs;
- sections a page requires: br-lan, lan, wan, the wan zone, and each
  profile's interface;
- as a notice rather than a block, the entries after the first of a
  `list ipaddr` or `list ip6addr`, which the page reads past and a save
  leaves in place.

The shell shows CustomConfig in place of a page with blocking findings,
with a link to LuCI and a recheck, and ConfigNotices above a page with
notices. FormService hands a load error from configuration StartWRT
cannot read or model to the same page instead of toasting it on every
poll.

Forms StartWRT can read without loss are read rather than flagged. A
`Vec` field reads an `option` line as its whitespace-separated words, so
`option proto 'udp'` on a LuCI rule no longer reads as every protocol in
the reserved-port and inbound checks. `#[uci(accept_list)]` reads the
first item of a `list` and a write replaces that item and keeps the rest;
it now covers DhcpHost.mac, NetworkInterface.ipaddr and ip6addr. ipaddr
is an Ipv4Address that keeps a prefix length, with ipv4() and
ipv4_netmask() giving callers the address and the mask the prefix implies.

uciedit tokens keep their file line, typed-read errors name the option
and value they could not read, MissingOption and ExpectedSectionType
point at the section header, ConfigBytes keeps the line when it adds the
file name, and parse_each parses files independently.

heal_ipv6_state now acts only on a dhcp.lan in the off state StartWRT
writes, so an unreadable section or a LuCI relay no longer turns IPv6 off
at boot, and bootstrap_admin_profile no longer appends a second Admin
profile when the existing one fails its typed read.

Refs #3678, #4607
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes on three correctness issues in f83a575:

  1. P2 — Background form errors can block an unrelated page. web/src/app/services/form.service.ts now forwards errors to ConfigCheckService.report, which assigns them to the current URL. However, ProfilesService, OutboundService and BlackoutService are root-provided: their toSignal subscriptions and five-second polls survive navigation. For example, visit Profiles, navigate to WAN, then make a profile's vlan_tag unreadable. The surviving Profiles poll reports code 1022 against wan, replacing an otherwise working WAN page. Navigation clears the latch only until the next poll. The proposal scopes these pollers to their consuming components, including a separate OutboundService instance for Profiles, using the existing component-provider convention.

  2. P2 — Accepted CIDR LAN masks can be silently overwritten. backend/ctrl/src/config_check.rs::static_address accepts a static 192.168.1.1/16 address without a finding. The new Ipv4Address reader makes that configuration load successfully, but the LAN form discards the response's netmask and lan.ipv4-set writes LAN_NETMASK (/24); profile edits also write /24. A save therefore changes a custom network the page cannot represent instead of directing the user to LuCI. The proposal reports non-/24 LAN/profile masks as blocking findings, reusing LAN_NETMASK and ipv4_netmask(), with regression cases for scalar CIDR, list CIDR and separate netmask forms.

  3. P2 — Typed writes can resurrect overridden addresses. In backend/uciedit_macros/src/lib.rs, the accept_list writer preserves every list entry after the first, even when a later option had overridden those entries. For list ipaddr A; list ipaddr B; option ipaddr C, the typed reader selects C, but writing C produces option ipaddr C; list ipaddr B, making B effective again. The proposal discards overridden entries before writing and extends the existing precedence test to cover multiple overridden entries and a genuinely effective secondary address after the final option.

Proposed changes: f83a575...proposal/4611

Reviewed against the actual stacked base, wrt/uciedit-libuci-quoting; merge-tree reports a clean merge. Static review only: no builds, tests, typechecks or linters run; the proposed regression cases are unexecuted. The reported Conflict Markers check remains queued. The PR branch is untouched.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

An `option ipaddr` replaces every earlier `ipaddr` line, and typed writes
now discard those lines. The second-address notice still took the first
`list` item whenever an `option` was present, so it could name an address
the option overrides, and the non-/24 mask finding pointed at the first
`option ipaddr` rather than the last one the typed reader keeps. Both now
use the values libuci ends with.
A typed write now drops the lines a later `option` overrides, so the
attribute's docs and the ipaddr/ip6addr field comments no longer keep
"the rest" as written.
@Dominion5254
Dominion5254 force-pushed the wrt/unrepresentable-config branch from f83a575 to a44937e Compare November 6, 2026 20:57
@Dominion5254
Dominion5254 force-pushed the wrt/uciedit-libuci-quoting branch from 409789e to 6a01961 Compare November 6, 2026 20:57
helix-white
helix-white previously approved these changes Nov 6, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at a44937ef8. git merge-tree against wrt/uciedit-libuci-quoting is clean. All three points from my last review are resolved, and I found no new blocking defects:

  • Background errors blocking other pages: resolved by adopting the proposal. No root-provided FormService remains, and every injection site of the three re-scoped services sits under its new provider. The Outbound table and VPN child routes share one instance from the Outbound shell, and Profiles has its own.
  • Custom LAN masks: resolved. The finding now also reports the last option ipaddr, which is the value the typed reader keeps.
  • Resurrected addresses: resolved. The author's new effective() helper also stops the second-address notice from naming an address an option overrode. It agrees with the reader and with the writer's discard for every order of option and list lines I traced, and the docs now say the same.

This verdict comes from reading the code. I ran no tests. I built a throwaway mock UI only to capture screenshots, which follow in a separate comment.

Brief

Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?

Summary

  • config.check reads ddns, dhcp, firewall, network, startwrt and wireless, and reports what a page cannot represent, with file, line, section, option and value.
  • A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced, so backup, factory reset and the LuCI link stay reachable.
  • Extra list ipaddr or list ip6addr entries are a notice above the page, not a block.
  • A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll. The page clears on navigation and reports again if the load still fails.
  • Additional fixes:
    • heal_ipv6_state acts only on a dhcp.lan in the off state StartWRT writes.
    • bootstrap_admin_profile no longer adds a second Admin profile when the existing one fails its typed read.
    • A Vec field reads option proto 'udp' as words. It used to read as an empty list, which the reserved-port and inbound checks treat as every protocol.
    • Typed-read errors name the line, option and value.

Implementation diff: +1495 / −124 lines in 36 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.

Data model

  • New config.check RPC returning ConfigCheck { findings: ConfigFinding[] }, with ConfigView and ConfigProblem in the bindings. It is additive for API callers.
  • NetworkInterface.ipaddr becomes Ipv4Address, which keeps an optional prefix length. ipv4() and ipv4_netmask() give callers the address and mask, and the prefix wins over netmask, as in netifd.
  • Nothing changes on disk until a save. A typed write of an accept_list field (DhcpHost.mac, ipaddr, ip6addr) replaces the effective value, keeps the items after it and removes the lines an option overrode.

Approach

  • Form errors reach ConfigCheckService through the existing FormService, and the findings go through the shell's blocked state, so no page needed its own handling.
  • ProfilesService, OutboundService and BlackoutService move from root scope to component scope, the convention every other form service already uses. A failure is attributed to the current URL, so a root poller that outlived its page could block an unrelated one. These pollers now stop when the user leaves the page and start with no data when the user returns.
  • This review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added effective().

Flags

  • Stale description: it doesn't mention the /24 block. "A write replaces that item and keeps the rest" no longer holds when an option overrides earlier lines. The bench scenario "a CIDR LAN address with no netmask… 0 findings, and the LAN page renders" now holds only for a /24 prefix. I have not edited the author's text.
  • Duplicate scalar options (not changed here): non-accept_list fields such as netmask still read the first option while libuci keeps the last. The base branch already does this. A hand-written duplicate netmask could therefore hide a non-/24 mask from the new finding.
  • Merge order: stacked on #4602, which is still open. #4601 and #4607 are separate follow-ups, as the description says.

Testing

  • Recorded by the author in the description: make start-wrt-test (820 startwrt-core, 36 uciedit), check:wrt, check:i18n:wrt, the bindings check and the format check. The bench router ran its scenarios, a reboot and a snapshot restore.
  • Not shown to cover this head: the description doesn't name the commit these ran on, and its text predates the last four commits. The PR records no test or bench run for the page-scoped pollers, the /24 finding, the discard logic or effective(), or for their new regression cases.
  • CI: only Conflict Markers is reported on this head, with one run cancelled and one queued. No build or test job has reported.
  • Not exercised, per the description: a real LuCI session, a real Wi-Fi client, os-bench (unreachable), and translation review by native speakers.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white

Copy link
Copy Markdown
Member

Screenshots of the UI at a44937ef8, for the approval brief above. They come from a mock build with sample findings injected for capture; that sample data is not committed.

Custom configuration in place of the LAN page: a non-/24 address and a DHCP ignore, each with its file, line and section

Notice above the WAN page: a second address set outside StartWRT, with the settings still usable

Settings is never replaced, even with findings present

Base automatically changed from wrt/uciedit-libuci-quoting to master November 9, 2026 17:43
@helix-white

helix-white commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

@Dominion5254 This PR now targets master, and merging master (f4ae12b) into a44937ef8 conflicts in:

  • projects/start-wrt/backend/ctrl/src/devices.rs
  • projects/start-wrt/backend/ctrl/src/profiles.rs
  • projects/start-wrt/backend/ctrl/src/published_ports.rs
  • projects/start-wrt/backend/uciedit/src/syntax.rs
  • projects/start-wrt/web/src/app/i18n/dictionaries/{de,en,es,fr,pl}.ts

I'm this PR's reviewer, not its implementer, so I haven't pushed to your branch. Once you've merged origin/master, re-request my review and I'll re-check the resolution.

@helix-white
helix-white dismissed their stale review November 9, 2026 18:51

Dismissed by Helix: the changes require a substantive PR brief update. The head adds a blocking Unsupported finding for any LAN or profile interface mask other than /24 (LAN_NETMASK), from either a CIDR prefix or netmask. The description lists no such finding, and its bench claim that a CIDR LAN address yields 0 findings and the LAN page renders now holds only for /24. accept_list writes now remove the lines a later option overrides, and notices and findings use libuci's effective values (last option, else first item), so the description's 'a write replaces that item and keeps the rest' and 'entries after the first' are wrong when an option is present. ProfilesService, OutboundService and BlackoutService moved from root to page-scoped providers, so they stop polling when you leave the page; the description doesn't mention this.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
#4604 added NameProfileFirewallSections and #4608 added Migration::purpose
without it, so master's startwrt-core no longer compiled.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
@helix-white

Copy link
Copy Markdown
Member

Merged origin/master (f4ae12b) into the branch as 6f907cff0, then added one fix in 1cce09a35.

How the conflicts were resolved

  • uciedit/src/syntax.rs: started from master's file, which has fix(start-wrt): read and write UCI values the way libuci does #4602 squashed in plus Config::insert and Section::set_name, and reapplied this PR's own changes since 6a019619e: header_src, token lines and located invalid errors. I checked lib.rs, syntax.rs, tests.rs, ARCHITECTURE.md and the changelog. Against master, each differs only by this PR's own diff, so no fix(start-wrt): read and write UCI values the way libuci does #4602 hunk is duplicated.
  • devices.rs: took master's call to reservations::profile_networks. That shared function now reads ipv4()/ipv4_netmask() in place of ipaddr/netmask. So a CIDR ipaddr still yields its profile network, as it did in the PR's inline version.
  • profiles.rs: kept master's new name_profile_firewall_sections and this PR's shortened heal_ipv6_state doc plus lan_ipv6_off.
  • published_ports.rs: master deleted affected_wifi_ports_for_vacated_profiles, so the PR's edit to it is gone. The PR's zone_for_ipv4 change merged cleanly.
  • i18n dictionaries: master took keys 602–618, so this PR's 12 strings move to 619–630 in all five languages. The text is unchanged.

Extra fix: master did not compile startwrt-core. #4604 added Migration::NameProfileFirewallSections and #4608 added the exhaustive Migration::purpose match, but neither included the other's change. 1cce09a35 adds its purpose: "name the firewall rules earlier versions created for each profile".

Verification on 1cce09a35

  • make start-wrt-test: 889 startwrt-core and 37 uciedit tests pass.
  • npm run check:wrt, npm run check:i18n:wrt, make start-wrt-rpc-bindings-check and make format-check also pass, and none of them regenerated anything.
  • No bench run since the merge.

Not changed: the approval brief's open points still stand. The /24 block needs a maintainer decision, and duplicate scalar options still read the first value.

@helix-white
helix-white requested a review from dr-bonez November 9, 2026 19:14
@helix-white

Copy link
Copy Markdown
Member

The Run Automated Tests and Changelog fragments & versions failures reported for run 42667431769 were on the superseded head a44937ef8. Both stopped in the Debian publish test (release-notes-test) at debian/publish.sh: line 245: apt-ftparchive: command not found, which says the runner image lacks apt-ftparchive. This PR does not touch debian/ or the root Makefile. CI for the current head 1cce09a35 is still running.

helix-white
helix-white previously approved these changes Nov 9, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 1cce09a35. git merge-tree against current master (04fff2e12) is clean. Since my approval at a44937ef8, two commits were added: the merge of master (6f907cff0) and a one-line fix (1cce09a35). I read the remerge diff of every conflicted file and the fix.

  • uciedit/src/syntax.rs: the resolution is master's file with this PR's token line numbers, header_src and located errors applied on top. That includes master's new Section::set_name. Master's new Token constructors carry line: None, so nothing reached through master's code loses its line.
  • devices.rs: the PR's inline profile-network code gives way to master's shared reservations::profile_networks. The merge changes that function to read ipv4()/ipv4_netmask(), so a CIDR ipaddr still yields its profile subnet. Every remaining non-test read of ipaddr or netmask in ctrl goes through those accessors or writes the field.
  • published_ports.rs: master deleted affected_wifi_ports_for_vacated_profiles, so the PR's CIDR edit to it correctly disappears with it.
  • profiles.rs: both sides are kept, master's name_profile_firewall_sections and the PR's heal_ipv6_state doc.
  • i18n: the PR's 12 strings move to keys 619–630 in all five dictionaries with unchanged text. They don't collide with master's 602–618.
  • 1cce09a35: origin/master is missing the Migration::purpose arm for NameProfileFirewallSections, so startwrt-core does not compile there. The added arm is the fix that's needed.
  • No new root-scoped pollers: master added no root-provided FormService that could misattribute a load error to another page.

This verdict comes from reading the code. I ran nothing this round.

Brief

Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?

Summary

  • config.check reads ddns, dhcp, firewall, network, startwrt and wireless, and reports what a page cannot represent, with file, line, section, option and value.
  • A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
  • An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last option and any list items after it, otherwise every list item.
  • A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
  • Additional fixes:
    • heal_ipv6_state acts only on a dhcp.lan in the off state StartWRT writes.
    • bootstrap_admin_profile no longer adds a second Admin profile when the existing one fails its typed read.
    • A Vec field reads option proto 'udp' as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration.
    • Typed-read errors name the line, option and value.
    • Profile subnets from reservations::profile_networks respect a CIDR ipaddr.
    • Master's missing Migration::purpose arm is added, which restores the startwrt-core build.

Implementation diff: +1493 / −122 lines in 36 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.

Data model

  • New config.check RPC returning ConfigCheck { findings: ConfigFinding[] }, with ConfigView and ConfigProblem. It is additive for API callers.
  • NetworkInterface.ipaddr becomes Ipv4Address, which keeps a prefix length, and the prefix wins over netmask, as in netifd.
  • Nothing changes on disk until a save. A typed write of an accept_list field (DhcpHost.mac, ipaddr, ip6addr) replaces the effective value, keeps the items after it and removes the lines an option overrode.

Approach

  • Form errors reach ConfigCheckService through the existing FormService. ProfilesService, OutboundService and BlackoutService move to component scope, like every other form service, so a poller cannot outlive its page and block another one.
  • My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added effective().

Flags

  • Stale description: the PR description still says it is stacked on #4602 (now in master). It doesn't mention the /24 block or the page-scoped pollers. It describes accept_list writes as keeping "the rest", which is wrong when an option overrides earlier lines. I have not edited the author's text.
  • Duplicate scalar options (not changed here): non-accept_list fields such as netmask still read the first option while libuci keeps the last. A hand-written duplicate netmask could therefore hide a non-/24 mask from the new finding.

Testing

  • After the merge, on 1cce09a35: the implementing session reports that make start-wrt-test passes (889 startwrt-core, 37 uciedit). It also reports passing check:wrt, check:i18n:wrt, the RPC-bindings check and format-check, none of which regenerated anything.
  • Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
  • CI on this head: Conflict Markers, Prettier and change detection pass. Automated Tests, Formatting & Lockfiles, Generated Artifacts, Dependency Licenses, Changelog fragments and the riscv64 binary build are pending.
  • Not exercised: a real LuCI session, a real Wi-Fi client, os-bench, and translation review by native speakers.

Screenshots (the UI is unchanged since a44937ef8; the merge only renumbered translation keys)

Custom configuration in place of the LAN page

Notice above the WAN page, settings still usable

Settings is never replaced

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white
helix-white dismissed their stale review November 9, 2026 19:16

Dismissed by Helix: the changes require a substantive PR brief update. Between a44937e and 1cce09a the PR was retargeted to master and merged with master f4ae12b, and it gained a commit with new scope. 1cce09a adds the Migration::purpose arm for NameProfileFirewallSections, which restores the startwrt-core build on origin/master. The approved brief's list of additional fixes does not include this. The approved brief also said the PR was stacked on #4602, which was still open; #4602 has since merged and the PR now targets master, so that merge-order fact is wrong. The merge resolution also moves the PR's CIDR-aware profile-subnet logic into master's shared reservations::profile_networks (the merge commit edits it to use ipv4()/ipv4_netmask()), and the PR's edit to the deleted affected_wifi_ports_for_vacated_profiles is gone. The brief needs updating for the new fix and the retarget.

@helix-white

Copy link
Copy Markdown
Member

Run Automated Tests on 1cce09a35 failed on one test: tunnel::web::listener::tests::ui_ipv6_and_dual_stack_listeners_remain_reachable in start-core, with Address already in use (os error 98) at listener.rs:127. That test asks the OS for a free port, closes it, and then binds UiListener to the same port. A parallel test can take the port in between, so the test can fail regardless of the change under test. This PR does not touch shared-libs/. All 1333 other tests passed, and every StartWRT test passed. The job needs a rerun once the rest of the workflow finishes (Generated Artifacts is still running). The test's port race belongs in a tunnel change, not this PR.

…-config

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b

# Conflicts:
#	projects/start-wrt/backend/ctrl/src/migrate.rs
@helix-white

Copy link
Copy Markdown
Member

Merged origin/master (0b69dc3fb) as 1307b29c3. The only conflict was ctrl/src/migrate.rs. #4656 landed master's own description for Migration::NameProfileFirewallSections, the same build break 1cce09a35 fixed here, so I took master's wording. This PR no longer changes migrate.rs.

make start-wrt-test on 1307b29c3 passes: 889 startwrt-core and 37 uciedit tests.

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 1307b29c3. git merge-tree against current master is clean. Since my approval at 1cce09a35, the only new commit is the merge of master (0b69dc3fb). Its one conflict was in ctrl/src/migrate.rs, where #4656 had landed master's own Migration::purpose arm for NameProfileFirewallSections. The resolution takes master's wording, so this PR no longer touches migrate.rs. Within projects/start-wrt, this merge changed only docs/src/faq.md and migrate.rs, and neither interacts with this PR's changes. The merge resolutions I checked at 1cce09a35 carry over unchanged. This verdict comes from reading the code; I ran nothing.

Brief

Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?

Summary

  • config.check reads ddns, dhcp, firewall, network, startwrt and wireless, and reports what a page cannot represent, with file, line, section, option and value.
  • A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
  • An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last option and any list items after it, otherwise every list item.
  • A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
  • Additional fixes:
    • heal_ipv6_state acts only on a dhcp.lan in the off state StartWRT writes.
    • bootstrap_admin_profile no longer adds a second Admin profile when the existing one fails its typed read.
    • A Vec field reads option proto 'udp' as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration.
    • Typed-read errors name the line, option and value.
    • Profile subnets from reservations::profile_networks respect a CIDR ipaddr.

Implementation diff: +1490 / −122 lines in 35 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.

Data model

  • New config.check RPC returning ConfigCheck { findings: ConfigFinding[] }, with ConfigView and ConfigProblem. It is additive for API callers.
  • NetworkInterface.ipaddr becomes Ipv4Address, which keeps a prefix length, and the prefix wins over netmask, as in netifd.
  • Nothing changes on disk until a save. A typed write of an accept_list field (DhcpHost.mac, ipaddr, ip6addr) replaces the effective value, keeps the items after it and removes the lines an option overrode.

Approach

  • Form errors reach ConfigCheckService through the existing FormService. ProfilesService, OutboundService and BlackoutService move to component scope, like every other form service, so a poller cannot outlive its page and block another one.
  • My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added effective().

Flags

  • Stale description: the PR description still says it is stacked on #4602 (now in master). It doesn't mention the /24 block or the page-scoped pollers. It describes accept_list writes as keeping "the rest", which is wrong when an option overrides earlier lines. I have not edited the author's text.
  • Duplicate scalar options (not changed here): non-accept_list fields such as netmask still read the first option while libuci keeps the last. A hand-written duplicate netmask could therefore hide a non-/24 mask from the new finding.

Testing

  • On 1307b29c3: the implementing session reports that make start-wrt-test passes (889 startwrt-core, 37 uciedit). It reports passing check:wrt, check:i18n:wrt, the RPC-bindings check and format-check on 1cce09a35. The latest merge touched only migrate.rs and a docs page.
  • Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
  • CI on this head: Conflict Markers and change detection pass. Prettier, Changelog fragments and the riscv64 binary build are pending.
  • Not exercised: a real LuCI session, a real Wi-Fi client, os-bench, and translation review by native speakers.

Screenshots (the UI is unchanged since a44937ef8; the merge only renumbered translation keys)

Custom configuration in place of the LAN page

Notice above the WAN page, settings still usable

Settings is never replaced

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white
helix-white dismissed their stale review November 9, 2026 21:58

Dismissed by Helix: the changes require a substantive PR brief update. The approved brief at 1cce09a listed an additional fix: this PR adds master's missing Migration::purpose arm for NameProfileFirewallSections and so restores the startwrt-core build. The merge 1307b29 of master 0b69dc3 resolved the migrate.rs conflict to master's own arm from #4656, and migrate.rs now matches master, so the PR no longer contains that fix and the brief's scope must drop it. The rest of the endpoint diff is identical to master's own changes from f4ae12b to 0b69dc3 (within start-wrt only docs/src/faq.md), and the PR's other behaviour is unchanged.

…-config

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b

# Conflicts:
#	projects/start-wrt/web/src/app/i18n/dictionaries/de.ts
#	projects/start-wrt/web/src/app/i18n/dictionaries/en.ts
#	projects/start-wrt/web/src/app/i18n/dictionaries/es.ts
#	projects/start-wrt/web/src/app/i18n/dictionaries/fr.ts
#	projects/start-wrt/web/src/app/i18n/dictionaries/pl.ts
@helix-white

Copy link
Copy Markdown
Member

Merged origin/master (69e08770e) as 5ade4f2ad. The only conflicts were the five StartWRT i18n dictionaries. #4470 took keys 619–620 for its two Wi-Fi password strings, so this PR's 12 strings move up two, to 621–632, in every language. The text is unchanged and nothing else changed.

npm run check:i18n:wrt, npm run check:wrt and Prettier on the dictionaries pass on 5ade4f2ad.

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 5ade4f2ad. git merge-tree against current master is clean. Since my approval at 1307b29c3, the only new commit is the merge of master (69e08770e, on master). Its only conflicts were the five StartWRT dictionaries. #4470 took keys 619–620 for its Wi-Fi password strings, so this PR's 12 strings move to 621–632 in every language with unchanged text. Each dictionary has all 14 keys from 619 to 632, with master's two followed by this PR's twelve. Apart from that, the merge only brings in master's own changes to the Wi-Fi password dialog, help, docs and changelog. It adds no root-provided FormService and touches no code this PR changed. This verdict comes from reading the code; I ran nothing.

Brief

Decision for the maintainer: any LAN or profile interface with a mask other than /24 now loses its LAN and Profiles pages. The forms can only write LAN_NETMASK (/24), so saving used to turn a custom /16 into /24 without warning. Now both pages show Custom configuration and send the user to LuCI. The cost is that someone with a /16 LAN can no longer use either page, even for settings unrelated to the mask. The alternative is to carry the mask through lan.ipv4-set and the profile forms, which is more work and needs a UI for it. Should the block ship as it is, or should the forms learn to keep the mask?

Summary

  • config.check reads ddns, dhcp, firewall, network, startwrt and wireless, and reports what a page cannot represent, with file, line, section, option and value.
  • A page with blocking findings shows Custom configuration in place of its settings, with "Launch LuCI Interface" and "Check again". Settings is never replaced.
  • An address that libuci keeps in addition to the one the page reads is a notice above the page, not a block. libuci keeps the last option and any list items after it, otherwise every list item.
  • A form load that fails with codes 1003–1006, 1009–1012 or 1022 shows the same page instead of a toast on every poll.
  • Additional fixes:
    • heal_ipv6_state acts only on a dhcp.lan in the off state StartWRT writes.
    • bootstrap_admin_profile no longer adds a second Admin profile when the existing one fails its typed read.
    • A Vec field reads option proto 'udp' as words instead of as an empty list. An empty list counts as every protocol in the reserved-port and inbound checks. The same reading now also applies to master's firewall-section naming migration.
    • Typed-read errors name the line, option and value.
    • Profile subnets from reservations::profile_networks respect a CIDR ipaddr.

Implementation diff: +1490 / −122 lines in 35 files (excludes lockfiles, tests, docs, release notes, and changelog). That includes 134 generated binding lines and 60 translation-dictionary lines.

Data model

  • New config.check RPC returning ConfigCheck { findings: ConfigFinding[] }, with ConfigView and ConfigProblem. It is additive for API callers.
  • NetworkInterface.ipaddr becomes Ipv4Address, which keeps a prefix length, and the prefix wins over netmask, as in netifd.
  • Nothing changes on disk until a save. A typed write of an accept_list field (DhcpHost.mac, ipaddr, ip6addr) replaces the effective value, keeps the items after it and removes the lines an option overrode.

Approach

  • Form errors reach ConfigCheckService through the existing FormService. ProfilesService, OutboundService and BlackoutService move to component scope, like every other form service, so a poller cannot outlive its page and block another one.
  • My first review proposed the page-scoped pollers, the /24 finding and the discarding of overridden lines. The author adopted them and added effective().

Flags

  • Stale description: the PR description still says it is stacked on #4602 (now in master). It doesn't mention the /24 block or the page-scoped pollers. It describes accept_list writes as keeping "the rest", which is wrong when an option overrides earlier lines. I have not edited the author's text.
  • Duplicate scalar options (not changed here): non-accept_list fields such as netmask still read the first option while libuci keeps the last. A hand-written duplicate netmask could therefore hide a non-/24 mask from the new finding.

Testing

  • Reported by the implementing session: make start-wrt-test passes on 1307b29c3 (889 startwrt-core, 37 uciedit). check:i18n:wrt, check:wrt and Prettier on the dictionaries pass on 5ade4f2ad. The RPC-bindings check and format-check passed on 1cce09a35.
  • Bench router: the author's recorded runs predate the review-driven commits and the merge. Nothing has been run on the bench since.
  • CI on this head: Conflict Markers and change detection pass. Prettier, Changelog fragments and the riscv64 binary build are pending.
  • Not exercised: a real LuCI session, a real Wi-Fi client, os-bench, and translation review by native speakers.

Screenshots (the UI is unchanged since a44937ef8; the merges only renumbered translation keys)

Custom configuration in place of the LAN page

Notice above the WAN page, settings still usable

Settings is never replaced

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white
helix-white merged commit 367b22c into master Nov 10, 2026
11 checks passed
@helix-white
helix-white deleted the wrt/unrepresentable-config branch November 10, 2026 00:52
Dominion5254 added a commit to sovsender/start-technologies that referenced this pull request Nov 10, 2026
…Wireless WAN page

config.check from Start9Labs#4611 reported every client-mode wifi-iface whose
network is not lan as Unsupported for the Wi-Fi page, so joining a
network from Wireless WAN replaced the Wi-Fi page with Custom
configuration, naming the section StartWRT had just written. The Wi-Fi
page now skips client interfaces: it never writes them, and wifi.set
refuses to turn off a radio one uses. An enabled one set up outside
StartWRT is a notice on the Wi-Fi page instead, since its band follows
the upstream channel and stays on.

Wireless WAN becomes the `wwan` view: a syntax error in wireless,
network, firewall or startwrt, an unreadable radio, station or route
metric, a missing wan zone, or an encryption on wireless.wwan the page
cannot show now replaces it with Custom configuration. wwan.get raises
CorruptedWifi rather than InvalidValue for that encryption, so a load
that races the check hands off to the same page instead of toasting.

Start9Labs#4611's list reading also fixes the zone write: a wan zone written as
`option network 'wan wan6'` gains and loses wwan as list entries, with
a test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants