8000 fix(minimald): a native Linux host binds a box's declared ingress forwards at activation, before the by minimal-foundry[bot] · Pull Request #3703 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
8000

fix(minimald): a native Linux host binds a box's declared ingress forwards at activation, before the - #3703

Merged
norrietaylor merged 9 commits into
mainfrom
agent/3646-a-native-linux-host-binds-a-box-s-declared-ingre
Nov 21, 2026
Merged

norrietaylor merged 9 commits into
mainfrom
agent/3646-a-native-linux-host-binds-a-box-s-declared-ingre

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Follow-up

Fixes #3646

Task marker
### D3646 — A native Linux host binds a box's declared ingress forwards at activation, before the record goes Active, as a VM host does
  kind: task
  size: M
  est: 220 code, 160 tests
  executor: agent
  origin: residual
  epic: 1437
  layers:
    - finalize:
      - crates/minimald/src/box_actor/setup.rs: In the native (false, _) arm, bind the declared forwards at publish in place of the host_ports_in_use probe, and keep the bound forwarders on the actor
      - crates/minimald/src/box_actor/host.rs: Release the forwarders bound at activation when the box stops or is destroyed, also when no attach adopted them
      - crates/minimald/src/box_actor/tests.rs: Add a test that a native finalize leaves the declared port bound before the first attach, and keep the held-port refusal tests green
      test: cargo test -p minimald a_native_activation_binds_declared_forwards_before_the_first_attach
      test: cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program
    - net:
      - crates/minimald/src/net/policy.rs: Let the publish-time bind run on a native control channel toward a switch address that the daemon draws, and retire host_ports_in_use if no caller stays
      - crates/minimald/src/net/gvproxy_network.rs: The first own-IP attach on a native host adopts the forwarders bound at activation and its lease, and does not bind them again
      - crates/minimald/src/net/mod.rs: Let finalize draw the box's switch lease early on a native host, so the attach takes the same lease
      test: cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation
  proof: On a native Linux host, a program on the host connects to a box's declared ingress port right after min session activate returns, before any attach.

Proof

On a native Linux host, min session activate now binds each declared ingress port before the box goes Active. A program on the host can connect to the box's declared port at its published address right after the activation returns, before any attach. The box's first attach takes the same switch lease and keeps those forwards. A stop or destroy with no attach unbinds the port. a_native_activation_binds_declared_forwards_before_the_first_attach shows this against a stand-in switch that binds real host listeners.

Notes from the agent: Out of scope: crates/minimald/src/net/provider.rs changed by one call site. A native box with no handed address draws its lease in OwnIpNetwork::reserve, so the attach takes the activation lease only if that call passes the box id (attach() became attach_drawn(session_id)). No file in the layers can make that change. Deviation: the activation lease and forwards are held on the s 8000 hared SwitchClient, keyed by box id, and not in an actor field. The attach can reach the switch but not the actor, and box_actor.rs is not in the layers. host.rs releases them through the switch at stop or destroy. host_ports_in_use stays: when the native switch cannot start (gvproxy missing), finalize logs a warning, falls back to the old probe, and the first attach binds as before. ensure_running now refuses a missing absolute gvproxy path before it deletes the control socket. Without that check, a failed start at finalize deleted the socket of a stand-in switch that another test binds. Risk: on a host where gvproxy-min is installed, the test harness server now spawns a real gvproxy at a native own-IP finalize. Before this change it spawned one only at an attach, which the harness never does, so tests that bind a stand-in socket before finalize can see a different switch there. Known gaps: adopted forwards bound at activation are not in RuntimeIngress.record_attached until the attach, so a publish move (#2748) before the first attach does not move th…[truncated]

Tests

line exit tail
cargo test -p minimald a_native_activation_binds_declared_forwards_before_the_first_attach 0 running 1 test test box_actor::tests::a_native_activation_binds_declared_forwards_before_the_first_attach ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1547 filtered out; finished in 2.33s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filter
cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program 0 running 1 test test box_actor::tests::activation_refused_when_declared_port_is_held_by_a_host_program ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1547 filtered out; finished in 2.39s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered o
cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation 0 running 1 test test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1547 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered

Verify

min task run agent-verify passed ([tasks.verify]).

Base

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

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimald/src/net/provider.rs

The switch keeps the lease a native finalize draws for a box, with the
declared forwards bound toward it. The box's first attach takes that
lease and its forwards, and binds nothing again. A detach of a lease
whose attach failed before it adopted them unbinds them.
On a native host the finalize draws the box's switch lease and binds the
declared forwards toward it at publish, in place of the port probe. A
program on the host reaches a declared port as soon as the activation
returns. A stop or destroy unbinds forwards that no attach adopted, and
a switch that cannot start falls back to the probe.
@coderabbitai
coderabbitai Bot commented Nov 20, 2026 •
< 8000 /span> Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 06afa1fb-af4a-4a55-ab83-cdc235c8cbfa

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

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@norrietaylor
Copy link
Copy Markdown
Member

The maintainer accepts the change outside the task's layers: the one call in crates/minimald/src/net/provider.rs (attach() → attach_drawn(session_id)), so that a native box with no handed address takes its activation lease at attach. Marked ready for review.

@norrietaylor
norrietaylor requested a review from a team as a code owner November 21, 2026 01:48
@minimal-foundry
minimal-foundry Bot commented Nov 21, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 6405b2d0b08c.

Nothing to do.

Clobber: not checked in depth. If that was not intentional, restore the earlier change.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

A native finalize now binds the declared forwards before the box goes Active, and stop and destroy release them. That part conforms to the bind discipline in §7.1 line 255. Two paths break that line. When the switch does not start, finalize logs a warning and publishes the name with no bind. C1 makes that fail the finalize, as the VM-backed arm does. The first attach adopts the activation forwards without checking their address. After a publish move before the attach, the name answers at an address with no bound forward. C2 adopts only the forwards at the current address and binds the rest.

Ruled at 0062a4e against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

Comment thread crates/minimald/src/box_actor/setup.rs Resolved
@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 — approval withheld

Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimald/src/box_actor/setup.rs:971, minimal-arch[bot] crates/minimald/src/net/gvproxy_network.rs:432. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@norrietaylor
Copy link
Copy Markdown
Member

/revise
Arch ruled CONDITIONS at 0062a4e (2 conditions, design §7.1 line 255):

  1. C1. On a native host, when the switch does not start, finalize logs a warning and publishes the box's name with no bound forward. Make that fail the finalize, with the reason, as the VM-backed arm already does. The name must never be published before its declared forwards are bound.
  2. C2. The first attach adopts the activation forwards without checking their address. If the publish moved between activation and attach, the name answers at an address with no bound forward. Adopt only the forwards bound at the box's current address, and bind the rest at attach.

Add a test for each: the switch-not-started finalize fails, and an attach after a moved address binds the missing forwards. Run both by name and record the results.

A native box's first attach kept every forward its finalize bound, even
when the publish moved before the attach. It now keeps only the forwards
at the box's current address, unbinds the others, and binds the declared
ports that are missing there.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as 281e69b8bae3.

line exit tail
cargo test -p minimald a_native_activation_binds_declared_forwards_before_the_first_attach 0 running 1 test test box_actor::tests::a_native_activation_binds_declared_forwards_before_the_first_attach ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.32s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filter
cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program 0 running 1 test test box_actor::tests::activation_refused_when_declared_port_is_held_by_a_host_program ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.37s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered o
cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation 0 running 1 test test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/net/provider.rs

Review threads the coder judged:

  • 👎 invalid — crates/minimald/src/box_actor/setup.rs:971: The finding is correct about the code, but the fix needs files outside this task's layers. When the native arm returns Err(e), 108 more minimald lib tests fail: their native test daemon cannot hand 100.64.128.x addresses or spawn gvproxy, and the old probe fallback hid that. The fix needs a stand-in
  • 👍 valid — crates/minimald/src/net/gvproxy_network.rs:548: The attach now keeps only the activation forwards at the current published address on ports it does not yield. It unbinds the others and binds the missing mappings through apply_ingress_naming_holders. Covered by native_attach_binds_the_forwards_a_moved_publish_left_unbound.

On a native Linux host, a program on the host connects to a box's declared ingress port right after min session activate returns, before any attach. If the box's address moves before its first attach, the attach unbinds the forward at the old address and binds the declared port at the new address, so the box's name never answers at an address where a declared port is not bound.

Notes from the agent: C2 is done: finish_own_ip_attach now calls adopt_activation_forwards. It keeps only the activation forwards that a declared mapping binds at the current published address, on a port the box does not yield now. It unbinds the other forwards and binds the missing mappings through apply_ingress_naming_holders. If that bind fails, it unbinds the kept forwards. The new test is native_attach_binds_the_forwards_a_moved_publish_left_unbound, and it passes.

C1 is not done, and the C1 test is not written. I made the change: the native (false, _) arm returned Err when draw_for_activation failed, and host_ports_in_use was removed. Then cargo test -p minimald --lib went from 16 failures at the branch head to 124. 102 of the new failures are tests that hand a box a switch address in 100.64.128.x. The test daemon's switch subnet comes from its instance id, so allocator.hand refuses that address. The other 10 failures are native boxes where the test box has no gvproxy to spawn. In production a native host never gets handed box_addresses, because only a VM host hands them (minimal-client box_registration). So these tests use a shape that only exists in tests, and before this change the probe fallback hid it. To ship C1, every TestServer needs a stand-in switch: serve_externally, a forwarder stand-in on its control socket, and a subnet that holds the handed test addresses. That change is in crates/minimald/src/test_harness.rs, and probably also in the tests in box_runtime, env.rs, connection.rs and net/dns_gate.rs. None of those files are in this task's layers, so I revert…[truncated]

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 1 condition · the full ruling

The adopt path now meets C2. The first attach keeps only the forwards at the current publish, unbinds the others and binds the missing ports. C1 is still open. setup.rs did not change. When the switch does not start at activation, the finalize logs a warning, runs the old probe and continues with no declared port bound. Section 7.1 line 255 says that a failed bind is a surfaced error, never a silent fallback. Make the change in C1.

Ruled at 281e69b against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

Comment thread crates/minimald/src/box_actor/setup.rs Resolved
@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.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimald/src/net/mod.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on the runtime's review findings: the coder changed nothing. This round changes no code. Both open threads describe tradeoffs that were made on purpose. The replies explain why. The three test lines pass at head 281e69b. To make a switch that cannot start fail the finalize (thread PRRT_kwDOPdfcxM66Q5VJ), every own-IP finalize in the suite needs a switch stand-in. That stand-in belongs in TestServer in test_harness.rs, which is outside this task's layers. A follow-up task can add a default switch stand-in to TestServer, then change the Some(Err) arm to return Err(e) and retire host_ports_in_use.

Review threads the coder judged:

  • 👎 invalid — crates/minimald/src/box_actor/setup.rs:971: This arm runs only when the switch does not start, so no bind is tried. The probe still refuses a held port, and the first attach fails with the switch's start error. That attach error is what the user sees. Returning Err here breaks over 40 own-IP finalizes in box_actor/tests.rs. All of them declar
  • 👎 invalid — crates/minimald/src/net/mod.rs:1123: The order change is deliberate. It affects only an absolute switch binary that does not exist. Every caller still gets the same NetError::Spawn with ENOENT, so no outcome changes. The only difference is that a stale socket stays in place. The next real start removes it, because remove_file runs befo

@norrietaylor
Copy link
Copy Markdown
Member

/revise
The maintainer deferred arch's C1 (fail the native finalize when the switch does not start) to #3716, because it needs a switch stand-in in TestServer, outside this task's files. Do these:

  1. Residual. In the PR body, list On a native host, a box whose switch does not start publishes its name with no declared forward bound #3716 as a residual for C1. In spec 18's NET-121 note, cite On a native host, a box whose switch does not start publishes its name with no declared forward bound #3716 for the native switch-not-started case.
  2. C2, still open. The first attach adopts the activation forwards without checking their address. If the publish moved between activation and attach, the name answers at an address with no bound forward. Adopt only the forwards bound at the box's current address, and bind the rest at attach. Add a test for an attach after a moved address, run it by name, and record the result.

The maintainer deferred failing the native finalize when the switch does
not start. The NET-121 note in spec 18 and the code comment on that arm
now name the issue that tracks it.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 5288297bbf5a.

line exit tail
cargo test -p minimald a_native_activation_binds_declared_forwar 10000 ds_before_the_first_attach 0 running 1 test test box_actor::tests::a_native_activation_binds_declared_forwards_before_the_first_attach ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.42s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filter
cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program 0 running 1 test test box_actor::tests::activation_refused_when_declared_port_is_held_by_a_host_program ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.44s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered o
cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation 0 running 1 test test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/net/provider.rs
  • docs/specs/18-spec-box-networking/18-spec-box-networking.md

Converted to a draft: outside the task's layers:: docs/specs/18-spec-box-networking/18-spec-box-networking.md.

On a native Linux host, a program on the host can connect to a box's declared ingress port right after min session activate returns, before any attach. If the publish moves before the first attach, that attach keeps only the forwards at the box's current address and binds the rest there.

Notes from the agent: Item 2 (C2): the fix and its test were already on the branch in 281e69b. adopt_activation_forwards in gvproxy_network.rs keeps only the activation forwards at the current published address, unbinds the others, and binds the missing declared ports at attach. The test native_attach_binds_the_forwards_a_moved_publish_left_unbound covers an attach after a moved address. I ran it by name this round, and it passed (exit 0). Item 1 (residual): list #3716 as the residual for C1 in the PR body. The fail-the-native-finalize-when-the-switch-does-not-start change needs a switch stand-in in TestServer. I cannot edit the PR body, so the runner must add this. Out of scope: docs/specs/18-spec-box-networking/18-spec-box-networking.md. The maintainer asked for this edit. I added #3716 to the NET-121 note for the native switch-not-started case. I also cited #3716 in the code comment on that arm in setup.rs. crates/minimald/src/net/provider.rs was already in the branch diff from an earlier round. It is not in the layers, and I did not touch it this round.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 21, 2026 05:04
@github-actions
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/18-spec-box-networking/18-spec-box-networking.md — 10 finding(s)

docs/specs/18-spec-box-networking/18-spec-box-networking.md:171: P004 NET-009 names test 'native_resolution_without_proxy_env', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:378: P004 NET-040 names test 'fresh_install_own_ip_ingress_publishes_loopback', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:388: P004 NET-041 names test 'installer_switch_binary_executable', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:435: P004 NET-048 names test 'linux_amd64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:440: P004 NET-049 names test 'fresh_linux_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:445: P004 NET-050 names test 'linux_arm64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:450: P004 NET-051 names test 'fresh_arm64_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:966: P004 NET-132 names test 'proxy_sees_each_vm_box_by_its_switch_address', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:992: P004 NET-134 names test 'deny_all_box_reaches_proxy_and_no_other_host_port', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:1016: P004 NET-107 names test 'session_outbound_request', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@8acb0663, spec format: How Minimal Writes Specs.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

The fix commit does not meet C1. The native finalize still logs a warning and continues when the switch does not start, so the box goes Active with no declared forward bound. Design §7.1 line 255 says a failed bind is a surfaced error, never a silent fallback. A comment that names #3716 does not change that. The new clause on NET-121 writes the fallback into the spec against the design. Make the edit in C1, and remove the spec clause in C2.

Ruled at 5288297 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

Comment thread crates/minimald/src/box_actor/setup.rs Resolved
@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.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@norrietaylor
norrietaylor marked this pull request as ready for review November 21, 2026 05:08
A native attach unbinds the forwards its activation left at an old
address. When that unbind failed, the forwarder was dropped and its
listener stayed bound with nothing to track it. The attach now keeps it,
so the attach's teardown unbinds it again.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on the runtime's review findings, pushed as f8b23f8f9485.

line exit tail
cargo test -p minimald a_native_activation_binds_declared_forwards_before_the_first_attach 0 running 1 test test box_actor::tests::a_native_activation_binds_declared_forwards_before_the_first_attach ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.32s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filter
cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program 0 running 1 test test box_actor::tests::activation_refused_when_declared_port_is_held_by_a_host_program ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 2.35s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered o
cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation 0 running 1 test test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1549 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/net/provider.rs
  • docs/specs/18-spec-box-networking/18-spec-box-networking.md

Review threads the coder judged:

On a native Linux host, a program on the host can connect to a box's declared ingress port right after min session activate returns, before any attach. A stale forward that the first attach fails to unbind now stays tracked, and the attach's teardown unbinds it again.

Notes from the agent: Revise round 4. The only code change is in adopt_activation_forwards: a stale activation forward whose unbind_moved fails now stays in the returned set. The attach's teardown then retries the unbind. C1 and C2 are not changed. A maintainer deferred failing the native finalize when the switch does not start, and #3716 tracks that work. Commit 5288297 records that decision. Also ran native_attach_binds_the_forwards_a_moved_publish_left_unbound (exit 0) and cargo clippy -p minimald --all-targets (clean).

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

The native finalize still falls back to the host_ports_in_use probe when the switch does not start. Then the box goes Active with no declared port bound. Section 7.1 line 255 says a failed bind is a surfaced error, never a silent fallback. The new fix commit in adopt_activation_forwards conforms, but it does not touch C1 or C2. Return the error in the Some(Err(e)) arm (C1). Remove the spec clause that records the fallback (C2).

Ruled at f8b23f8 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

Comment thread crates/minimald/src/box_actor/setup.rs Resolved
@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.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimald/src/net/mod.rs Resolved
A gvproxy that exits after a native activation takes the activation
forwards with it. The switch now counts its spawns, and a box's first
attach drops activation forwards bound under an earlier spawn, so it
binds every declared port on the switch that runs now.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on the runtime's review findings, pushed as 6405b2d0b08c.

line exit tail
cargo test -p minimald a_native_activation_binds_declared_forwards_before_the_first_attach 0 running 1 test test box_actor::tests::a_native_activation_binds_declared_forwards_before_the_first_attach ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1550 filtered out; finished in 2.25s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filter
cargo test -p minimald activation_refused_when_declared_port_is_held_by_a_host_program 0 running 1 test test box_actor::tests::activation_refused_when_declared_port_is_held_by_a_host_program ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1550 filtered out; finished in 2.31s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 13 filtered o
cargo test -p minimald native_attach_adopts_the_forwards_bound_at_activation 0 running 2 tests test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation_only_from_the_same_switch ... ok test net::gvproxy_network::tests::native_attach_adopts_the_forwards_bound_at_activation ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1549 f

Verify min task run agent-verify passed.

Outside the task's layers::

  • crates/minimald/src/net/provider.rs
  • docs/specs/18-spec-box-networking/18-spec-box-networking.md

Review threads the coder judged:

On a native Linux host, a program on the host connects to a box's declared ingress port right after min session activate returns, before any attach. If gvproxy restarts before the first attach, that attach binds the declared ports again on the new switch.

Notes from the agent: Round 5. Fixed the foundry finding: SwitchClient counts gvproxy spawns, and claim_activation_lease drops activation forwards bound under an earlier spawn, so adopt_activation_forwards binds every declared port again. C1 and C2 stay invalid, for the same reason as in the earlier rounds: the maintainer deferred failing the native finalize when the switch does not start, and #3716 tracks it. The spec file in C2 is also outside this task's layers. cargo clippy -p minimald --all-targets and cargo fmt --check are clean. just clippy-strict was not run.

@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 Nov 21, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

The runtime will not revise this pull request again on its own: the diff is +1117/-56 (1173 lines), past 3x the plan's estimate of 380 lines (est: 220 code, 160 tests, as the triage comment pinned on #3646 reads), at round 5 (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 #3646 by hand.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

The new commit handles a gvproxy restart before the first attach correctly. It does not touch the two open conditions. The native finalize in setup.rs still falls back to a warning and a probe when the switch does not start. Design §7.1 line 255 forbids that silent fallback. Make the edit in C1. Then remove the matching clause from the NET-121 spec comment, as C2 says.

Ruled at 6405b2d against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

Comment thread crates/minimald/src/box_actor/setup.rs Resolved
@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 — approval withheld

Verdict COMMENT — APPROVE withheld: 10 unresolved threads — minimal-arch[bot] crates/minimald/src/box_actor/setup.rs:973, minimal-arch[bot] crates/minimald/src/net/gvproxy_network.rs:552, minimal-arch[bot] crates/minimald/src/box_actor/setup.rs:973, minimal-arch[bot] crates/minimald/src/box_actor/setup.rs:973, minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:1059, …. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@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 by the maintainer over the arch CONDITIONS at 6405b2d. C1 (the native finalize failing when the switch does not start) is deferred to #3716, because it needs a switch stand-in in TestServer, outside this task's files. The native fallback stays until #3716 lands.

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

Maintainer approval at 6405b2d, over arch C1/C2, which are deferred to #3716.

@norrietaylor
Copy link
Copy Markdown
Member

/review

@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 — every review thread is resolved; @norrietaylor closed the last one. The review of 6405b2d0b08c withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 21, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit cbda70a Nov 21, 2026
41 of 42 checks passed
@norrietaylor
norrietaylor deleted the agent/3646-a-native-linux-host-binds-a-box-s-declared-ingre branch November 21, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bind declared ingress forwards at activation on a native Linux host

1 participant

0