Skip to content

T79 — Drop a box's flows to the switch's own addresses in the shared verdict - #1943

Merged
norrietaylor merged 21 commits into
mainfrom
agent/1874-drop-a-box-s-flows-to-the-switch-s-own-addresses
Oct 4, 2026
Merged

norrietaylor merged 21 commits into
mainfrom
agent/1874-drop-a-box-s-flows-to-the-switch-s-own-addresses

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

T79 — Drop a box's flows to the switch's own addresses in the shared verdict

slice: S9
kind: task
covers: NET-062
size: S
est: 120 code, 200 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the daemon log tail carries each such drop in the shared refusal line format with the reason naming the switch's own address, so a box that cannot reach its gateway on a port it expected reads why in a bundle
observability: the existing rate-limited egress-drop warn line carries the drop, its reason naming the infrastructure deny set; no new line
layers:
- sessions:
- crates/sessions/src/core/egress.rs: the shared frame verdict subtracts the switch's own addresses (the gateway, the host alias, the node address and the BEP peer address the caller hands it) from whatever a box's egress.allow_subnets admits, as the infrastructure deny set design §5.3 names, except at the three port-scoped openings NET-062's sub-clause lists: the resolver's port on the gateway address; the proxy's address for a box on a credentialed lane; configured host exposures over the host alias, reached as local reach under the box's rules. The verdict for such a flow is a drop, never a reset. The native relay in crates/minimald/src/net/switch.rs is the only leg on a native host and takes the verdict through its existing call; the VM host gate keeps its own copy (egress_gate.rs box_cannot_reach_switch_api) and is not edited
test: cargo nextest run -p sessions switch_addresses_egress_dropped_not_reset
test: cargo nextest run -p sessions switch_address_openings_admit_only_their_ports
- daemon:
- crates/minimald/src/net/switch.rs: hands the verdict the switch's own addresses for the native relay's placement; no other change
test: cargo nextest run -p minimald native_relay_drops_flows_to_switch_addresses
produces: none
consumes:
- crates/sessions/src/core/egress.rs
- crates/minimald/src/net/switch.rs
proof: On a native host, a box whose allow_subnets cover the switch subnet still cannot open a flow to the switch's own addresses outside the three port-scoped openings; the flow is dropped silently and never reset, the drop shows in the existing rate-limited warn line naming the infrastructure deny set, and each opening admits exactly its port; the VM host gate's own copy is unchanged.
depends on:
- blocked by #1800

Behaviour change (read before release)

Box-to-host reach over the host alias (host.min.internal, and the deprecated literal 100.64.255.254) is now default-deny, except configured host exposures (design §7.1). The relay that enforces it also runs inside the VM, so this applies on every host kind as soon as this merges. There is no host-exposure configuration yet (gominimal/inbox#867). Until there is, an own-address box can't reach any host service over the alias, for example a dev database on the host. The owner accepted the gap for this merge.

Release note: "Boxes with their own address no longer reach host services through host.min.internal or 100.64.255.254 unless the host exposes them. The deprecated literal follows the name's rule."

Interim opening: own-address boxes still reach the :7654 Host-header proxy at the node address, on TCP at the configured proxy port only and under the box's own rules (NET-070/071 parity). This opening retires with the proxy. The spec amendment is in #1946.

Spec ordering: merged ahead of spec #1946 by user decision. The NET-062 fourth opening and the NET-003/004 clarifications ship before their spec text. #1946 stays open as the follow-up.

Follow-ups: gominimal/inbox#867 (host exposures) and gominimal/inbox#868 (VM host gate parity, and the NET-004 deprecation notice on a dropped connection).

Out of the plan's layers

  • scripts/session-e2e.sh: e2e layer added to the plan by architecture ruling.
    • NET-003's own-address leg checks resolution only.
    • NET-004 asserts a silent drop.
    • NET-070 pair 5 asserts the proxy's 403.
    • The T45 no-lane control now resets at a sibling box's lease, because the node address and the alias are dropped.
  • crates/minimald/src/{server.rs,session.rs,net/mod.rs,net/gvproxy_network.rs,net/dns.rs,net/proxy.rs,net/listeners.rs} and crates/minimald/tests/netns_root_integration.rs: thread the configured hostname-proxy port into compiled_egress, so the relay and the proxy's caller check compile the same rules.

Known limitation: an unpinned daemon that finds 7654 busy and binds an OS-chosen port keeps the opening at 7654. That fails closed: own-address boxes can't reach that proxy.

Proof

On a native host, a box whose egress.allow_subnets cover the switch subnet still cannot open a flow to the switch's own addresses outside the three port-scoped openings: the relay (the only leg a native host runs) drops the gateway outside the resolver's port and the node address at every port ahead of the box's rules, silently and never reset, and the drop shows in the existing rate-limited warn line under rule_matched="egress-infrastructure-destination" naming the box, the direction, the switch address and port, and the protocol; each opening admits exactly its port — the resolver's port on the gateway over UDP and TCP alike (falling through to the box's rules), the proxy's listener for a box on a credentialed lane (the NET-134 arms ahead of the set), and the host alias as local reach under the box's rules; and the VM host gate's own copy in minvmd is byte-for-byte unchanged.

Notes from the agent: Design reading that needed deciding: NET-062's third opening says 'configured host exposures over the host alias, reached as local reach under the box's rules', but no host-exposure configuration surface exists anywhere in the tree today. Subtracting the alias with an empty exposure list would drop every host-alias flow and break the spec's own proofs: the un-edited minvmd gate treats the alias as 'local reach, decided by the row's CIDR rules' (its infrastructure_destinations_drop_on_the_host_for_every_row test asserts an allow-all row's alias frame reaches the switch), and the session e2e's NET-003/NET-004 case proves an allow-all own-address box reaches host.min.internal and the deprecated literal at an arbitrary host port through the shared verdict. So the set carries the exposure ports as an explicit parameter (SwitchOwnAddresses::with_host_exposure_ports, defaulting to none): with none configured the alias falls through to the box's own rules — the shape the gate and the e2e hold — and once a host configures exposures, exactly those ports fall through a…[truncated]

Tests

line exit tail
cargo nextest run -p sessions switch_addresses_egress_dropped_not_reset 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2e89... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/682c6/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/682c6/tree/crates/ot) C
cargo nextest run -p sessions switch_address_openings_admit_only_their_ports 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-4b13... Finished 'test' profile [unoptimized] target(s) in 0.39s ──────────── Nextest run ID 1beff498-41d3-4bec-a744-f15a5b62321b with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald native_relay_drops_flows_to_switch_addresses 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-1b0a... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/a1bf9/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/a1bf9/tree/crates/ot) C

Verify

min task run agent-verify exited 101, so this PR is a draft.

Applying loadouts: default
Running task runtime-implement-verify in session task-runtime-implement-verify-4ff1...
    Checking args v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/args)
    Checking ot v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/ot)
    Checking paths v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/paths)
   Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/stdlib)
   Compiling version v0.7.0 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/version)
    Checking common v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/common)
    Checking diagnostics v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/diagnostics)
    Checking async-dialog v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/async-dialog)
    Checking switch v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/switch)
    Checking mlog v0.0.1 (/home/runner/.local/state/minimal/sessions/8248a/tree/crates/mlog)
error: using `chunks_exact` with a constant chunk size
   --> crates/switch/src/refusal.rs:205:10
    |
205 |         .chunks_exact(2)
    |          ^^^^^^^^^^^^^^^ help: consider using `as_chunks` instead: `as_chunks::<2>().0.iter()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: using `chunks_exact` with a constant chunk size
   --> crates/switch/src/refusal.rs:209:31
    |
209 |     if let Some(tail) = bytes.chunks_exact(2).remainder().first() {
    |                               ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/switch/src/refusal.rs:209:31
    |
209 |     if let Some(tail) = bytes.chunks_exact(2).remainder().first() {
    |                               ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks

error: could not compile `switch` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Base

The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:

  • crates/sessions/src/core/egress.rs

Closes #1874

CI KVM evidence at 7ac770e (run 37203233656)

  • Rust escape harness: minvmd::vm_escape_integration vm_escape_bounded_to_resident_union PASS (22.6 s).
  • Shell escape proof: escape reaches only the declared union OK.
    • Runner address: 10.1.0.189, declared as a /32 by both boxes.
    • Both boxes' own probes arrived at it.
    • No egress-infrastructure-destination line named it.
    • The outside spoof 203.0.113.7 was refused on egress-unknown-source.
    • beyond-a was refused on egress-undeclared-subnet.
  • Hostname proxy pairs: pair 5 got HTTP 403 on the caller's egress rules (egress-undeclared-subnet); pair 4 had no ingress mapping.

Rounds after the T79 head stabilised

  • 0f46596: the proxy-views proof's laneless control resets at a sibling's lease, not at the node address, which this PR drops. It's the same pattern as 866a0a7.
  • 7ac770e: the escape-union e2e reaches the runner's own address rather than the host alias. This mirrors 6bb3d1e in the Rust harness, and it fails rather than skips when the address is unusable.
  • Follow-up: gominimal/inbox#879 gives the cross-box arms public test ranges.

NET-062's sub-clause: the shared frame verdict grows the switch's own
addresses — the gateway, the host alias, the node address and the BEP
peer the caller hands it — as an opt-in set attached by
with_switch_own_addresses, subtracted from whatever the box's
egress.allow_subnets admits, as the infrastructure deny set design §5.3
names, and dropped ahead of the declared dimensions under the
egress-infrastructure-destination rule string, the one the VM host's
gate refuses the same set with.

The three port-scoped openings fall through to the box's own rules: the
resolver's port on the gateway over TCP or UDP (the UDP carve-out ahead
of the set already admits the query under any declaration, and a TCP
query keeps the verdict its rules give it); the proxy's listener for a
box on a credentialed lane (the NET-134 arms ahead of the set, which
decide the peer's whole address once a listener is compiled); and the
host alias reached as local reach under the box's rules (NET-003) — the
whole alias while no host exposure is configured, the shape the VM
host's gate holds and the session e2e proves, and exactly the configured
exposure ports once one is, via with_host_exposure_ports. The node
address has no opening.

The set is absent from EgressRules::new and from_policy, so the Kani
oracle's shape over new and the proxy builders still holds and the VM
host gate's rows — compiled without it — decide as they did; the gate's
own copy in minvmd is not edited.
NET-062's sub-clause on the native relay — the only leg a native host
runs, with no minvmd gate beside it: compiled_egress now hands the
verdict the switch's own addresses, resolved from the subnet it already
carries — the gateway, the host alias, the node address and the BEP
peer — so a box whose egress.allow_subnets cover the switch subnet still
cannot open a flow to them outside the three port-scoped openings. No
host exposure is configured anywhere today, so the set is handed with
none and the host alias stays local reach under the box's own rules
(NET-003's shape, the one the VM host's gate holds and the session e2e
proves); the gateway outside the resolver's port and the node address at
every port are the relay's own drops, named by the existing rate-limited
warn line under the infrastructure deny set's rule.

The same compilation is the hostname proxy's caller check (NET-070), so
no reach the relay would refuse can be asked of the proxy instead, and
the DropReason arm drop_transport reads carries the new reason's
protocol. The VM host gate's own copy in minvmd is not edited.
The set's doc said the resolver carve-out and the proxy listener
arms sit 'above' its decision — true of the verdict's order, not of
the file, where both live below the set's definition. Name the order
instead.
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1cb39ff2-1267-4e8d-a750-1460375369b9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Box-to-host reach over the host alias is default-deny except the host's
configured exposures (design §7.1, NET-062). The box's rules decide reach
within an exposure but never open the alias by themselves, so with no
exposure configured the alias now drops at every port.

The sessions tests pin the drop for an allow-all box with no exposure, the
exposure port falling through to the box's rules, and a non-listener port
at the BEP peer dropping for an allow-all box on a credentialed lane. The
native relay test moves the alias frame into the dropped set.
The switch lanes run minimald's relay in the guest, so the host alias is
default-deny there too (design §7.1). The own-address NET-003 leg now
asserts resolution of host.min.internal to the alias only, and the NET-004
leg asserts a silent drop: no reset, an elapsed floor, and the relay's
egress-infrastructure-destination line where the daemon log is readable.

The deprecation notice is no longer asserted: the relay emits it only for
a frame its verdict admits. Both spots carry TODO(host-exposure) for the
positive reach arms.
…terim

The in-guest hostname proxy listens on the node address, which the own-address
set dropped at every port, so a box's proxied request never reached it. While
the interim :7654 Host-header proxy is served (design §7.1), TCP to its port on
the node address falls through to the box's own rules; every other port, and
UDP, stays the set's drop. The opening retires with the proxy.

The port is the one the proxy's first bind asks for: the configured or
host-handed port, else the documented default. It rides on the switch client
into every box's compiled rules and the proxy's caller check alike.
The KVM lane's two controls asserted the shape NET-062's sub-clause
replaced: the no-lane case's control read a reset at the daemon's own
address (100.64.255.253), and the proxy parity case's pair 5 read the
in-guest proxy's 403 through that same address. The shared verdict now
drops a box's flows to the switch's own addresses ahead of its rules,
silently and never as a reset, so both controls fail a correct lane.

The no-lane control now probes the host alias instead — the address
gvproxy NATs to the host's loopback for every port, local reach an
allow-all row admits on both legs — at the proxy's port, where nothing
on the host listens, so the host's kernel resets the connect. That
covers every leg the silence probe crosses: resolution, the fabric,
both gates' admit path.

Pair 5 keeps its caller's literal allow (the subtracted destination,
spelled on purpose so the proxied leg's silence is the deny set's, not
the rules') and now asserts the closure: the caller's own relay drops
its connect to the machine's address, curl 28 with no status, so the
request never reaches the proxy — no reach a direct connection would
not have. The proxy's caller check itself is unchanged: it runs the
same compiled rules at the target's lease, which no member of the deny
set is, and its 403 stays pinned by the unit proofs.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 1 on a failed check suite, pushed as 7c6968241554.

line exit tail
cargo nextest run -p sessions switch_addresses_egress_dropped_not_reset 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-1403... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/a790a/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/a790a/tree/crates/ot) C
cargo nextest run -p sessions switch_address_openings_admit_only_their_ports 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-1c6a... Finished 'test' profile [unoptimized] target(s) in 0.45s ──────────── Nextest run ID 17853ad4-84e3-4315-93a6-cdf44366ce27 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald native_relay_drops_flows_to_switch_addresses 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-30e1... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/77251/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/77251/tree/crates/ot) C

Verify min task run agent-verify exited 101.

   Checking ml-kem v0.3.2
    Checking ssh-key v0.7.0-rc.11
    Checking json-subscriber v0.3.0
    Checking generic-array v1.4.4
    Checking async-compression v0.4.48
    Checking russh-cryptovec v0.62.0
    Checking vsock v0.5.4
    Checking vte v0.15.0
    Checking async-tar v0.6.1
    Checking num-bigint v0.5.1
    Checking russh-util v0.52.0
    Checking serde_bytes v0.11.19
    Checking opentelemetry-semantic-conventions v0.33.0
    Checking constcat v0.6.1
    Checking hex-literal v1.1.0
    Checking mlog v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/mlog)
    Checking minimald-rpc v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/minimald-rpc)
    Checking checkouts v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/checkouts)
    Checking decode v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/decode)
    Checking russh v0.63.3
    Checking russh-sftp v2.4.0
    Checking diagnostics v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/diagnostics)
    Checking vt100 v0.16.2 (https://github.com/gominimal/vt100-rust.git?rev=9b8cce5a6798daf061948259ebcb073bb1ea54a6#9b8cce5a)
    Checking tokio-vsock v0.7.2
    Checking hickory-proto v0.26.3
    Checking clap_complete v4.6.11
    Checking async-dialog v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/async-dialog)
    Checking graph v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/graph)
    Checking wait-timeout v0.2.1
    Checking sysinfo v0.39.6
    Checking switch v0.0.1 (/home/runner/.local/state/minimal/sessions/4c6e3/tree/crates/switch)
    Checking bit-vec v0.8.0
    Checking quick-error v1.2.3
    Checking bit-set v0.8.0
error: using `chunks_exact` with a constant chunk size
   --> crates/switch/src/refusal.rs:205:10
    |
205 |         .chunks_exact(2)
    |          ^^^^^^^^^^^^^^^ help: consider using `as_chunks` instead: `as_chunks::<2>().0.iter()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: using `chunks_exact` with a constant chunk size
   --> crates/switch/src/refusal.rs:209:31
    |
209 |     if let Some(tail) = bytes.chunks_exact(2).remainder().first() {
    |                               ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/switch/src/refusal.rs:209:31
    |
209 |     if let Some(tail) = bytes.chunks_exact(2).remainder().first() {
    |                               ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks

error: could not compile `switch` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Outside the task's layers::

  • scripts/session-e2e.sh

Converted to a draft: something above needs a person before review.

On a native host a box whose allow_subnets cover the switch subnet still cannot open a flow to the switch's own addresses outside the three port-scoped openings — dropped silently, never reset, one rate-limited warn line naming the infrastructure deny set, each opening admitting exactly its port, the VM host gate's own copy untouched — and the KVM e2e lane now agrees: its two controls no longer expect the retired reset at the node address (the no-lane control reads the host alias's reset through gvproxy's loopback NAT instead) nor the in-guest proxy's 403 through that address (pair 5 asserts the caller's own relay drops the connect, curl 28 with no status, so the request never reaches the proxy).

Notes from the agent: The directive's failed checks (test-kvm, ci-linux-kvm-success) were caused by two controls in scripts/session-e2e.sh asserting the pre-change shape: the no-lane case's fabric-alive control expected a reset at the node address 100.64.255.253 (the shared verdict now drops it as egress-infrastructure-destination, so socat ran out its window), and the proxy-parity case's pair 5 expected the in-guest proxy's 403 through 100.64.255.253:7654 (the caller's connect is now dropped at its own relay, so no request arrives). The fix belongs in that file, which is OUTSIDE the task's layers (crates/sessions/src/core/egress.rs, crates/minimald/src/net/switch.rs): the layers' unit tests pin the new drop, and no in-layers change can make a lane green whose controls assert the old reset — so I made the two surgical edits there rather than leave the lane red, and name it plainly. The no-lane control now probes the host alias at the proxy's port (gvproxy NATs the alias to the host loopback for every port, nothing listens at 8118 there, so the host kernel resets — the same alias route the NET-004 leg already proves live end to end on every VM lane, and it covers every leg the silence probe crosses). Pair 5 keeps the caller's literal --allow-subnets 100.64.255.2…[truncated]

This reverts commit 5a219af. Pair 5 keeps
reading the in-guest proxy's 403 through the node address, which the
interim hostname-proxy opening admits; the no-lane control is moved by the
next commit instead.
The no-lane case's control read a reset from the node address at the BEP
proxy's port. The own-address set now drops the node address outside the
hostname proxy's port, and the host alias at every port, so neither can
answer. The control now connects to a sibling own-address box's lease at a
port the sibling publishes and nothing listens on, whose kernel resets
it. The probe's meaning is unchanged: silence at the BEP proxy's address.
Every box's own-address set opens the node address at the port the
proxy's first bind asks for. An unpinned daemon that finds the default
busy binds an OS-picked port instead, which no box can reach. The proxy
now says so once when it starts serving, naming both ports and telling
the operator to pin hostname_proxy_port. Tracked in gominimal/minimal#1952.
@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 4, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #1874 by hand.

Box-to-host reach over the host alias is default-deny except configured
host exposures (design §7.1, gominimal/inbox#867), so the boxes' own
relays drop the escape harness's positive controls at the alias. The
harness now binds its listener on the runner's non-loopback interface
address, reached through the switch's NAT as ordinary egress and declared
by both boxes as a /32. It fails if that address is loopback, inside
100.64/10, or in the reserved local range. It also asserts that the gate
logs no infrastructure drop at the address, so its refusals stay the
resident union's.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #1874 by hand.

@norrietaylor
norrietaylor marked this pull request as ready for review October 4, 2026 12:14
@norrietaylor
norrietaylor requested a review from a team as a code owner October 4, 2026 12:14
@minimal-foundry

minimal-foundry Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 32a2cb1aef5d.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none: git log on egress.rs and switch.rs shows the head sits on the PR's own fix commits (16c32e30, cbe4d1ea, 6a1f7b8f); the merge commit c6815c4d preserved the prior T45 credentialed-lane behavior (with_box_egress_proxy/with_credentialed_upstream branch intact).

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was the runtime's review findings). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #1874 by hand.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: round 2 would exceed the cap of 1 (the last trigger was a failed check suite). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #1874 by hand.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 4, 2026

@norrietaylor norrietaylor 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.

Gates met on 7ac770e: ARCH-EXPERT PASS (C1/C2 for both escape proofs, cross arms on the per-row private-space rule), minimal-review approved with no open threads, every required lane green. KVM evidence is in the PR description (run 37203233656).

@norrietaylor norrietaylor removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Oct 4, 2026
@norrietaylor
norrietaylor enabled auto-merge October 4, 2026 13:13
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 4, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
@norrietaylor
norrietaylor removed this pull request from the merge queue due to a manual request Oct 4, 2026
Three conflicts, each a collision between this branch's host-alias
default-deny work and main's T83/T89:

- minimald/src/net/listeners.rs: main's T83 removed the staged-plan
  table and its four tests outright (the plan now rides Launched, no
  process-global table), so its side of the region is taken whole; the
  branch's extra hostname-proxy-port argument survives in the call
  sites the auto-merge already carried.
- minvmd/tests/vm_escape_integration.rs: the escape-union harness keeps
  the branch's runner-address destination (the host alias is
  default-deny for a box now, so the positive controls cannot reach
  it) and takes T89's always-drop posture for the in-plan unregistered
  source: the admit arm is gone, the Ok arm panics, and the stale
  phase language in the declaration comment goes with it.
- scripts/session-e2e.sh: same reconciliation in the escape-union
  case — T89's always-refused arms, the branch's listener address as
  their destination, no esu_alias (undefined in the merged case), no
  phase keying; the case's own-address legs in
  min_internal_names_through_proxy are untouched by the merge.
Two helpers the merge brought in from main call
SessionGate::for_session with the four arguments main's signature has;
this branch's interim node-address opening (16c32e3) made the fifth,
the hostname proxy port, and the merged switch.rs carries it. Both
helpers take None like every other test call site: no proxy opening is
under test in either.
The merge took T89's always-drop posture for the made-up-lease arms
and kept this branch's runner-address destination, so the case's
descriptive header and its OK line still narrating the shipped interim
admit (and the alias destination main's arms used) were two bullets and
one clause out of date. They now say what the merged arms assert.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 1 on a conflict with the base branch, pushed as 32a2cb1aef5d.

Resolved conflicts in: crates/minimald/src/net/listeners.rs, crates/minvmd/tests/vm_escape_integration.rs, scripts/session-e2e.sh

line exit tail
cargo nextest run -p sessions switch_addresses_egress_dropped_not_reset 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-571c... Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/296f1/tree/crates/args) Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/296f1/tree/crates/ot) C
cargo nextest run -p sessions switch_address_openings_admit_only_their_ports 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-741b... Finished 'test' profile [unoptimized] target(s) in 0.43s ──────────── Nextest run ID 36d95895-0f2e-4f3b-999b-2237bbba6fe9 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald native_relay_drops_flows_to_switch_addresses 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-c9d2... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/74c94/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/74c94/tree/crates/args) C
./scripts/session-e2e.sh min_internal_names_through_proxy 1 ::group::min.internal names through the hostname proxy (NET-001..NET-004) ::error::'min session activate' for the proxy proof's origin box failed --- stderr --- Applying loadouts: default error: CreateSession failed: This CLI is minimal 0.7.0-dev.204.g18a02177, but the running minimald is 0.7.0-dev.

Verify min task run agent-verify exited 101.

/tree/crates/decode)
    Checking graph v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/graph)
    Checking lcache v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/lcache)
    Checking op v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/op)
    Checking rcache v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/rcache)
    Checking check v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/check)
    Checking orchestrator v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/orchestrator)
    Checking mctx v0.0.1 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/mctx)
    Checking minimald v0.7.0 (/home/runner/.local/state/minimal/sessions/8a67a/tree/crates/minimald)
error: this returns a `Result<_, ()>`
    --> crates/minimald/src/session_host.rs:1837:5
     |
1837 |     pub async fn kill(&self, for_shutdown: bool) -> Result<(), ()> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: use a custom `Error` type instead
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#result_unit_err
     = note: `-D clippy::result-unit-err` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::result_unit_err)]`

error: this returns a `Result<_, ()>`
    --> crates/minimald/src/session_host.rs:1981:5
     |
1981 |     pub async fn get_attrs(&self) -> Result<HostAttrs, ()> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: use a custom `Error` type instead
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#result_unit_err

error: this returns a `Result<_, ()>`
    --> crates/minimald/src/session_host.rs:1993:5
     |
1993 |     pub async fn get_screen(&self) -> Result<minimald_rpc::ScreenSnapshot, ()> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: use a custom `Error` type instead
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#result_unit_err

error: could not compile `minimald` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: using `chunks_exact` with a constant chunk size
    --> crates/minimald/src/net/switch.rs:4467:28
     |
4467 |         for word in summed.chunks_exact(2) {
     |                            ^^^^^^^^^^^^^^^ help: consider using `as_chunks` instead: `as_chunks::<2>().0`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
     = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald` (lib test) due to 4 previous errors

Outside the task's layers::

  • crates/minimald/src/net/dns.rs
  • crates/minimald/src/net/gvproxy_network.rs
  • crates/minimald/src/net/listeners.rs
  • crates/minimald/src/net/mod.rs
  • crates/minimald/src/net/proxy.rs
  • crates/minimald/src/server.rs
  • crates/minimald/src/session.rs
  • crates/minimald/src/session/tests.rs
  • crates/minimald/tests/netns_root_integration.rs
  • crates/minvmd/tests/vm_escape_integration.rs

Converted to a draft: something above needs a person before review.

With main merged in, the branch still drops a box's flows to the switch's own addresses on a native host whatever its allow_subnets say, outside the three port-scoped openings, silently and never reset, named in the existing rate-limited warn line, with each opening admitting exactly its port: all four of the task's test lines pass on the merged tree, and none of the conflict resolutions touched the shared verdict (sessions egress.rs), the native relay's own change (beyond the verdict it is handed), or the VM host gate's own copy (egress_gate.rs).

Notes from the agent: Conflict round, no review threads in the directive. Resolved the three markers and completed the merge (10ccfbf), plus two follow-up commits. listeners.rs: took main's T83 side whole — T83 deleted the staged-plan table and its four tests (the plan now rides Launched), so the branch's None-argument edits inside them went with it; the branch's fifth hostname_proxy_port argument survives at every remaining call site. vm_escape_integration.rs: T89's always-drop posture for the in-plan unregistered source (the interim admit arm and the phase keying are gone) with the branch's runner-address destination kept — esu_alias/alias no longer exist in the merged case, so the panics and rows name esu_host/host; that harness is #![cfg(minvmd_libkrun)] plus #[ignore] MINVMD_E2E=1, so it compiles to nothing on this Linux box: verified by forcing the cfg through clippy (compile and lint, no link, no run); its runtime proof stays with the VM lanes. session-e2e.sh: the escape-union case takes T89's always-refused arms with the branch's listener address as their destination, and the case's header bullets and OK line — which still narrated the shipped interim admit and the alias destination — were settled with them; the min_internal_names_through_proxy case the test line runs was untouched by the merge (all the merge's hunks fall inside the escape-union case). Two auto-merge compile breaks fixed in a follow-u…[truncated]

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 4, 2026 15:02
@norrietaylor
norrietaylor marked this pull request as ready for review October 4, 2026 15:02

@norrietaylor norrietaylor 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.

Reviewed at 32a2cb1: the coder's merge matches the locally verified one; 46d6389 threads the proxy-port argument through main's new gate call sites; the e2e escape-union header is now accurate. ARCH PASS (KVM evidence run 37203233656 recorded). All lanes green on head; the verify draft was agent-runtime#278 skew outside the diff.

@norrietaylor
norrietaylor enabled auto-merge October 4, 2026 15:04
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit d2a78b4 Oct 4, 2026
34 checks passed
@norrietaylor
norrietaylor deleted the agent/1874-drop-a-box-s-flows-to-the-switch-s-own-addresses branch October 4, 2026 15:20
@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review c6815c4

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

1 similar comment
@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review c6815c4

2 similar comments
@norrietaylor

Copy link
Copy Markdown
Member

/arch-review c6815c4

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review c6815c4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T79 — Drop a box's flows to the switch's own addresses in the shared verdict

1 participant