8000 T46 — The Box Egress Proxy sees each box by its own address, end to end by minimal-foundry[bot] · Pull Request #1930 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T46 — The Box Egress Proxy sees each box by its own address, end to end - #1930

Merged
norrietaylor merged 5 commits into
mainfrom
agent/1668-the-box-egress-proxy-sees-each-box-by-its-own-ad
Oct 4, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
agent/1668-the-box-egress-proxy-sees-each-box-by-its-own-ad

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Oct 4, 2026 •
Copy link
Copy Markdown
Contributor

T46 — The Box Egress Proxy sees each box by its own address, end to end

slice: S10
kind: integration
covers: none
size: M
est: 60 code, 160 tests
executor: agent
difficulty: routine
model: standard
di 8000 agnostics: the VM host daemon log from the run shows each attachment and delivery
observability: the case prints each connection's source as the stand-in acceptor saw it
layers:
- e2e:
- scripts/session-e2e.sh: adds the case proxy_sees_boxes_by_address
test: ./scripts/session-e2e.sh proxy_sees_boxes_by_address
produces: none
consumes: none
proof: a box's connection reaches the proxy's stand-in acceptor (MINVMD_BEP_STUB) from its own switch address and a host process never arrives from a box address; the proxy holds an attachment per live box from outside the VM; only a box with a credentialed lane reaches the acceptor. The real acceptor's own checks are not covered; this case runs unchanged against it once it lands.
depends on:
- blocked by #1652
- blocked by #1794
- blocked by #1660
- blocked by #1665

Proof

The ONE session e2e script now has the case proxy_sees_boxes_by_address, and on a VM lane its run shows a person every half of the proxy's view of a box at once: the stand-in acceptor's answer (MINVMD_BEP_STUB) for each of two lane boxes' connections names that box's own switch address as the source (and the case prints each one, plus each delivery's own trace and each attachment's issue and withdrawal lines from the host daemon's log), a host process connecting straight to the acceptor's socket is refused with zero bytes and audited (the peer's pid on Linux, the missing token elsewhere), the daemon's log shows one attachment per live box issued ahead of each box's first delivery and withdrawn with the ended box while its sibling still answers from its own address, and a laneless box alone is silent at the proxy's address while its control probe through the same fabric is reset.

Notes from the agent: The case body cannot run on this box: no /dev/kvm, no gvproxy binary, no VM. The test line therefore validated the plumbing end to end — the auto-set KVM-env block (added, so a bare invocation behaves as the KVM lane, the same treatment the fresh-install and unpublished-port cases already get), the standalone dispatch, all three gates, the group/skip lines, and the CLI-pair build — and exited 0 on the case's designed KVM-gate skip. The body's assertions run on the VM lanes (the Linux KVM CI lane and the macOS lane, which is always VM-backed), and every pattern it uses is copied from the three sibling proxy cases that already run there (cred_begin/cred_restore/cred_fail, the socket + peer-up gates, the socat answer probe shape, the no-lane control/silence probes); every log string it greps was verified against the source that writes it (bep_attach.rs issue/withdraw, bep_host.rs delivered, bep_stub.rs refused, run.rs stand-in/peer-up). One thing beyond the layer note's strictest reading, same file, comments only: the header case list at the top of the script was missing the two T45 cre…[truncated]

Tests

line exit tail
./scripts/session-e2e.sh proxy_sees_boxes_by_address 0 ::group::the Box Egress Proxy sees each box by its own address, end to end (NET-132, NET-133, NET-134) proxy_sees_boxes_by_address SKIPPED (no writable /dev/kvm: a Linux VM boots on KVM and this host has none — the case reads the VM host daemon's proxy surfaces, and no VM host daemon means nothing t

Verify

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

Checking p256 v0.14.0
    Checking p521 v0.14.0
    Checking p384 v0.14.0
    Checking module-lattice v0.2.3
    Checking kem v0.3.0
    Checking constcat v0.6.1
    Checking sponge-cursor v0.1.0
    Checking data-encoding v2.11.1
    Checking ml-kem v0.3.2
    Checking sha3 v0.12.0
    Checking ssh-key v0.7.0-rc.11
    Checking generic-array v1.4.4
    Checking russh-cryptovec v0.62.0
    Checking num-bigint v0.5.1
    Checking sessions v0.0.1 (/home/runner/.local/state/minimal/sessions/018fc/tree/crates/sessions)
    Checking russh-util v0.52.0
    Checking hex-literal v1.1.0
   Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/018fc/tree/crates/stdlib)
    Checking hash32 v0.3.1
    Checking russh v0.63.3
    Checking heapless v0.9.3
    Checking netlink-packet-core v0.8.1
    Checking tracing-serde v0.2.0
    Checking is_executable v1.0.6
    Checking symlink v0.1.0
    Checking managed v0.8.0
    Checking bitflags v1.3.2
    Checking tracing-appender v0.2.5
    Checking json-subscriber v0.3.0
    Checking smoltcp v0.14.0
    Checking clap_complete v4.6.11
    Checking generational-arena v0.2.9
    Checking opentelemetry-semantic-conventions v0.33.0
    Checking tinyvec_macros v0.1.1
    Checking konst_macro_rules v0.2.19
    Checking tinyvec v1.12.0
    Checking netlink-sys v0.8.8
    Checking konst v0.2.20
    Checking hickory-proto v0.26.3
    Checking derive_builder v0.20.2
    Checking const_format v0.2.36
    Checking nix v0.30.1
    Checking mlog v0.0.1 (/home/runner/.local/state/minimal/sessions/018fc/tree/crates/mlog)
    Checking switch v0.0.1 (/home/runner/.local/state/minimal/sessions/018fc/tree/crates/switch)
    Checking netlink-packet-route v0.25.1
    Checking procfs-core v0.18.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...

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Closes #1668

Add the proxy_sees_boxes_by_address case to the ONE session e2e script:
one scenario on one VM host daemon that reads every half of the Box
Egress Proxy's view of a box together — the delivery's identity, the
attachment's lifecycle, the lane's necessity, and the host process's
absence, each named in the daemon's own log.

Two deny-all boxes on credentialed lanes connect at once and each
acceptor answer names its own box's switch address, never the other
box's; the case prints each answer, the source as the acceptor saw it.
The pool's delivered records name the same source, and the attachment
issue lines precede them — NET-133's "ahead of the box's first
connection" read as positions in the case's own log window. A third box
with no lane gets silence at the proxy's address (its control probe to
the node's own address reset through the same fabric, the host gate's
log silent), so only a box with a credentialed lane reaches the
acceptor. A process outside every box connects straight to the
acceptor's own unix socket and is refused before it is presented: zero
bytes answered, the refusal audited with the per-OS reason (the peer's
pid on Linux, the missing token off it). Box A's end withdraws its
attachment with its row while box B's second connection is still
answered from its own address.

The case is VM-lane-only: every surface it reads is the VM host
daemon's, so it gates like the unpublished-port case (E2E_VM, then a
writable /dev/kvm on Linux, then MINVMD_GVPROXY_BIN) and self-skips
where they do. Its name joins the auto-set KVM-env block so the bare
task test line behaves as the KVM lane, like the ones before it, and
the header case list also gains the two credentialed-lane entries the
dispatch already ran but the list never named.
@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: a57f867f-b2bd-4710-9a6b-3292bfad5764

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.

…ress-proxy-sees-each-box-by-its-own-ad

Union of the two case additions that met in the dispatch order and the
header docs: this branch's proxy_sees_boxes_by_address (NET-132/133/134
end to end) and main's published_proxy_routes_from_host (NET-059/081,
from T86). Each proof stops and respawns its own daemon pair, so both
run late in the whole-lane order, immediately before the daemon-fetch
proof, either side intact.
…ress-proxy-sees-each-box-by-its-own-ad

# Conflicts:
#	scripts/session-e2e.sh
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 1 on a conflict with the base branch, pushed as 957ada6d31ad.

Resolved conflicts in: scripts/session-e2e.sh

line exit tail
./scripts/session-e2e.sh proxy_sees_boxes_by_address 0 ::group::the Box Egress Proxy sees each box by its own address, end to end (NET-132, NET-133, NET-134) proxy_sees_boxes_by_address SKIPPED (no writable /dev/kvm: a Linux VM boots on KVM and this host has none — the case reads the VM host daemon's proxy surfaces, and no VM host daemon means nothing t

Verify min task run agent-verify exited 101.

Checking p256 v0.14.0
    Checking p521 v0.14.0
    Checking p384 v0.14.0
    Checking module-lattice v0.2.3
    Checking kem v0.3.0
    Checking sponge-cursor v0.1.0
    Checking data-encoding v2.11.1
    Checking constcat v0.6.1
    Checking sha3 v0.12.0
    Checking ml-kem v0.3.2
    Checking ssh-key v0.7.0-rc.11
    Checking generic-array v1.4.4
    Checking russh-cryptovec v0.62.0
    Checking num-bigint v0.5.1
    Checking russh-util v0.52.0
    Checking hex-literal v1.1.0
   Compiling stdlib v0.0.21 (/home/runner/.local/state/minimal/sessions/62ea3/tree/crates/stdlib)
    Checking hash32 v0.3.1
    Checking sessions v0.0.1 (/home/runner/.local/state/minimal/sessions/62ea3/tree/crates/sessions)
    Checking russh v0.63.3
    Checking heapless v0.9.3
    Checking netlink-packet-core v0.8.1
    Checking tracing-serde v0.2.0
    Checking symlink v0.1.0
    Checking is_executable v1.0.6
    Checking managed v0.8.0
    Checking bitflags v1.3.2
    Checking clap_complete v4.6.11
    Checking tracing-appender v0.2.5
    Checking smoltcp v0.14.0
    Checking json-subscriber v0.3.0
    Checking generational-arena v0.2.9
    Checking tinyvec_macros v0.1.1
    Checking konst_macro_rules v0.2.19
    Checking opentelemetry-semantic-conventions v0.33.0
    Checking konst v0.2.20
    Checking tinyvec v1.12.0
    Checking netlink-sys v0.8.8
    Checking const_format v0.2.36
    Checking hickory-proto v0.26.3
    Checking derive_builder v0.20.2
    Checking nix v0.30.1
    Checking mlog v0.0.1 (/home/runner/.local/state/minimal/sessions/62ea3/tree/crates/mlog)
    Checking switch v0.0.1 (/home/runner/.local/state/minimal/sessions/62ea3/tree/crates/switch)
    Checking netlink-packet-route v0.25.1
    Checking procfs-core v0.18.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...

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

On the merged branch the proxy_sees_boxes_by_address case is intact and dispatched beside main's new published_proxy_routes_from_host case: on a KVM host with a switch it shows two credentialed-lane boxes answered at the proxy's acceptor each from its own switch address, a host process refused and audited, one host-issued attachment per live box withdrawn with the ended box, and a laneless box silent at the proxy's address — this host has no /dev/kvm, so the case ran to its skip gate here and those assertions were not observed in this session; the KVM CI lane is where they print.

Notes from the agent: Revise round 1 was a conflict-only round (directive listed no threads). Resolved the single conflicted path, scripts/session-e2e.sh, in all six marker regions (header case docs, seed-dir vars, teardown, whole-lane order, single-case dispatch, usage list) as a union of the two case additions that met: this branch's proxy_sees_boxes_by_address and main's published_proxy_routes_from_host from T86 (#1905). Both are late-order proofs that stop and respawn their own daemon pair first (cred_begin / the PUBP preamble), so each stays self-contained in the merged whole-lane order, which keeps the daemon-fetch proof last as both sides had it. Verified the resolution is exact: the merged file differs from the branch parent by exactly main's +170 lines and from main by exactly this branch's +549/-6; bash -n is clean; the run built the min + minvmd pair from the merged tree without error, which also compiles the crate changes the merge carried in (crates/minimald, crates/minvmd, crates/sandbox2, crates/sessions — staged by the runner's merge, not edited by me). The test line's case self-skipped at its built-in /dev/kvm gate: no /dev/kvm and no MINVMD_GVPROXY_BIN on this box, so the VM-host-daemon diagnostics the case owes (each attachment, each delivery, each connection's source as the acceptor saw it) run on the ci-linux-kvm lane, not here. Nothing outside the layers w…[truncated]

@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 conflict with the base branch). A person decides now. Remove needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #1668 by hand.

# Conflicts:
#	scripts/session-e2e.sh
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 4, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 83f714aea28f.

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 --oneline -15 -- scripts/session-e2e.sh shows the two sibling cases (deny_all_box_reaches_proxy..., box_without_credentialed_lane_cannot_reach_proxy) came in with #1885 (T45) and are established; this PR only appends. The new case is registered in all four places a case must appear — the KVM-env autoset gate list, the grouped-run dispatch, the standalone case dispatch, and t…

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

Approved at 83f714a. Scope matches the T46 plan block, and ARCH passed it. The case ran its full body, not a skip branch, on both the KVM and macOS lanes, with per-box attribution printed. minimal-review concluded on this head with no open threads.

@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 added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit a18bb03 Oct 4, 2026
34 checks passed
@norrietaylor
norrietaylor deleted the agent/1668-the-box-egress-proxy-sees-each-box-by-its-own-ad branch October 4, 2026 08:15
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.

T46 — The Box Egress Proxy sees each box by its own address, end to end

1 participant

0