Repository navigation
CONDITIONS
Inputs. First ruling on #3703 at 0062a4e2, on arch 4f2eb87d. No since.diff, since-conditions.json, findings.json or arch-map.md is staged. So I read pr.diff whole and found the sections by search. No entry in prior-rulings.json is on this PR, on #3646, or on publish-time binds (NET-121, NET-144). No precedent applies.
Governs. specs/networking/deployment-and-egress-gateway.md §7.1, the degraded-mode profile (line 247). It applies to LocalVM and to co-resident SharedLinux (§7.4), and a native Linux host is the second. Its enforcement-parity bullet (line 255) sets the bind discipline. The bind succeeds before the name is published. A failed bind is a surfaced error, never a silent fallback.
Ruling. The main path conforms. A native finalize draws the box's lease (SwitchClient::draw_for_activation) and binds the declared forwards with bind_declared_at_publish before the record goes Active. A held port gives the typed refusal and rolls the lease back. Stop and destroy release a bind that no attach claimed (release_activation_forwards), and a failed attach releases it through detach. Two paths deviate from line 255. (1) When the native switch does not start, setup.rs logs a warning, probes with host_ports_in_use and lets the box go Active with its name published and no forward bound. The VM-backed arm fails the finalize on the same kind of error. A log record does not surface an error to the user. That is the silent fallback the line forbids (C1). (2) finish_own_ip_attach adopts the activation forwards whenever any exist and skips the bind. It does not check them against the attach's published address or its current yielded ports. A native box activated at the 127.0.0.1 interim under a pending range verdict moves to its hand on a present landing. move_exposed_ports and release_moved_declared do nothing before the first attach (has_live_host() is false). So the attach adopts forwards at the interim while the name answers at the new address. Before this change the attach bound at the current address. A NET-129 hand-over to a stopped box also binds "at its next attach", and the adopt arm skips it too. The PR body names the move case as a known gap, with no issue. A residual cannot carry it, because this change causes the regression (C2).
Not a design question. The activation binds are kept on SwitchClient and not on the actor, and provider.rs is outside the task's layers. Both differ from the task plan and not from the design. The design does not name the struct that holds the forwards, so I do not rule on this.
Not checked. I did not build the change or run a test. I did not check which existing tests finalize a native own-IP box with ingress and no gvproxy, so I do not know how many tests C1 affects. The truncated end of the PR body's known-gaps note was not available to me.
Conditions
- C1:
crates/minimald/src/box_actor/setup.rs, native(false, _)arm of the finalize publish check: in theSome(Err(e))branch (the switch did not start at activation), return the error so the finalize fails, as the VM-backed arm does for a failed bind that is not a held port (None => return Err(e)). Remove thetracing::warn!and thehost_ports_in_usefallback probe there. When no caller ofcrate::net::policy::host_ports_in_usestays outside its tests, remove the function and its tests, as the task's net layer says. Tests that finalize a native own-IP box with declared ingress and no gvproxy useSwitchClient::serve_externallyor a stand-in switch. - C2:
crates/minimald/src/net/gvproxy_network.rsfinish_own_ip_attach, arm(_, Some(published)) if adopted.is_some(): adopt a forward fromtake_activation_forwardsonly when its host address (PortForwarder::host_port) equalspublishedand its port is not in the attach's currentOwnAddressReporter::shared_port_collisions. Unbind every other activation forward withpolicy::release_declared_ingress. Bind each declared mapping that has no adopted forward throughapply_ingress_naming_holderstowardlease_ip, with the same failure rollback as the(Some(ingress), Some(published))arm. Add a test in the same module: a native finalize binds at the127.0.0.1interim, the publish moves before the first attach, and the attach leaves the declared ports bound at the new address and none at the interim.
Ruled at 0062a4e against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5; arch_rulings 1574, job 3a6739fa-5a11-4667-82a9-e1d9acb6b004.