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
A network table in a later minimal.toml layer silently drops the network keys of an earlier layer #3597
A network table in a later layer of minimal.toml replaces the network table of an earlier layer whole. Keys the earlier layer set are dropped, and nothing tells the user.
$ min box spec dev
# network: from [defaults.session]
# network.mode: from the default
[network]
mode = "host_ip"
[network.bep]
steering = "proxy_env"
The egress table from [defaults.network] is gone. Moving bep to [defaults.network.bep] gives a spec with both bep and egress.
In practice the user saw only an indirect symptom: a start refused because a secret's host was not in egress.allow_dns_hosts, while the file plainly listed it.
Cause
Layers merge network as one value. entry_egress in crates/minimal/src/cmd/boxes/create.rs states it: "The merge replaces a table whole, so the last layer that declares network holds the expanded entry's network table." The order is [defaults], [defaults.<type>], the entry.
So this is the designed merge. The defect is that a file that sets network keys in two layers loads with no message, and the result differs from what the file reads as.
Expected
network merges by sub-table (egress, bep, ingress, ...), so a later layer replaces only the sub-tables and keys it sets, and an earlier layer's other network keys survive. entry_egress reads the same merge. min box spec <entry> still shows which layer each network key came from. A test covers the reproduce case above: the spec holds both bep and egress.
Related
[defaults.session.network] currently refuses egress, mode and ingress, so bep and egress cannot both be set in that layer. A user who starts with [defaults.session.network.bep] has no table in the same layer for egress.
Footprint
crates/mfile/src/expand.rs (layer merge, or a load-time check)
crates/minimal/src/cmd/boxes/create.rs (entry_egress reads the same merge)
Approach changed after the arch review on #3619: architecture.md replaces every table but [env_vars] wholesale, network included. The fix is now the issue's second option: a file whose later layer's network table drops keys an earlier layer set is refused at load, naming both tables and the dropped keys.
Activity
norrietaylor commentedon Nov 19, 2026
Approach changed after the arch review on #3619: architecture.md replaces every table but
[env_vars]wholesale,networkincluded. The fix is now the issue's second option: a file whose later layer'snetworktable drops keys an earlier layer set is refused at load, naming both tables and the dropped keys.