Skip to content

feat(minimald): answer a macOS box's ports at the address its name resolves to (T98) - #2713

Merged
norrietaylor merged 16 commits into
mainfrom
agent/2687-a-macos-box-s-ports-answer-at-the-address-its-na
Oct 29, 2026
Merged

norrietaylor merged 16 commits into
mainfrom
agent/2687-a-macos-box-s-ports-answer-at-the-address-its-na

Conversation

@minimal-foundry

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

Copy link
Copy Markdown
Contributor

T98 — A macOS box's ports answer at the address its name resolves to

slice: S0
kind: task
covers: NET-010, NET-040, NET-123
size: L
est: 340 code, 460 tests
executor: agent
difficulty: unknown ground
model: strongest
diagnostics: min bug bundles carry the daemon log, whose session-start probe line names the publish surface it picked (surface=reserved-range or surface=127.0.0.1-interim) and, on a re-walk after min finalize-install, the boxes it moved off the interim
observability: one info line per session-start range walk with the surface and the first failing address, and one warn line per box moved between the interim and its range address, with the session id, the old and the new address
layers:
- host-allocation:
- crates/minvmd/src/net/answerer.rs: builds on open PR #2332: allocation bind-probes the resolved range address and hands the 127.0.0.1 interim when the host cannot bind it, so the zone never answers an address nothing listens at; finish that PR here rather than restart it
- crates/minvmd/src/control.rs: #2332's resume path keeps a box's recorded range or interim address across an answerer restart and releases a failed non-interim resume
test: cargo nextest run -p minvmd released_address_is_not_reused_within_the_answer_ttl
- guest-walk:
- crates/minimald/src/box_manager.rs: the forwarder-conducted range walk, today run once at daemon start, also runs at each session start while the landed verdict is absent; a present landing moves every box standing at the interim onto its range address through the existing land_range_verdict present arm
- crates/minimald/src/box_manager/handle.rs: exposes the re-walk to the create handler beside land_range_verdict
- crates/minimald/src/rpc.rs: the create handler's session-start probe on a VM-backed daemon asks for the forwarder walk instead of reading the guest's own lo, so the reply's interim flag is the host's verdict
- crates/minimald/src/net/policy.rs: probe_publish_surface is callable per session start without holding the daemon-start path
- crates/minimald/src/rpc/tests.rs: a create after the stand-in walk flips from absent to present publishes in the range and clears the interim flag
test: cargo nextest run -p minimald session_start_probes_reserved_range
test: cargo nextest run -p minimald absent_range_publishes_interim_and_readvises
test: cargo nextest run -p minimald session_start_rewalks_range_after_finalize_install
test: cargo nextest run -p minimal advisory_command_reserves_the_range_on_macos
- allocation:
- crates/minimald/src/box_actor/tests.rs: two boxes created after the range lands hold distinct range addresses and their forwards bind at those addresses
test: cargo nextest run -p minimald each_box_gets_own_loopback_address
- e2e:
- scripts/session-e2e.sh: the fresh-install case asserts on macOS that http://<name>.min.internal:8080 and the box's range address both return the in-box server's response, and that min ls names that address
test (deferred: vm): ./scripts/session-e2e.sh fresh_install_own_ip_ingress_publishes_loopback
produces:
- crates/minimald/src/box_manager/handle.rs
consumes: none
proof: On a macOS host after min finalize-install, a new own-address box's declared port answers at the 127.0.64.N address its name resolves to, without restarting the VM.

Proof

On a macOS host whose VM started before min finalize-install, the next min session activate --network own_ip walks the host's loopback through the forwarder again. It finds the range present and lands it. The new box's declared port then answers at the 127.0.64.N address its name resolves to, and boxes that stood at 127.0.0.1 move to their range addresses. The VM does not restart. Unit tests prove this with a stand-in walk. The macOS e2e case that proves it on a real host is written, but it was not run here.

Notes from the agent: Host-allocation layer: PR #2332 was in the merge queue as commit 379c2f0, whose parent is this branch's head. I applied it whole, with no changes, as one commit (360d51a). It touches only answerer.rs and control.rs. If #2332 merges first, that commit is a duplicate and the merge will be clean or trivial.

Guest-walk layer: a new RangeWalk type in box_manager.rs owns the forwarder walk and the verdict landing. The daemon-start walk and every session-start walk use it, and it lets one walk run at a time. A session start that waits behind a walk takes that walk's answer. While the landed verdict is not present, each session start walks again. A present verdict is not walked again. land_range_verdict now returns how many boxes its present arm moved, and the session-start log line carries it as moved_off_interim. policy.rs adds a lock per process (RANGE_WALK_TURN), so two walks never bind the probe port at the same time. The create handler on a VM-backed daemon logs the same message as before ("session-start loopback probe picked the publish surface"), with via=forwarder, walked, moved_off_interim, surface and first_failure added. A native daemon keeps its local bind probe.

Cost: on a VM-backed daemon, a create that arrives while the daemon-start walk runs now waits for that walk, about 1 s on a dead control channel. While the range is absent, every create pays one walk of 254 expose/unexpose rounds.

Test seam: BoxManagerHan…[truncated]

Tests

line exit tail
cargo nextest run -p minvmd released_address_is_not_reused_within_the_answer_ttl 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f6d3... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald session_start_probes_reserved_range 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-15d4... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workb
cargo nextest run -p minimald absent_range_publishes_interim_and_readvises 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-8560... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald session_start_rewalks_range_after_finalize_install 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-0859... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimal advisory_command_reserves_the_range_on_macos 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-a2b3... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald each_box_gets_own_loopback_address 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-2885... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify

min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

lish_is_withdrawn_by_the_destroy
        PASS [   0.311s] (  35/1795) minimald box_actor::tests::a_failing_activate_hook_blocks_the_session
        PASS [   0.272s] (  36/1795) minimald box_actor::tests::a_failing_destroy_hook_still_destroys_the_session
        PASS [   4.811s] (  37/1795) minimald box_actor::tests::a_destroyed_holders_shared_port_is_not_bound_for_a_box_that_is_not_running
        PASS [   2.296s] (  38/1795) minimald box_actor::tests::a_handed_box_pending_at_finalize_publishes_the_interim_when_the_verdict_lands_absent
        PASS [   0.258s] (  39/1795) minimald box_actor::tests::a_hook_launched_shell_takes_the_attaching_terminals_term
        PASS [   0.265s] (  40/1795) minimald box_actor::tests::a_launch_whose_record_cannot_be_written_kills_its_box
        PASS [   2.277s] (  41/1795) minimald box_actor::tests::a_hook_launched_shell_of_a_registered_box_is_kept_for_a_terminal
        PASS [   4.621s] (  42/1795) minimald box_actor::tests::a_hand_over_bind_the_switch_refuses_leaves_the_election_standing
        PASS [   0.012s] (  43/1795) minimald box_actor::tests::a_probe_of_a_wedged_host_ends_instead_of_stranding_its_task
        PASS [   2.305s] (  44/1795) minimald box_actor::tests::a_registered_box_never_launched_mints_and_binds_its_row
        PASS [   6.869s] (  45/1795) minimald box_actor::tests::a_handed_reserved_address_waits_for_the_verdict_before_it_publishes
        FAIL [   5.235s] (  46/1795) minimald box_actor::tests::a_mint_whose_host_dies_before_attach_reports_a_spawn_failure
  stdout ───

    running 1 test
    test box_actor::tests::a_mint_whose_host_dies_before_attach_reports_a_spawn_failure ... FAILED

    failures:

    failures:
        box_actor::tests::a_mint_whose_host_dies_before_attach_reports_a_spawn_failure

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1135 filtered out; finished in 5.22s

  stderr ───

    thread 'box_actor::tests::a_mint_whose_host_dies_before_attach_reports_a_spawn_failure' (1741) panicked at crates/minimald/src/box_actor/tests.rs:1660:5:
    channel did not close within the timeout; got []
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   4.260s] (  47/1795) minimald box_actor::tests::a_mint_whose_host_wedges_reports_busy_instead_of_death
        PASS [   3.535s] (  48/1795) minimald box_actor::tests::a_restarted_daemon_launches_a_restored_own_ip_boxs_host_on_resume
        PASS [   4.534s] (  49/1795) minimald box_actor::tests::a_restarted_daemon_re_derives_the_box_s_address_from_the_answerer
────────────
     Summary [  18.917s] 49/1795 tests run: 48 passed, 1 failed, 20 skipped
        FAIL [   5.235s] (  46/1795) minimald box_actor::tests::a_mint_whose_host_dies_before_attach_reports_a_spawn_failure
warning: 1746/1795 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

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/minvmd/src/control.rs
  • crates/minvmd/src/net/answerer.rs

Deferred

The plan marked these test lines deferred: the executor lacks the lane, so nothing here ran them and they still owe evidence.

line lane
./scripts/session-e2e.sh fresh_install_own_ip_ingress_publishes_loopback vm (held on #2717, arch C2)

Layer exception

docs/specs/18-spec-box-networking/18-spec-box-networking.md is outside T98's layers:. Arch condition C3 at 3b32cf89 (arch_rulings 497) asks for the NET-040 amendment by name: the box's port 8080 is published at the loopback address its name resolves to, its reserved-range address (NET-010) or 127.0.0.1 under NET-123's interim. The verify line is unchanged.

Closes #2687


Generated by Claude Code

Bring in the work of #2332 from its merge-queue commit. Allocation
reads the whole box range through switch::loopback::probe and hands
the 127.0.0.1 interim when the host cannot bind it, so the zone never
answers an address that nothing listens at. A resume keeps the range
or interim address the box was created at across an answerer restart.
A microVM daemon walked the host's loopback once, at its start. After
`min finalize-install` the host binds the range, but the daemon kept
the absent verdict, so new boxes stood at the 127.0.0.1 interim until
the VM restarted.

The create handler on a VM-backed daemon now asks the forwarder's
walk, not the guest's own lo, so the reply's interim flag is the
host's verdict. While the landed verdict is not present, each session
start walks again. A present landing moves every box at the interim
onto its range address through land_range_verdict's present arm.
Walks run one at a time on the shared probe port.
The boxes in each_box_gets_own_loopback_address are now created after a
session-start walk lands the range present over an absent daemon-start
verdict. The test checks that each box's forwards bind at its own range
address.
On the macOS lane the fresh-install case runs the script that
min finalize-install runs on a running VM. It then asserts that a new
own-IP box answers at <name>.min.internal:8080 and at its 127.0.64.N
address, and that min ls names that address.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

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: 435bdcd2-4197-4537-a0c0-2e9fadda942c

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@minimal-foundry

minimal-foundry Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 4 threads unresolved at 2ef959780f95.

APPROVE withheld: 4 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh:5065, minimal-arch[bot] scripts/session-e2e.sh:5064, minimal-arch[bot] scripts/session-e2e.sh:5065, minimal-arch[bot] scripts/session-e2e.sh:5065. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Clobber: none seen.

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

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

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

@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 · 3 conditions · the full ruling

The forwarder walk at session start is in the right owner, fails closed to the interim, and logs what the task promises. One part deviates. RangeWalk::session_start stops the bind probe once the verdict is present. §7.1 line 258 and NET-123 require a bind probe at every session start. C1 removes that skip and updates the test that pins it. C2 keeps the deferred macOS e2e leg open until it runs. C3 amends NET-040, because its 127.0.0.1:8080 is the interim address, not the range address §7.1 line 255 gives an own-IP box.

Ruled at 3b32cf8 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/rpc/tests.rs Resolved
Comment thread scripts/session-e2e.sh Resolved
Comment thread scripts/session-e2e.sh Resolved

Copy link
Copy Markdown
Member

/revise Close arch conditions C1 and C3 from the ruling at 3b32cf89 (arch_rulings 497).

  • C1 (§7.1 line 258 requires a bind-probe at every session start, and the range can go away under a running VM): in crates/minimald/src/box_manager.rs RangeWalk::session_start, remove the if self.range_present() early return. Every session start that does not take a concurrent walk's answer calls walk_and_land(). A present-to-absent walk then lands RangeVerdict::Absent through the existing Absent arm of land_range_verdict, and the reply carries the interim flag. Update the RangeWalk and session_start_range_walk doc comments to match.
    • In crates/minimald/src/rpc/tests.rs session_start_rewalks_range_after_finalize_install, expect three walks and walked=true for the later create.
    • Add a case where the stand-in turns absent after a present landing: the next create replies interim_loopback = true, and the earlier box moves to 127.0.0.1.
  • C3: in docs/specs/18-spec-box-networking/18-spec-box-networking.md NET-040, replace "publish 127.0.0.1:8080 on the host" with a statement that the box's port 8080 is published on the host at the loopback address its name resolves to: its own reserved-range address (NET-010), or 127.0.0.1 under NET-123's interim. Keep the verify line.
  • Change nothing else. C2 (the macOS e2e leg) is not a code change and is out of this round.

Generated by Claude Code

The range can go away under a running VM. A present verdict no longer
skips the session-start walk, so a present-to-absent walk lands the
absent arm and moves the boxes in the range onto the 127.0.0.1 interim.
@github-actions

github-actions Bot commented Oct 28, 2026 •

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:159: 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:339: 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:344: 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:382: 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:387: 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:392: 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:397: 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:746: 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:772: 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:796: 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@fb5932b8, 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 session-start walk now probes the range each time, as §7.1 line 258 requires. The NET-040 amendment matches line 254. One defect is now reachable. The probe binds port 21064 on each range address and counts any refusal as an absent address. A box that holds port 21064 at its range address makes the next session start read the whole range absent. Then every box leaves its session-stable address (line 254). C1 fixes the probe. C2 asks for the macOS e2e run, or an issue that owns it.

Ruled at ef16170 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/minimald/src/net/policy.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread scripts/session-e2e.sh 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/policy.rs Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 28, 2026
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p minvmd released_address_is_not_reused_within_the_answer_ttl 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-7354... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald session_start_probes_reserved_range 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-5c45... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workb
cargo nextest run -p minimald absent_range_publishes_interim_and_readvises 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-b056... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald session_start_rewalks_range_after_finalize_install 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-20b9... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimal advisory_command_reserves_the_range_on_macos 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-493b... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald each_box_gets_own_loopback_address 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-eca4... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify min task run agent-verify passed.

Outside the task's layers::

  • docs/specs/18-spec-box-networking/18-spec-box-networking.md

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

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/box_manager.rs: Removed the range_present early return in RangeWalk::session_start. Every session start now calls walk_and_land(), so a present-to-absent walk lands the absent arm.
  • 👍 valid — crates/minimald/src/rpc/tests.rs: The later create now expects a third walk and walked=true. Added a step where the stand-in turns absent: the reply sets interim_loopback and the earlier box moves to 127.0.0.1.
  • 👍 valid — scripts/session-e2e.sh:5021: The finding holds, but the fix is evidence from the macOS VM lane, not a code change. This box has no such lane, and the revise note puts C2 out of this round. The SKIPPED path is unchanged until someone runs that leg or files an issue for it.
  • 👍 valid — scripts/session-e2e.sh:5127: Amended NET-040: the box's port 8080 is published at the loopback address its name resolves to, its reserved-range address (NET-010) or 127.0.0.1 under NET-123's interim. The verify line is unchanged.

On a macOS host after min finalize-install, a new own-address box's declared port answers at the 127.0.64.N address its name resolves to, without a VM restart. Every session start now bind-probes the range again, so if the range goes away under a running VM, the next create replies with the interim flag and the earlier boxes move to 127.0.0.1.

Notes from the agent: Revise round 1 closes C1 and C3. C1: RangeWalk::session_start no longer returns early on a present verdict. Every session start that does not take a concurrent walk's answer calls walk_and_land(). The unused range_present helper is removed. The RangeWalk, RangeWalkAnswer, session_start_range_walk and init doc comments are updated. session_start_rewalks_range_after_finalize_install now expects three walks and walked=true for later. The same test then adds a case: the stand-in turns absent, the next create replies interim_loopback=true, the earlier box moves to 127.0.0.1, and the move is logged as loopback-range-absent-box. C3: docs/specs/18-spec-box-networking/18-spec-box-networking.md is outside the task's layers. The directive asks for the NET-040 change by name, so I edited it, and its verify line is unchanged. C2 (the macOS e2e leg) is out of this round as the directive says, so session-e2e.sh is unchanged. Deferred (lane: vm): ./scripts/session-e2e.sh fresh_install_own_ip_ingress_publishes_loopback. I did not run it. cargo clippy -p minimald --all-targets is clean. just lint-prose on the spec file reports no alert for the NET-040 line.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 28, 2026 07:44
@norrietaylor
norrietaylor marked this pull request as ready for review October 28, 2026 07:47
@norrietaylor
norrietaylor force-pushed the agent/2687-a-macos-box-s-ports-answer-at-the-address-its-na branch from ef16170 to 533ccb2 Compare October 28, 2026 07:48

Copy link
Copy Markdown
Member

/revise Close arch condition C1 from the re-ruling at ef161708 (arch_rulings 501). The re-probe at every session start exposes a defect: probe_publish_surface_within binds RANGE_PROBE_PORT (21064) on each range address and counts any forwarder refusal as a failure, and RangeProbe::present() needs every address bound. A box forward or a host_ip mirror on port 21064 at a range address then makes the next session start land absent while the range is present, and every box leaves its session-stable address.

  • In crates/minimald/src/net/policy.rs post_json_within, map the forwarder's address-in-use refusal to io::ErrorKind::AddrInUse.
  • In the probe_publish_surface_within probe loop, count an AddrInUse round as bound, because the address exists. Only a refusal that says the address is not available (or a timeout) records first_failure.
  • Add a test in policy.rs with a stand-in control channel that refuses one range address as in use, and assert probe.present() is true.
  • In crates/minimald/src/rpc/tests.rs session_start_rewalks_range_after_finalize_install, add a step where a box holds a forward at a range address and the next session start keeps every box at its range address.
  • Change nothing else. C2 (the macOS VM leg) is held on Run the deferred #1437 macOS VM lane legs #2717 and named in the PR body's Deferred table. The branch head is now 533ccb2b: only the last commit's subject changed for commitlint, and the tree is the same.

Generated by Claude Code

@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 change now bind-probes the range at every session start, as §7.1 line 258 requires. NET-040 is amended. When the range goes away, the absent arm of land_range_verdict moves own-address boxes to 127.0.0.1. It leaves the node address in the range, so host_ip names answer an address that the host cannot bind. Make the change in C1 so that the node goes back to its pre-grant state, and add the test assertion. C2 corrects a stale doc comment. The macOS e2e leg stays open on #2717.

Ruled at 533ccb2 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/net/policy.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 — 2 findings, 2 inline.

Panel: 1 of 3 personas ran (correctness); did not complete: security, supply-chain.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/net/policy.rs Resolved
@norrietaylor
norrietaylor marked this pull request as ready for review October 29, 2026 00:37

@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: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.

Comment thread crates/minimald/src/net/policy.rs Resolved

@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: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The two new commits close the open points from the last ruling. A held probe port now counts as a bound address. A walk that gets no answer keeps a present verdict, and §7.1 line 258 allows that because a fault does not show that the range is absent. One leg stays open: the macOS e2e case is deferred on #2717 and did not run. C1 tells you how to close it. The change can merge with C1 open as a filed residual.

Ruled at 8e65894 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
The forwarder answers 'already running' from its own forward table, so a
probe forward that an earlier walk left bound read as a bound address on
every later walk. The walk now marks each address before its expose and
clears the mark once nothing of its own is held there. At a marked
address an in-use answer releases the leftover and asks again.

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

APPROVE withheld: 11 unresolved threads — minimal-arch[bot] crates/minimald/src/box_manager.rs, minimal-arch[bot] crates/minimald/src/rpc/tests.rs, minimal-arch[bot] scripts/session-e2e.sh:5065, minimal-arch[bot] scripts/session-e2e.sh:5171, minimal-arch[bot] crates/minimald/src/net/policy.rs, ….

minimal-review — advisory review

Verdict COMMENT — No findings.

Panel: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.

@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: PASS_WITH_CONDITIONS · 1 condition · the full ruling

The compare is a clean merge of main and one fix to the range walk in policy.rs. The fix makes the session-start bind probe fail closed. A probe forward that an earlier walk left bound no longer counts as a bound address. This agrees with §7.1 line 258. The ruling on 8e658947 stands for the rest. C1 stays open: the macOS e2e leg is deferred to the vm lane on #2717, and a SKIPPED run does not close it.

Ruled at 0a41402 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on the runtime's review findings, pushed as 0a414026f856.

line exit tail
cargo nextest run -p minvmd released_address_is_not_reused_within_the_answer_ttl 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-24f2... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald session_start_probes_reserved_range 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-3a2b... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workb
cargo nextest run -p minimald absent_range_publishes_interim_and_readvises 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-e491... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald session_start_rewalks_range_after_finalize_install 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-eda8... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimal advisory_command_reserves_the_range_on_macos 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-5643... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald each_box_gets_own_loopback_address 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-d63f... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.

Verify min task run agent-verify passed.

Outside the task's layers::

  • docs/specs/18-spec-box-networking/18-spec-box-networking.md

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

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6xX-U1: The walk now tracks addresses where its own probe forward may be left bound (failed unexpose or budget cut). At such an address an in-use answer releases the leftover and re-asks, so it cannot count as bound. Test: a_probe_forward_left_by_an_earlier_walk_is_released_not_counted. (not posted on the thread: not an open thread on the pull request)

On a macOS host after min finalize-install, a new own-address box's declared port answers at the 127.0.64.N address its name resolves to, without a VM restart. This round also makes sure that a probe forward an earlier range walk left bound cannot keep the range present after the host loses an address.

Notes from the agent: Revise round 5: addressed the one open thread in crates/minimald/src/net/policy.rs. RANGE_WALK_TURN now also holds, per control channel, the addresses where a walk may have left its own probe forward bound (an unexpose that failed, or a budget cut between expose and unexpose). At such an address an in-use answer releases the leftover and asks again. If that release fails, the address does not count as bound. A held address with no mark still counts as bound and gets no unexpose, so a box forward is never torn down. Deferred (lane: vm): ./scripts/session-e2e.sh fresh_install_own_ip_ingress_publishes_loopback was not run on this box. cargo clippy -p minimald --all-targets was clean.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 29, 2026 01:19
@norrietaylor
norrietaylor marked this pull request as ready for review October 29, 2026 01:40

@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: PASS_WITH_CONDITIONS · 1 condition · the full ruling

This head merges main and does not change the PR's files. The ruling on 0a414026 stands. The session-start walk agrees with §7.1 line 258. One condition stays open. Run the macOS e2e leg fresh_install_own_ip_ingress_publishes_loopback and record the result in #2717 (C1).

Ruled at 2ef9597 against gominimal/arch@109541a48c31 by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved

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

Babysitter review at 2ef95978. This head is 0a414026 with main merged by update-branch (no hand resolution), so the code under review is 0a414026's.

  • Design: arch re-review at this head is PASS_WITH_CONDITIONS against §7.1 lines 249-258. The walk now runs at every session start, a present-to-absent walk moves boxes and the node address to the 127.0.0.1 interim, and NET-040 is amended to publish at the address the name resolves to.
  • Leftover probe forward (LOW 4407565379): fixed in 0a414026. A walk marks each address before its expose, releases its own leftover forward on an in-use answer at a marked address and asks again, and counts a failed release as a failure, not a bound address. That fails closed.
  • C1 (macOS leg fresh_install_own_ip_ingress_publishes_loopback): the epic owner ruled it is carried by residual #2717, which the PR body's Deferred table names. The five threads that asked for the run are resolved with that ruling.
  • Threads: zero open. I checked each earlier arch condition against the code at 0a414026 before resolving it.
  • CI: every lane aggregator is green at this head, with the trickle-test fix (#2737) in the base.

No further findings.


Generated by Claude Code

@norrietaylor norrietaylor changed the title T98 — A macOS box's ports answer at the address its name resolves to feat(minimald): answer a macOS box's ports at the address its name resolves to (T98) Oct 29, 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.

Babysitter approval at 2ef9597: every merge gate passes at this head (arch PASS at 2ef9597, zero open threads, every lane aggregator green). Squash title feat(minimald): answer a macOS box's ports at the address its name resolves to (T98) and the squashed message pass commitlint. Queued for squash merge.


Generated by Claude Code

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 64d3358 Oct 29, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the agent/2687-a-macos-box-s-ports-answer-at-the-address-its-na branch October 29, 2026 02:47
norrietaylor pushed a commit that referenced this pull request Nov 4, 2026
…olves to (#2713)

T98. A microVM daemon walked the host's loopback once, at its start, so after min
finalize-install new boxes stood at the 127.0.0.1 interim until the VM restarted. The
create handler on a VM-backed daemon now asks the forwarder's walk, not the guest's own
lo, and every session start walks again, so a present landing moves boxes at the interim
onto their range addresses and a present-to-absent walk moves them back. Walks run one at
a time on the shared probe port. A held probe port counts as bound, a leftover probe
forward is released before it is read, and a walk that gets no answer keeps a present
verdict. The absent landing also moves the node's own address to the interim. The NET-040
spec line and the macOS e2e case come with the change.

Backport of #2713, folded from #2740.

Adapted to the line:
- box_manager.rs and box_manager/handle.rs hunks land in sessions.rs: RangeWalk,
  RangeWalkSource and RangeWalkAnswer, the range_walk cell on ManagerHandle and
  WeakManagerHandle, session_start_range_walk and install_range_walk_standin.
- rpc/tests.rs hunks land in the inline tests in rpc.rs.
- crate::traced::spawn becomes tokio::spawn in the stand-in forwarders.
- ADDRESS_IN_USE_BODY is shared with #2352: one copy stays in net/policy.rs.

(cherry picked from commit 64d3358)
norrietaylor pushed a commit that referenced this pull request Nov 5, 2026
…olves to (#2713)

T98. A microVM daemon walked the host's loopback once, at its start, so after min
finalize-install new boxes stood at the 127.0.0.1 interim until the VM restarted. The
create handler on a VM-backed daemon now asks the forwarder's walk, not the guest's own
lo, and every session start walks again, so a present landing moves boxes at the interim
onto their range addresses and a present-to-absent walk moves them back. Walks run one at
a time on the shared probe port. A held probe port counts as bound, a leftover probe
forward is released before it is read, and a walk that gets no answer keeps a present
verdict. The absent landing also moves the node's own address to the interim. The NET-040
spec line and the macOS e2e case come with the change.

Backport of #2713, folded from #2740.

Adapted to the line:
- box_manager.rs and box_manager/handle.rs hunks land in sessions.rs: RangeWalk,
  RangeWalkSource and RangeWalkAnswer, the range_walk cell on ManagerHandle and
  WeakManagerHandle, session_start_range_walk and install_range_walk_standin.
- rpc/tests.rs hunks land in the inline tests in rpc.rs.
- crate::traced::spawn becomes tokio::spawn in the stand-in forwarders.
- ADDRESS_IN_USE_BODY is shared with #2352: one copy stays in net/policy.rs.

(cherry picked from commit 64d3358)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T98 — A macOS box's ports answer at the address its name resolves to

1 participant