Repository navigation
T70 — Shape every egress refusal from one builder in the switch crate - #1858
norrietaylor merged 25 commits into
Conversation
Every leg that refuses a connection — the daemon's switch relay, its per-session gate, the VM host's egress gate, the box egress proxy's stack peer — builds its reply and its audit line through this module (NET-014, NET-081): - classify() reads one frame into a Segment: the one parser, so every leg agrees on what a frame is before any of them answers it. - refused_tcp_reset() builds RFC 793 §3.4's two shapes: a bare SYN is answered from sequence zero, acknowledging it, with RST|ACK; a segment carrying ACK is answered with its own acknowledgement as sequence and RST alone. refused_udp_port_unreachable() builds the type 3 code 3 ICMP that quotes the datagram's IPv4 header and the first eight payload bytes. - RefusalEmitter bounds and rates every refusal per source — a fixed-size row table with expired-LRU eviction, one overflow bucket per rule when every row is live, and a per-window quota per row, so a flooder loses only its own refusals — and renders the one audit line, which carries the count of replies written to that source this window instead of one line per reply.
The daemon's reset builder, its checksum helpers and its per-source ResetBudget are deleted: the native relay leg and the in-VM gate leg — the one spawn_relay both attachment paths funnel into — now build their resets with switch::refusal's builders and audit every refusal through its shared RefusalEmitter (NET-014, NET-121). - L4Packet is the shared crate's Segment, re-exported under the name this module's readers use; parse_ipv4_l4 is its classify() in one line. The revocation resets keep their wire shapes: the gate's tracked-tail arithmetic stays, the byte assembly moves to the shared tcp_reset_frame(). - refuse_tcp_segment takes the refusal's Class and consults the emitter after it has a reset to write: a segment the gate can build nothing for spends nothing. The relay arms drop their limiter line for TCP refusals — the emitter says the one shared line when a source's window opens and when its quota is spent — and the UDP ingress drop keeps the drop limiter's own vocabulary. - The gate's wire end-to-end and its decision unit are each compared against the shared builder byte for byte (native_relay_refusal_matches_the_shared_builder, in_vm_gate_refusal_matches_the_shared_builder), and the audit tests assert the shared line format end to end.
… ran out the coder's uncommitted work as it stood when its 7200s ran out The coder was stopped at the end of its time with these changes not committed. The runtime committed its working tree as it stood so the work is kept: this commit is a snapshot, not a finished step, and may not build or pass its tests.
…y-egress-refusal-from-one-builder-in-t
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
main's delivery PR rewrote bep_host around the listener pool: the leg now holds sockets of its own and every frame it accepts goes through the interface, so the unlistened-port reset and the UDP port-unreachable are smoltcp's own answers and the hand-rolled paths this branch had charged to the shared refusal audit no longer exist as hand-rolled ones. The resolution keeps main's pool and moves the shared audit onto the refusals that stay the peer's own — the pre-screen's, a connection attempt from a source no row holds, from a MAC the switch would never lease to its address, or from a source already holding its share's cap. Those now say the one shared line format, bounded per source, and the reset they answer with is the shared builder's, so the peer stays the fourth caller of the shared refusal audit. The conflicted path was crates/switch/src/bep_host.rs; every other path merged cleanly.
…s audit The shared refusal audit gains the three classes the box egress proxy's pre-screen refuses under — no registered row, a foreign source MAC, a spent per-source share — and the stack peer's test that pins the fourth caller: the reset a refused SYN is answered with is the shared builder's, byte for byte; the line it says is the one shared format, naming the rule, the address, the port and the reason with the count of resets written to that source this window; and the bound is per source, so a box that floods the proxy address loses only its own replies while a sibling's are untouched.
…y-egress-refusal-from-one-builder-in-t
|
Round 2 of 10 on a conflict with the base branch, pushed as Resolved conflicts in:
Verify Converted to a draft: something above needs a person before review. One builder in the switch crate now shapes every refusal the four callers still author: the stack peer's pre-screen refusals answer with a reset byte-equal to the shared builder's and are charged to the shared per-source emitter in the one audit-line format, so a flooding box gets exactly two lines and sixteen resets in its window while a sibling's first refusal still gets its own reset and its own line; the native relay and the in-VM gate leg answer the same frame with the byte-identical reset, proven by their parity tests; and a refused UDP datagram gets one port-unreachable built by the same module. The proof's VM-host-gate clause is not delivered as written: a SYN toward a box address at an unpublished port still crosses the host gate verbatim and is refused by the target box's own guest minimald - a reset, not a timeout - rather than by the gate itself; the reasons are in notes. Notes from the agent: Conflict round: the directive's one item is done. bep_host.rs is resolved against main's listener-pool rewrite (#1810) in merge commit b36a0cf; the branch's hand-rolled unlistened-port reset and port-unreachable no longer exist on main (smoltcp answers them), so the fourth caller was re-targeted onto the refusals that remain the peer's own - the pre-screen's three arms (no registered row, foreign source MAC, per-source share spent) - which now build their reset with refusal::refused_tcp_reset (byte-identical to main's own shape for a bare SYN, so no wire change) and charge the shared per-source emitter. enforce_caps, the acceptor-down reset and the dropped ARP claim keep main's WarnThrottle on purpose: an abort's reset comes from smoltcp and suppressing it would hang a withdrawn row's box, a failed delivery is not a rule's refusal, and a dropped claim writes no reply. ONE test line not run: 'cargo nextest run -p minvmd host_gate_resets_syn_to_unadmitted_port'. It is not implemented: main's gate decides nothing on ingress by design (egress_gate.rs: 'sw…[truncated] |
|
/revise Round 3. The plan block on #1800 was amended after the architecture review: re-read it before you start. The host gate step is gone. The VM host gate passes ingress through untouched and holds no table of a box's own ports, so on a VM-backed host the in-guest relay's reset meets NET-014. The ICMP builder is out, the stack peer is scoped to its pre-screen, and there is one new e2e case. Scope:
Every |
…y-egress-refusal-from-one-builder-in-t
The reset a refusal writes now acknowledges a SYN's payload along with its sequence weight (RFC 793 s3.4), and a caller that is not the link a frame was addressed to writes its own MAC as the reset's source - the shape the stack peer's pre-screen needs for a SYN sent to the broadcast. The emitter says one line per (source, rule) per window, at the window's first refusal, carrying the refusals that window saw - answered or suppressed alike - instead of only the first and the quota's last. The ICMP port-unreachable builder and its unlistened port rule are gone: no production caller refuses a datagram yet.
The pre-screen's reset took its source MAC from the frame it refused, so a SYN sent to the broadcast - which reaches the leg like any other, since only its IP destination names the leg - produced a reset claiming the broadcast's MAC, a frame no switch would forward. The reset is now written from the leg's own MAC through the shared builder's leg-source variant, and its audit line is the window's one: said at the window's first refusal, never again for the flood that spends the quota.
The revoked-port arm bailed before the shared audit whenever no reset frame could be built, so a spoofed segment to a revoked port — one the gate holds no tail for — was refused silently: nothing on the wire, nothing in the log. The audit is now consulted for every refusal, with the reset's existence passed to it: the line is said at the window's first refusal whether or not a reply was written, while a refusal with no reply spends none of the source's quota and writes nothing back. The two equality proofs now drive their own legs and capture the bytes each writes — the native leg through the relay onto its wire, the in-guest leg through the gate onto its channel — checked byte-for-byte against the shared builder's frame and against the wire's own oracle (addressing, flags, acknowledgement arithmetic, checksum), so neither is the builder against itself. rst_from_flow counts the flow's own data in the reset it acknowledges, the way the shared builder now does, and the quota proofs carry the window's real count.
…y-egress-refusal-from-one-builder-in-t
|
Round 3 of 6 on a /revise note, pushed as The coder ran out of its 7200s before it finished. If it left work uncommitted, its last commit is the runtime's snapshot of that work as it stood — the commit message says so — and not a finished step: it may not build or pass its tests.
Verify Outside the task's
Converted to a draft: something above needs a person before review. One builder in the switch crate shapes every TCP refusal, and each caller's output is compared against it, not against itself: the native relay and the in-VM gate leg, each driven on its own path, answer the same frame with the byte-identical reset, and the stack peer's pre-screen reset matches it with leg_mac as its source; on a VM-backed host a connection to a box's unpublished port is refused within 5 s on the VM lanes, the in-guest relay resetting a SYN the host gate passed through; a foreign source and a denied egress rule still drop silently; and every refusal is one rate-limited line in the one format on whichever leg refused it, carrying the window's real count, bounded per source so one flooding box starves no sibling's refusals. |
|
/revise Round 4. Round 3 completed asks 1 to 6. It never started ask 7, the e2e layer:
|
…y-egress-refusal-from-one-builder-in-t
Add the unpublished_port_refused_on_vm_host case to scripts/session-e2e.sh (T70's e2e half, NET-014's VM-lane half): on a VM-backed host, a peer box's connect to another box's unpublished port must be refused within 5 s - curl exit 7, the kernel's own connection-refused shape - never the connect timeout a silent drop reads as; and where a published name reaches the box from the host, the host's own connect through that name to the unpublished port gets the same refusal, the leg that shows the host gate passing a host-originated SYN through to the in-guest relay that resets it. Each leg completes its control in the same run first - the peer reaches the target's published port by the same name, the host reaches it through the name - so the refusal reads as the port's own and not weather. The host leg's control is the requirement's WHERE clause: on a lane whose host resolver is not pointed at the box zone's answerer it prints the observed fact and asserts nothing. Each leg prints one transcript line, and beneath it the window the in-guest daemon's log gained - the one shared refusal audit line, read from the guest boot log with the console's SGR codes stripped. The case self-skips off the VM lanes (a native relay's refusal is the github-only case's zone legs), without a switch, and - on Linux only - on hosts with no writable /dev/kvm, the fresh-install KVM cases' criterion scoped to the OS where it is the right one, since the macOS lane hypervises without it.
…y-egress-refusal-from-one-builder-in-t
|
Round 4 of 6 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. The session e2e now has an unpublished_port_refused_on_vm_host case, run by name or in the whole-lane order on the VM lanes: on a VM-backed host a peer box's connect to another box's unpublished port is refused within 5 s (curl exit 7, never the timeout), and where a published name reaches the box from the host, the host's own connect through that name gets the same refusal — the host gate's pass-through delivering the SYN to the in-guest relay that resets it — each leg with its control completed in the same run and the one shared refusal audit line printed from the guest boot-log window beneath it. Notes from the agent: The VM legs cannot run on this box (no /dev/kvm, no libkrun, no gvproxy, no guest images), so the real VM-lane run is owed by the ci-linux-kvm and macOS lanes, where the case runs in the whole-lane order between the github-only and proxy-source cases. What was verified here instead: (1) the test line itself runs — dispatches by name, standalone-defaults as the KVM cases do, and exits 0 with the case's own skip reason printed (needed one build the script would itself have done on an empty cache: |
|
Approved: no findings at Nothing to do. Clobber: none: |
|
/revise Round 5. ARCH design check at 2003e16: conditions. Everything else conforms. Three asks, nothing else. Scope:
Out of scope: no change to the reset builder, the stack peer, the in-VM or native legs, or the revoked-port straggler behaviour (ruled conforming). |
|
Round 5 of 6 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. One builder in the switch crate shapes every TCP refusal, and every comparison is against it, not against itself: the native relay and the in-VM gate leg answer the same frame with the byte-identical reset, the stack peer's pre-screen reset matches it with leg_mac as its source, and on the VM lanes a connection to a box's unpublished port is refused within 5 s — now from the host by the box's published address too, after a probe proves the port free on that host, with each leg's own outcome (refused, or skipped with its reason) said on the case's OK line. A window whose last refusal never came — expired, LRU-evicted, or the emitter dropped at teardown — now says its final count as one line in the same format, so a source's refusals are never lost to silence; the count is the window's own (since_line + 1), clearing what the next window's opening line would have carried, so nothing is reported twice. Notes from the agent: Three asks, three layers. (1) Final window count: Window now carries an |
|
/revise Round 6, the last. ARCH ruled on round 5's CI result: the host leg by address failed at its own control step on both VM lanes, because the registry's
Out of scope: a timer-driven flush on the minimald relay (it has no periodic hook; teardown and next-refusal flushing stay), the allocators, any change to how ports are published on a VM host, and the refusal builder itself. |
|
The runtime will not revise this pull request again on its own: round 7 would exceed the cap of 6 (the last trigger was a conflict with the base branch). A person decides now. Remove |
The relay leg's `let Some(reset) = reset else { return false; }` returned
before the expiry sweep, so every unanswered refusal — a spoofed segment
to a revoked port — skipped it, and a window that ended holding an unsaid
count was not flushed until a reset-producing refusal arrived or the gate
dropped. The sweep now runs ahead of the charge, so a rolled window's own
count is said at the window it belongs to rather than folded into the next
window's opening line, and no refusal path can return around it.
The stack peer leg charged its refusals and never swept at all: its final
windows were unsaid until the daemon ended. Its turn now opens with the
expiry sweep (poll runs at least every POLL_DELAY) and its own Drop says
every count its still-live windows hold, mirroring the gate's.
The host address leg connected by the box-registry record's loopback_address, which is an allocation the forwarders do not bind at (#1908) -- an address the leg could only ever time out at, and one whose control failing took the whole case down with it. It now asks the host's own zone answerer, straight at the port 'min ls' reports for it, for the A record it holds for the box's name: the address the box's declaration publishes at, the one the host-side forwarders bind. The question is one datagram in python3 (the pty driver's dependency, no lane declares dig), with the answer's reason on stderr when there is none. The leg is WHERE-gated end to end now, like the name leg beside it: no answerer line, no address for the name, a published port that does not answer at it, or no candidate port nothing on the host answers -- each says what it lacks and asserts nothing, and the control alone never fails the case. The OK line carries the leg's own sentence, refused with its address or skipped with its reason, so it can never claim a leg that did not run. The registry's record stays in the transcript, labelled as the registry's half of the pair; the error-path dump now globs minvmd.log* so the unsuffixed log is read too, like upr_host_log does.
The case's header bullet still said the leg connects by the registry record's loopback address and that the KVM lane runs no host-side answerer; both were false after the last commit (the forwarders publish the answerer on the host loopback, and the record's address is one nothing binds at), so the bullet now names the answerer as the address's source and the WHERE gate as the leg's shape.
Two inject_frame calls in the new test overran the line budget; rustfmt splits them, nothing else changes.
…y-egress-refusal-from-one-builder-in-t # Conflicts: # crates/minimald/src/net/switch.rs
|
Round 6 of 6 on a /revise note, pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
Every leg now says each window's true count at the window it belongs to, in the one audit format: the minimald relay's sweep runs ahead of the charge on every refusal — including the spoofed, no-reset segments that used to return around it — the stack peer's turn opens with the same sweep and its stack's Drop says what its live windows still hold, so a source that stops flooding no longer needs one more refusal to have its last window's count said; and the e2e case's host leg now connects at the address the host's own zone answerer returns for the box's name — the address the forwarders actually bind, not the registry's unbound loopback allocation — asking for it straight at the answerer's port with no OS resolver hook, and where the host does not serve the box's published ports at that address the leg prints plainly that it does not, asserts nothing, and the OK line claims no leg it did not run. Notes from the agent: Round 6's four asks, all in the layers the task names. (1) The host address leg's answerer query is one python3 datagram (upr_answerer_a), not dig — dig is on no lane's declared dependency list while the script's own pty driver already owes python3; the helper was exercised against a fake answerer for a compressed-name reply, a no-answer reply, and no listener, and the min-ls port extraction against both the single-VM and multi-VM ZONE ANSWERER shapes. (2) BepStack::poll's sweep reads std::time::Instant::now(), the clock the pre-screen charges the audit at, not the stack's stepped now; the new test stack_peer_says_a_silent_windows_count covers the burst-that-stops and the dropped-stack halves (exit 0). (3) Moving the sweep ahead of the charge retired the fold-into-the-next-window behavior the_shared_quota_spends_per_source_and_says_the_windows_count used to pin, so that test was retaught to the new semantics (each window opens with its own count, the closed window's is said by the sweep; exit 0) — the directive's intent, not a regression. …[truncated] |
|
The runtime will not revise this pull request again on its own: round 7 would exceed the cap of 6 (the last trigger was a conflict with the base branch). A person decides now. Remove |
# Conflicts: # scripts/session-e2e.sh
|
The runtime will not revise this pull request again on its own: round 7 would exceed the cap of 6 (the last trigger was a failed check suite). A person decides now. Remove |
norrietaylor
left a comment
There was a problem hiding this comment.
Own review and ARCH pass hold at 254089d. The KVM rerun is green, and the host leg of the unpublished-port proof ran: the host connect was refused in 9 ms. The name leg skips on KVM by design because the host resolver isn't pointed at the box zone.
The detach half's "client outside the box's process tree" was the harness's own curl to 127.0.0.1:18098, which only ever worked on a native lane: on a VM lane the box's loopback is the GUEST's and the harness runs on the host, so the leg died with curl exit 7 before the detach it exists to prove (the macOS e2e failure this round). On a VM lane the outside client is now a curl inside a second host-address box on the same node, sharing the guest loopback the server listens on; the native lane keeps its host-side curl as it was. The publish half's undeclared-port refusal asserted a body that says the port is not published, which main's proxy does not emit — its write_status answers 403 with Content-Length: 0 — so the KVM lane failed on text no build produces. Assert the 403 and leave a comment naming the not-published wording as T70's to pin (#1858).
The design review found both remaining halves citing the wrong rule. The declared-port leg proved NET-121's forward, not NET-016's publish: relabeled. The refusal leg is the NET-016 half this half can reach — a LIVE listen the rules permit no publication for — so its assertion now demands the tell the rule requires: 403 plus a body saying the port is not published, 'not permitted' rather than 'nothing listening'; the stale TODO(T70, #1858) is gone with the body pinned. NET-016's permitted arm stays out of the e2e and the case header says why: no user surface sets the dynamic allow range, and the proxy's by-name routes are built from the declaration, so a watcher-published port has no name to reach through yet. The run half now runs a command that exits by itself (echo; sleep 5) and SIGKILLs the client inside that window: NET-131's trigger is the command's exit — the destroy keys on the exec's exit status — and the comments and messages no longer say the client's death ends the box. The delist rule keeps its empty-listing guard.
…o end (gominimal#1912) * test(e2e): add the port-publish and box-outlives-client case One case, three beats, against the NET port spec end to end: - the port half drives an own-address box with a declared ingress port: refused fast before any listen (NET-121/014), answering by name at once once socat listens (NET-016), an undeclared listen left unpublished -- refused by name with the proxy's own refusal and, on a readable-log lane, the listen watcher's record of leaving it so (NET-016's negative half; the CLI has no dynamic-allow flag yet, so the watcher's permitted arm has no user surface to drive). Gated on the switch and the tap device like the deny-all answer proof. - the detach half attaches over a real pty to a host-address box that is serving, leaves by the detach chord, and demands the box still listed and still serving (NET-015). Runs on every lane. - the run half SIGKILLs a 'min task run' client mid-run and demands its box delisted within a bound (NET-131), with the daemon-side 'run box ended' record on a readable-log lane. Runs on every lane. A failing run's 'min bug' bundle carries the zone dump and the daemon log whose records the case reads. * test(e2e): skip the run half where no session sandbox spawns A run's box IS a session sandbox, so a host the earlier beats' exec gates found unable to spawn one (a nested sandbox, whose rootfs setup hits mount EPERM) has nothing for the beat to drive. Carry the one gate verdict to it: skip on such a host, fail on a lane that exists to run the assertion — the same split the deny-all answer proof's gates hold. * test(e2e): name the zone dump's path in the case's diagnostics note The daemon's net/zone.json rides inside the bundle's nested daemon-diag archive; say where, so a reader of a failing run's bundle finds it. * test(e2e): pin the run half's daemon filter before reading its record The whole-lane native run reached this case with the daemon still running under the filter the min.internal proof had spawned it with (warn,minimald::net::dns=info,minimald::net::switch=info) — a filter that drops every INFO record under minimald::exec and one that proof never restores. The run half read its `run box ended` record off that daemon while believing the port half's restart had kept the module at info, but a lane with no switch skips the port half outright, so no restart had happened: the record was filtered out and the half failed on a destroy that left no record of firing. That was the native-daemon-e2e failure behind ci-linux-native-success. The half that reads a record pins the module it lives in, the way the port half pins its two: restart the daemon under warn,minimald::exec=info before the run starts, wherever the log is readable, and put the lane's filter back afterwards — guarded on the pin's own predicate, so a lane the half never pinned keeps its filter. The KVM lane is unchanged: its guest log is unreadable, so neither the pin nor the record check runs there. * test(e2e): make the run half's task speak so a lost client is noticed Both native-daemon-e2e failures on this branch (check runs 3099 and 3112) die at the run half's delist poll: "the run's box is STILL listed after its client was killed — a box created for a run must end with the run (NET-131)". Round 1 fixed the record read that follows the poll, but the poll never got that far. The task was `echo <marker>; sleep 300` — silent after the marker, and the daemon notices a lost non-PTY exec client only when the exec's next SSH channel write fails (bridge_one's ssh_write_failed arm, pinned by lost_exec_client_kills_only_its_own_process). A silent child never writes again, so the daemon parks on it for the full 300 s: the box lives past the poll's 90 s bound and the beat fails waiting for an end that is still minutes away. Make the task speak instead — a line every 2 s, forever. The tick after the SIGKILL fails its channel write, the daemon kills the command, end_run_box destroys the box from the daemon side of that exit, and the "run box ended" record lands under the filter the round-1 pin admits. The kill-beat's comments now say where the notice actually comes from: the write the daemon loses, not the client. Lanes that can spawn sandboxes exercise the beats for real; this box cannot (no session sandbox in its sandbox), so they skip here and the pinned contracts stand in — both lost_exec_client_kills_only_its_own_process and run_box_ends_when_its_run_ends pass at this branch. * test(e2e): reach the detach box's loopback from inside the guest The detach half's "client outside the box's process tree" was the harness's own curl to 127.0.0.1:18098, which only ever worked on a native lane: on a VM lane the box's loopback is the GUEST's and the harness runs on the host, so the leg died with curl exit 7 before the detach it exists to prove (the macOS e2e failure this round). On a VM lane the outside client is now a curl inside a second host-address box on the same node, sharing the guest loopback the server listens on; the native lane keeps its host-side curl as it was. The publish half's undeclared-port refusal asserted a body that says the port is not published, which main's proxy does not emit — its write_status answers 403 with Content-Length: 0 — so the KVM lane failed on text no build produces. Assert the 403 and leave a comment naming the not-published wording as T70's to pin (gominimal#1858). * test(e2e): pin the by-name legs to the proxy and the delist to a listing The port half's three by-name curls through the hostname proxy did not clear the proxy env a runner may carry: NO_PROXY/no_proxy overrides curl's -x, so a runner that sets it sends these legs resolving the name themselves instead of through the proxy they name. They now clear the same eight variables the min.internal proof clears. The run half's delist wait greened on an empty `min ls` answer: "" does not match *task-e2e-port-run-*, so a listing that said nothing read as "no box listed" and the NET-131 assertion passed without ever observing the delist. Only a listing that answers counts now; an empty one keeps polling, and the failure arm names a wait that never read one. * fix(minimald): carry the refusal's reason in the proxy's 403 body A request the proxy refuses answered 403 with an empty body, so a client could not tell a port the box never published from any other policy refusal without reading the daemon log. The status writer now carries the same plain-text reason the refusal's warn line records, so the wire answer itself says 'the box has not published this port' — 'not permitted' stays distinguishable from a declared port's instant connection-refused while nothing listens on it (NET-014, NET-016). * test(e2e): key each half of the port case on the rule it cites The design review found both remaining halves citing the wrong rule. The declared-port leg proved NET-121's forward, not NET-016's publish: relabeled. The refusal leg is the NET-016 half this half can reach — a LIVE listen the rules permit no publication for — so its assertion now demands the tell the rule requires: 403 plus a body saying the port is not published, 'not permitted' rather than 'nothing listening'; the stale TODO(T70, gominimal#1858) is gone with the body pinned. NET-016's permitted arm stays out of the e2e and the case header says why: no user surface sets the dynamic allow range, and the proxy's by-name routes are built from the declaration, so a watcher-published port has no name to reach through yet. The run half now runs a command that exits by itself (echo; sleep 5) and SIGKILLs the client inside that window: NET-131's trigger is the command's exit — the destroy keys on the exec's exit status — and the comments and messages no longer say the client's death ends the box. The delist rule keeps its empty-listing guard. * test(e2e): claim NET-016's refusal arm only and tear down the client seed The permitted arm is reached by name through the host answerer at the published address and needs the dynamic-range flags, both T82's (gominimal#1895). The detach half's outside-client seed dir joins the teardown trap like its three siblings. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
Plan block (v3)
State
Round 1 hit the coder's time limit; its snapshot commit 17dba91 is that round's work as it stood, not a finished step. Round 3 timed out before the e2e layer; round 4 added it. Every v3 test line passes at the head.
Proof
One builder in the switch crate shapes every TCP refusal, and each caller's output is compared against it, not against itself: the native relay and the in-VM gate leg, each driven on its own path, answer the same frame with the byte-identical reset, and the stack peer's pre-screen reset matches it with leg_mac as its source; on a VM-backed host a connection to a box's unpublished port is refused within 5 s on the VM lanes, the in-guest relay resetting a SYN the host gate passed through; a foreign source and a denied egress rule still drop silently; and every refusal is one rate-limited line in the one format on whichever leg refused it, carrying the window's real count, bounded per source so one flooding box starves no sibling's refusals.
Tests
cargo nextest run -p switch refusal_rst_carries_rfc_seq_ackcargo nextest run -p switch refusal_rst_acks_a_syn_carrying_datacargo nextest run -p switch refusal_emitter_is_bounded_and_rate_limitedcargo nextest run -p switch refusal_limiter_key_space_is_boundedcargo nextest run -p switch refusal_audit_line_names_rule_address_port_and_reasoncargo nextest run -p switch refusal_line_carries_the_window_countcargo nextest run -p minimald unpublished_port_connection_refusedcargo nextest run -p minimald native_relay_refusal_matches_the_shared_buildercargo nextest run -p minimald in_vm_gate_refusal_matches_the_shared_buildercargo nextest run -p minimald revoked_port_refusal_is_loggedcargo nextest run -p switch --features stack-peer stack_peer_refusals_use_the_shared_emittercargo nextest run -p switch --features stack-peer stack_peer_reset_source_is_leg_mac./scripts/session-e2e.sh unpublished_port_refused_on_vm_hostDeviations
crates/minimald/src/net/dns_gate.rscarries twopayload_len: 0test-literal lines outside the plan block's layers, added in round 3 alongside the shared-builder change.no ingress mappingaudit line.Verify
min task run agent-verifypassed ([tasks.verify]).Base
Merged main at 2003e16 (main d78716e).
Closes #1800