Skip to content

T114 — min ls and the box commands tell the truth, end to end - #2839

Merged
norrietaylor merged 7 commits into
mainfrom
agent/2711-min-ls-and-the-box-commands-tell-the-truth-end-t
Nov 2, 2026
Merged

norrietaylor merged 7 commits into
mainfrom
agent/2711-min-ls-and-the-box-commands-tell-the-truth-end-t

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

T114 — min ls and the box commands tell the truth, end to end

slice: S17
kind: integration
covers: none
size: M
est: 80 code, 200 tests
executor: agent
difficulty: routine
model: standard
diagnostics: each leg of the case prints the command it ran, its exit status and the line it checked, and the VM host daemon logs from the run sit in the case's work directory
observability: the case prints each command against each VM with its outcome
depends on:
- blocked by #2695
- blocked by #2696
- blocked by #2705
- blocked by #2709
- blocked by #2796
- blocked by #2697
layers:
- e2e:
- scripts/session-e2e.sh: adds the case ls_and_box_commands_tell_the_truth: two VMs, a stopped VM's boxes in min ls, the address and EGRESS columns against min session policy, policy and forward without --vm, the stopped-VM and unknown-box errors, both proxy ports after the preferred port frees, and the --public and out-of-range expose refusals
test (deferred: vm): ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth
test: cargo nextest run -p minimal box_name_resolves_vm_without_flag
produces: none
consumes: none
proof: min ls lists every box on every VM, stopped ones included, with its address, egress posture and every hostname-proxy port; host-side commands find a box on any VM; and each refusal says what happened and what to type next.

Proof

scripts/session-e2e.sh now has the case ls_and_box_commands_tell_the_truth. On a KVM or macOS VM lane it boots the default VM and a named VM, each with a box. It checks that min ls lists both boxes, and still lists the named VM's box as 'lsvm (stopped)' after that VM stops. It checks that the ADDRESS cell is the address the box's own expose reply names and min session policy lists, and that the EGRESS cell is the posture min session policy prints. It checks that min session policy and min net forward find the named VM's box with no --vm, and that the forward relays. It checks that the named VM's HOSTNAME PROXY row lists its substitute port and the preferred port after the default VM frees it, and that a request through each port reaches the box. It checks that the unknown-box, stopped-VM, --public and out-of-range refusals each say what happened and the next command. A person sees these checks pass when the vm lane runs the case.

Notes from the agent: Deferred (lane: vm): ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth. This box has no KVM, so I did not run it. I ran bash -n and shellcheck on the script, and both are clean. I also ran the table and port parsers against a sample min ls output. The case is registered in the header list, the VM-lane env dispatch, the whole-lane order (after names_survive_restart_and_second_vm), the per-case dispatch and the usage text. It reuses the globals TWO_VM_NAME, TWO_VM_FWD_PID and TWO_VM_SEED_A_DIR/B_DIR, so the existing teardown stops the named VM, kills the forward and removes the seeds. Assumptions that only the vm lane can confirm: (1) the default VM boots first and holds the preferred proxy port, so the named VM gets a substitute; (2) min ls autospawns the default VM again after it stops; (3) min session policy, with the default VM running, gives the stopped-VM refusal for a box on the stopped named VM. The named VM's state dir stays after the case, as the two-VM case's does, so later cases in a wh…[truncated]

Tests

line exit tail
cargo nextest run -p minimal box_name_resolves_vm_without_flag 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-f7c9... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo
./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth on the Linux KVM lane at a380b90 (test-kvm, job 125529537804) 0 min ls and the box commands tell the truth OK (both VMs' boxes listed, a stopped VM's included; address and egress match the policy; policy and forward find a box with no --vm; both proxy ports listed and routing after the preferred port freed; the unknown-box, stopped-VM, --public and out-of-range refusals each say what to do)
./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth on the macOS VM lane at a380b90 (e2e, job 125530886412) 0 min ls and the box commands tell the truth OK (both VMs' boxes listed, a stopped VM's included; address and egress match the policy; policy and forward find a box with no --vm; both proxy ports listed and routing after the preferred port freed; the unknown-box, stopped-VM, --public and out-of-range refusals each say what to do)

Verify

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

Deferred

None. The vm case above ran on both VM lanes at a380b90, after the base merge that brought in #2830's MIRROR PORTS: row. The forward leg reached LS_TRUTH_B_OK through min net forward e2e-lt-b with no --vm, and neither lane printed a NOT RUN line for the case.

Closes #2711

Adds the ls_and_box_commands_tell_the_truth case: a stopped VM's boxes
in min ls, the ADDRESS and EGRESS cells against min session policy,
policy and forward without --vm, the unknown-box and stopped-VM
refusals, both proxy ports after the preferred port frees, and the
--public and out-of-range expose refusals.
@coderabbitai

coderabbitai Bot commented Nov 2, 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: 88a6ee9d-f82f-44ae-93ff-51a5b070704e

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

@minimal-foundry

minimal-foundry Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Reading a380b90d5ef8.

This comment updates when the review finishes.

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

The case asserts behaviour that is already in the tree, and each assertion agrees with the design. Addressing line 389 governs the cross-VM names. Lines 21 and 540 govern the stopped VM's box. Section 7.1 line 264 governs the two proxy ports. The four host gates print SKIPPED and return 0, so a whole-lane pass can hide the case. C1 changes them to not_run, as the neighbour case does. The only proof leg is deferred to the vm lane and did not run. C2 asks for its result on this head before merge.

Ruled at 4fdc7be against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread scripts/session-e2e.sh Resolved
Comment thread scripts/session-e2e.sh 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 scripts/session-e2e.sh Resolved
The four gates of ls_and_box_commands_tell_the_truth now call not_run,
so the lane summary names the case. A 'declared rules' EGRESS cell is
now checked against the subnets rule row that min session policy
prints, not only against an egress heading.

@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 fixes what the baseline asked for. The four gates now record NOT RUN, and a declared rules EGRESS cell is checked against the subnets row that min session policy prints. The case pins Addressing line 389, Runtime line 21 and NET §7.1 line 264, and it adds no product code. One item stays open. The vm leg did not run on this executor, and rule 4 says a not_run leg is not a pass. C1 asks for the vm lane run of ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth at this head, with its OK line in the PR.

Ruled at 6b7e392 against gominimal/arch@8640f85e193d by claude-opus-5-5.

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 — approval withheld

Verdict COMMENT — APPROVE withheld: 5 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh:28545, minimal-foundry[bot] scripts/session-e2e.sh:28860, minimal-arch[bot] scripts/session-e2e.sh:28545. No findings.

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

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 6b7e392be0b1.

line exit tail
cargo nextest run -p minimal box_name_resolves_vm_without_flag 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-b4dd... 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

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — scripts/session-e2e.sh: The minvmd-daemon gate and the three gates after it now call not_run "$lc" with their reason, so the lane summary lists the case as NOT RUN.
  • 👍 valid — scripts/session-e2e.sh: A missing MINVMD_GVPROXY_BIN now calls not_run, so the summary names the case and does not count it as a pass.
  • 👎 invalid — scripts/session-e2e.sh:28545: This box has no KVM, so the coder cannot run the case. The plan marks it deferred to the vm lane. The vm lane must run it before merge, and the runner writes the PR body. No code change can satisfy this finding.
  • 👍 valid — scripts/session-e2e.sh:28860: lt_egress_matches_policy now reads the first line under the policy's egress heading. For 'declared rules' that line must be a 'subnets' rule row, the shape format_policy prints and ls_egress_matches_session_policy pins.

The case ls_and_box_commands_tell_the_truth in scripts/session-e2e.sh drives two VMs. It checks that min ls lists every box on every VM, stopped ones included, with its address, egress posture and both hostname-proxy ports. It checks that policy and forward find a box with no --vm, and that the unknown-box, stopped-VM, --public and out-of-range refusals each say what to do. On a lane that cannot run the case, the lane summary now names it as NOT RUN. The case has not run on a vm lane yet.

Notes from the agent: Deferred (lane: vm): ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth. I did not run it, because this box has no KVM. bash -n and shellcheck -S warning are clean on the script. This round: the four skip gates call not_run, and a 'declared rules' EGRESS cell must match a policy egress block that opens with a 'subnets' rule row. The unit test ls_egress_matches_session_policy pins that same shape.

The ls_and_box case read the box's address from the in-box expose reply
with an end-of-line anchor. A reply over the exec channel can end in a
carriage return, which left the address empty.

@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 from 6b7e392 changes only the expose-address parse. It narrows the capture and strips a carriage return. The address still must match min ls and min session policy, so the check stays hard. The case is still not run on a VM lane. A NOT RUN leg is open, so C1 asks for a run at this head before the proof counts.

Ruled at 94795b9 against gominimal/arch@8640f85e193d by claude-opus-5-5.

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 — approval withheld

Verdict COMMENT — APPROVE withheld: 6 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh:28545, minimal-foundry[bot] scripts/session-e2e.sh:28862, minimal-arch[bot] scripts/session-e2e.sh:28545, …. No findings.

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

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a failed check suite, pushed as 94795b927d98.

line exit tail
cargo nextest run -p minimal box_name_resolves_vm_without_flag 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-eb62... 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

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👎 invalid — scripts/session-e2e.sh:28545: This executor has no /dev/kvm, so it cannot run the case. The plan marks the line as deferred to the vm lane. The macOS e2e lane runs the case as part of the whole lane, and that run failed on this head. The job-log excerpt does not show which case failed, so I cannot paste an OK line or name a prod

When the vm lane runs ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth, it checks four things. min ls lists the boxes on both VMs, and the boxes of a stopped VM are marked '(stopped)'. Each box shows its address, its egress posture as min session policy prints it, and every hostname-proxy port. min session policy and min net forward find a box on the second VM without --vm. The unknown-box, stopped-VM, --public and out-of-range refusals say what happened and what to type next. This box has no KVM, so nobody saw this case pass on this head.

Notes from the agent: Deferred (lane: vm): ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth. This box has no /dev/kvm, so I did not run it. The failed e2e check: the directive gives only an excerpt of the job log. The excerpt ends in an earlier expose case and does not show which case failed or why. I cannot read the full log from here (the API returns 403). I read the case against the code that prints each line it checks. The refusal texts, the min ls column layout, the HOSTNAME PROXY row, the stopped-VM cell and the egress words all match the code. I found one fragile check. The address parse anchored at end of line and did not accept a trailing carriage return. I made it accept one. This is not a confirmed cause of the CI failure. ci-macos-success is the aggregator of that e2e job. It failed because e2e failed, and has no fault of its own. A person must read the full e2e job log (run 41381983509, job 125077390558) to find which case failed. If it is this case, the failing leg prints its command, its exit status and the line it checked, and $WORK/ls-truth/minvmd.log holds the VM host daemon log lines.

shellcheck reads $lt_port[[:space:]] as an array index (SC1087).
The braces keep the same match and make the script lint-clean again.

@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 case conforms to the design. It proves Addressing line 389, glossary line 21 and §7.1 line 264 in the e2e layer that the plan names. The new compare only adds braces in a sed expression, and the match stays the same. The vm leg is deferred and has no result on this head. A deferred leg is open and is not a pass. C1 tells you to run it on the vm lane, or to link an issue that owns the run.

Ruled at a08bac1 against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread scripts/session-e2e.sh 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 — approval withheld

Verdict COMMENT — APPROVE withheld: 8 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh:28545, minimal-foundry[bot] scripts/session-e2e.sh:28862, minimal-arch[bot] scripts/session-e2e.sh:28545, …. No findings.

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

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a failed check suite, pushed as a08bac12cd01.

line exit tail
cargo nextest run -p minimal box_name_resolves_vm_without_flag 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-70b2... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👎 invalid — scripts/session-e2e.sh:28545: The finding is true, but this executor cannot act on it: it has no /dev/kvm, so it cannot run the case on the vm lane. The case is wired into the whole-lane order, and the vm lane (CI e2e or a KVM host) must run ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth and attach the OK line. This

On a vm lane, ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth drives two VMs through min alone. It checks that min ls lists every box on both VMs, the stopped VM's boxes included, with the address and EGRESS columns that min session policy shows and every hostname-proxy port. It checks that policy and forward find a box without --vm, and that the unknown-box, stopped-VM, --public and out-of-range refusals say what happened and what to type next. This box has no KVM, so nobody saw that case run at this head. Only the Rust unit tests for box-name VM resolution ran here, and they pass.

Notes from the agent: Revise round 3. The deferred line ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth (lane: vm) did not run: this box has no /dev/kvm. The case is the only proof of the claim, so the vm lane still owes the evidence. The directive's excerpts for the e2e, tests and ci-macos-success failures are truncated. No excerpt names a failed case or a failed test, so I could not find the cause from them. The e2e lines in the excerpt are expose refusals from earlier cases, and they print as expected. The tests job runs Rust tests only, and this branch changes only scripts/session-e2e.sh, so that failure is probably not from this branch. Someone must check it against the full job log. ci-macos-success is the aggregator and fails because e2e failed. One real defect was found and fixed: line 28788 of the new case failed shellcheck with SC1087 ($lt_port[[:space:]] reads as an array index). The base commit was shellcheck-clean, and the script is clean again at every severity. bash -n passes.

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a failed check suite: the coder changed nothing. Revise round 4: no commit. CI 'tests' failure: the job log excerpt shows only passing tests and no failing test name. The diff against main touches only scripts/session-e2e.sh. Rust tests read that script only through common's shell_lint and shell_harnesses, and both pass here. bash -n passes, and the case is in the header list, both dispatch tables and the usage text. I cannot attribute the failure to this branch, so I suspect a flaky test elsewhere. A person must read the full job log at the linked run to confirm. ci-linux-native-success is the lane aggregator and fails only because 'tests' failed. Deferred: ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth (lane: vm). This box has no /dev/kvm, so I did not run it.

Review threads the coder judged:

  • 👎 invalid — scripts/session-e2e.sh:28545: The coder box has no /dev/kvm, so it cannot run this case. The task marks the line as deferred to the vm lane, and the PR body lists that lane as still owing the evidence. A run on the vm lane at this head must supply the OK line. No code change can supply it.
  • 👎 invalid — scripts/session-e2e.sh:28992: The covered spec requires this route: NET-001 says the hostname proxy routes .min.internal to own-address sessions on the VM host. proxy_routes_min_internal_for_own_ip_session_on_vm_host in crates/minimald/src/net/proxy.rs tests it. A known_gap added before any run shows the route fails would

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on a failed check suite: the coder changed nothing. I made no change this round. The directive lists no unresolved threads, only failed checks, and none of the check excerpts shows the line that failed. The four aggregators (ci-success lanes) show only the 'exit 1' that follows a failed job. The tests excerpt shows only PASS lines and is cut at 1162/5012. The test-kvm excerpt shows only the echo text of the workflow steps. The e2e excerpt shows expose lines from proof_expose_from_inside_box, and those lines match the wording this case pins, then it is cut before the failure. This branch changes only scripts/session-e2e.sh. Locally, bash -n passes, scripts/lint-shell.sh passes (shellcheck 0.11.0), and the two common tests that read the scripts pass. So I cannot tie the tests or test-kvm failures to this diff. I also checked each string the case pins against the product code at this head: the unknown-box refusal (cmd/mod.rs no_running_vm_has_box), the stopped-VM refusal (box_on_stopped_vm), 'Forwarding localhost:' (cmd/net.rs)…[truncated]

@norrietaylor

Copy link
Copy Markdown
Member

/revise The failing checks on a08bac1, with the lines that failed:

  1. Both VM lanes (KVM test-kvm job 125092268810, macOS e2e job 125092660892) fail this PR's new cross-VM forward leg:

    the request through the forward did not reach e2e-lt-b on VM lsvm

    The case is right, and the product is wrong. In crates/minimal/src/cmd/net.rs cmd_net_forward:

    • :55 connects client to the selected VM.
    • :61 rebinds only sock to the VM that owns the box (T111).
    • :135 polls list_sessions_version_gated(&mut client) on the selected VM. That VM does not hold the box, so the forward reports the session gone on the first tick and closes.

    Fix it in this PR. When the resolved sock differs from the selected one, reconnect client to the owning VM's socket and version-gate it before the loop. Put that in a small helper. Add cargo nextest run -p minimal forward_polls_owning_vm, a unit test of the helper that asserts the poll targets the owning VM. Covers NET-058 (min net forward on any VM). This adds crates/minimal/src/cmd/net.rs to the task's layers: the e2e proof cannot pass without it.

  2. Linux native tests (job 125090475728): minimald box_manager::tests::reap_hands_name_to_retained_holder failed. This PR changes only scripts/session-e2e.sh, so it is not this change's. Do not edit minimald for it. Name it in the PR body if it fails again.

Keep the leg's assertion unchanged. Run the new unit test and the task's e2e case line.

A forward to a box on another VM polled the selected VM for its
session. That VM does not hold the box, so the forward closed on the
first tick. Reconnect the poll to the owning VM, version-gated.

@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 new commit fixes min net forward for a box on another VM. The session poll now asks the VM that holds the box. Before, it asked the selected VM, so the forward closed on its first tick. Addressing line 389 says a name resolves to the box that holds it, on any host. The new connection is version-gated before the loop, so it fails closed. One condition stays open from the last ruling. C1: run the deferred vm leg ls_and_box_commands_tell_the_truth at this head and record it in ## Tests.

Ruled at c844ce9 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.

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 — approval withheld

Verdict COMMENT — APPROVE withheld: 9 unresolved threads — minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh, minimal-arch[bot] scripts/session-e2e.sh:28545, minimal-foundry[bot] scripts/session-e2e.sh:28862, minimal-arch[bot] scripts/session-e2e.sh:28545, …. No findings.

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

@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 6 of 10 on a /revise note, pushed as c844ce95de8d.

line exit tail
cargo nextest run -p minimal box_name_resolves_vm_without_flag 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2ae0... 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

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.

            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "db59c9f8ddee51ba",
                "span_id": "a601798a24b4ee77",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "db59c9f8ddee51ba",
                "span_id": "389e4facd642b124",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "db59c9f8ddee51ba",
                "span_id": "e1e04f9836710bf4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "db59c9f8ddee51ba",
                "span_id": "b711a10f300f9e72",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "db59c9f8ddee51ba",
                "queued_behind": "0",
                "span_id": "19f0ffaa2e55b507",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "db59c9f8ddee51ba",
                "queued_behind": "0",
                "span_id": "89fef75cab21d6ea",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "89fef75cab21d6ea",
                "span_id": "db41ce5d6206891c",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  41.327s] 846 tests run: 845 passed, 1 failed, 1 skipped
        FAIL [   3.221s] (846/846) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/net.rs
  • crates/minimal/src/tests.rs

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

min ls lists every box on every VM, stopped ones included, with its address, egress posture and every hostname-proxy port. Host-side commands find a box on any VM. min net forward <box> on a box that another VM holds now stays open, because its session poll asks the VM that holds the box. Each refusal says what happened and what to type next.

Notes from the agent: Revise round 6, item 1: in cmd_net_forward, the session poll now runs over a connection from the new helper poll_client_for in crates/minimal/src/cmd/net.rs. When the resolved socket differs from the selected one, the helper connects to the owning VM and calls ensure_version_match before the loop. The new unit test forward_polls_owning_vm is in crates/minimal/src/tests.rs, next to the two-VM harness. tests.rs is outside the original layers. I also added the line cmd/net.rs::poll_client_for = gated to the every_daemon_connection_is_classified inventory in tests.rs, because the helper opens a new Client::connect and that test classifies each one. That test passes. The e2e leg's assertion is unchanged. Item 2: I did not touch minimald. If reap_hands_name_to_retained_holder fails again, the PR body must name it. Deferred: ./scripts/session-e2e.sh ls_and_box_commands_tell_the_truth (lane: vm). This box cannot run it, so I did not run it.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 2, 2026 17:36

@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 of c844ce9 against T114. The new poll_client_for reconnects to the VM that holds the box and version-gates that connection before the forward's loop. A box on the selected VM keeps its connection. forward_polls_owning_vm pins both cases. Both VM lanes now pass the cross-VM forward leg, and the session-e2e legs match the plan block. The only red check is cargo-deny, which fails on RUSTSEC-2026-0433 across the repo (fix in #2846), not on this change.

@norrietaylor
norrietaylor marked this pull request as ready for review November 2, 2026 18:19

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

The forward fix conforms to architecture.md line 389. min net forward now polls the VM that holds the box, and that connection is version-gated. The e2e case checks every leg hard. The lane runs in the PR body are at c844ce95, not at this head. The merge brings in #2830, which adds a MIRROR PORTS: row to the min ls output that the case parses. C1 runs the case again at a380b90d on both VM lanes and records the result in the PR body.

Ruled at a380b90 against gominimal/arch@7a86ec7bb3c0 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 re-approval at a380b90: a base merge onto c844ce9 (#2830 and #2846). The vm case passes on both VM lanes at this head, and the body names those runs.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 5b82df0 Nov 2, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2711-min-ls-and-the-box-commands-tell-the-truth-end-t branch November 2, 2026 23:59
norrietaylor added a commit that referenced this pull request Nov 3, 2026
* fix(deps): bump pulldown-cmark to 0.13.6 for RUSTSEC-2026-0433 (#2846)

Claude-Session: https://claude.ai/code/session_01NSAwDroXL6KqsSxUzdbZGw

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(minimald): hand a reaped name over in one manager step (#2842)

A reap read the records and then sent the handover as a second message.
A removal that began between the two left the name with no row while
another retained box still had it. The manager now releases the reaped
box's row, picks the successor among boxes not being removed, and
registers it in one message. The reap and the prune return after both.

The daemon log names the release (name-released) before the handover
(name-handed-over), both with box ids.

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>

* T126 — A host-address box's port that collides on the host is shown at session start and in `min ls` (#2830)

* feat(minvmd): answer a node's collided mirror ports over control

The host control socket answers a read-only mirror_collisions verb
with the node's mirrored ports that collided with a holder on the
host. The node mirror keeps the time each port first collided.

* feat(minimal): show collided mirror ports in min ls and activate

min ls prints a MIRROR PORTS row per VM whose host_ip box ports are
held by another program on the host, and --json carries
mirror_collisions per VM. min session activate of a host_ip box on a
VM host prints the same sentence per port when it does not attach.

* fix(minimal): show an unread VM's mirror ports as null in min ls

Read each VM's collided mirror ports concurrently, and keep a failed
read apart from an empty one: --json writes null for a VM with no
answer and [] only for an answered empty read.

* fix(minimal): name a VM host whose mirror ports were not read

min ls printed nothing for a running VM host that gave no answer, so
it looked the same as one with no collisions. It now prints one
MIRROR PORTS row that says the VM did not report its ports.

* fix(minimal): skip the mirror-port read on a native host

A native host has no VM host daemon. The fallback listing's control
socket there is minimald's, which does not serve the collided-port
read, so min ls printed a false MIRROR PORTS row on every native host.

* fix(minimal): name an unread VM host at activate, enter the span

min session activate now prints the unread sentence that min ls prints
when the VM host daemon gives no answer. The ListSessions span wraps the
collided-port reads, and a native host's --json carries no
mirror_collisions field.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>

* T42 — Start every box's entrypoint from its spec through one launcher (#2841)

* feat(mfile): carry entrypoint and lifetime in the box spec

The spec gains an [execution] table with the box's lifetime and, for a
box that does not run its login shell, its entrypoint argv. A v0 spec
stored before the table existed reads with the entrypoint its type
implies.

* feat(minimald): start each box's entrypoint from its spec

One launcher decision, LaunchSpec::entrypoint, reads the first process
from the box's stored spec: the login shell, or the spec's argv. The
actor reads the stored spec once, keeps its hold, and hands it to every
launcher. A launch minted for an exec keeps the shell, because the exec
runs the box's command. Each launch logs its entrypoint in a
box.launch span.

* fix(minimald): keep the shell on every launch of an exec-run box

A task's run arrives over the exec channel. A hook launch or an attach
can come before or after that exec, and a hook launch's gated first
process starts at the next attach. Only the exec-minted launch held
the shell, so a task box could run its task twice, and an attach got
the task, not a shell. Every launch now says an exec carries the run,
and the launcher starts the shell for it.

* refactor(mfile): write box.lifetime and execution.exec in the spec

Rename Lifetime::Persistent to UntilStopped, move the lifetime to
[box] with a until_complete default for v0 specs, and serialize the
entrypoint as execution.exec. List the argv shape as a v0 exception.

* fix(minimald): refuse a launch whose stored spec cannot be read

held_spec returns an error for unreadable spec bytes or a failed store
read, and launch_host refuses with SpawnFailed instead of starting the
shell. Mark run_by_exec as an interim that T43 (#2405) removes.

* test(minimald): store a readable spec in the stopped-box record test

A launch now refuses a stored spec it cannot read, so the test's
placeholder bytes failed its ensure_host. Store a session spec instead.

* docs(mfile): say that no launch reads the spec's lifetime yet

A box ends when its entrypoint returns, whatever box.lifetime says.

* fix(minimald): keep entrypoint arguments out of the launch log

The box.launch span and its info event printed every argument of an
argv entrypoint. An argument can carry a secret, so they now name the
program (or the login shell) and the argument count only. A test pins
that a secret-looking argument does not reach the log.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
Co-authored-by: Karl Godard <karl@minimal.dev>

* T30 — Run a command in a box with a terminal or detached, under an exec id (#2843)

* feat(minimald-rpc): carry exec mode, timeout and exec id on the wire

min://exec carries an argv with its mode (attached, tty or detached) and
an optional timeout. min://exec/attach, min://exec/output and
min://exec/wait name an exec by its UUIDv7 id. The box store places
each exec's transcript beside the record and appends events by path.

* feat(minimald): run box execs under an id, with a terminal or detached

Every command for a box gets a UUIDv7 exec id, and a box that is not
running refuses it with exit 2 naming its state. min://exec runs an
argv with no shell: attached, on a daemon terminal, or detached with
stdin closed. Tty and detached execs answer with their id at once,
capture their output beside the box record, and keep their exit for
min://exec/wait. An exec's own timeout stops it and records an
exec_exited event with reason timeout, and the box keeps running.

* style(minimald-rpc): format the exec id parse and its tests

* fix(minimald): bound the wait after an exec timeout; drop reaped execs

A command that survives the stop at its timeout no longer holds its
wait open: the wait after the stop is bounded, then SIGKILLed and
recorded as a timeout. Ended execs of a reaped box leave the exec map.

* fix(minimald): exit 124 on exec timeout; wait reads stored exit

An exec that its own timeout ends now exits 124, attached or detached.
A wait on an exec that this daemon holds no entry for reads the box's
stored exec_exited event, so a detached exec's exit code outlives a
daemon restart.

* fix(minimald): cap exec transcripts at 8 MiB and stream reads

A detached exec now writes through a pipe and a pump, as a tty exec
does, so the daemon can cap its transcript. Past the cap the transcript
keeps a mark and the newest half of the cap, and the command keeps
running. The output read and the attach replay copy the transcript in
64 KiB chunks, up to its length at the open, and the attach takes the
terminal lock only to open the file and subscribe.

* fix(minimald): bound tty exec input; no deadline past the clock

A tty exec's terminal input went through an unbounded channel, so a
program that never reads stdin let the daemon queue grow without
limit. The terminal now holds typed input in a HeldInput with the
attached path's bounds (EXEC_INPUT_HELD_MAX per exec,
EXEC_INPUT_HELD_DAEMON_MAX for the daemon). Past either bound the
chunk is dropped and the log says so once per exec. The exec's end
releases what it held.

An attached exec's timeout too large for the clock panicked after the
spawn. timeout_deadline now uses checked_add and gives no deadline.

Tests: unread tty input stays within the cap, a timeout of u64::MAX
seconds runs the exec to its end, and an exec id from one box finds no
exec, output or exit in another.

* fix(minimald): wait on exec terminals in the runtime, not a thread

The tty feed wrote to the terminal from a blocking thread. When the
program never read its input, that write never returned, and each such
exec left a blocking thread behind for good. The terminal and the
detached pipe are now non-blocking and watched through AsyncFd, so the
supervisor can stop the pump and the feed at the exec's end. Both stop
on a closed state too, because tokio never clears it and a wait for it
returns at once.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
Co-authored-by: Karl Godard <karl@minimal.dev>

* fix(minimald): hand a destroyed box's name to the next holder (#2849)

A destroy removed the box that held a name's row and left the name
with no row, while another retained box still had that name. The
destroy now runs the same handover as a reap: the row goes to the
running box with the name, else to the most recent creation. The
destroy answers after the handover.

The daemon log names the destroyed box and the successor, and the
destroy span records the successor id or "none".

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>

* T114 — `min ls` and the box commands tell the truth, end to end (#2839)

* test(e2e): prove min ls and the box commands across two VMs

Adds the ls_and_box_commands_tell_the_truth case: a stopped VM's boxes
in min ls, the ADDRESS and EGRESS cells against min session policy,
policy and forward without --vm, the unknown-box and stopped-VM
refusals, both proxy ports after the preferred port frees, and the
--public and out-of-range expose refusals.

* test(e2e): record ls_and_box gates as NOT RUN, check declared rules

The four gates of ls_and_box_commands_tell_the_truth now call not_run,
so the lane summary names the case. A 'declared rules' EGRESS cell is
now checked against the subnets rule row that min session policy
prints, not only against an egress heading.

* test(e2e): read the expose address past a trailing carriage return

The ls_and_box case read the box's address from the in-box expose reply
with an end-of-line anchor. A reply over the exec channel can end in a
carriage return, which left the address empty.

* test(e2e): brace lt_port before a bracket class in the expose read

shellcheck reads $lt_port[[:space:]] as an array index (SC1087).
The braces keep the same match and make the script lint-clean again.

* fix(minimal): poll the owning VM in min net forward

A forward to a box on another VM polled the selected VM for its
session. That VM does not hold the box, so the forward closed on the
first tick. Reconnect the poll to the owning VM, version-gated.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
Co-authored-by: Norrie Taylor <91171431+norrietaylor@users.noreply.github.com>

* docs(spec): specify dns steering and the host_ip lane for spec 24 (#2851)

* docs(spec): specify dns steering and the host_ip lane for spec 24

Add BEP-080 to BEP-087 so the default `dns` steering works for own_ip
and host_ip boxes on a VM host, as architecture D6 and networking §5.4
require.

- BEP-080, BEP-081: direct TLS to the proxy on port 443, routed by
  SNI, and admitting dns and both on a VM host (#2805).
- BEP-082 to BEP-087: the host_ip lane: a host-side box id, the cohort
  proxy lane, cohort-attributed delivery with the named box's egress
  and audit subject, the in-effect rule, per-box steering, and the
  live proof.
- BEP-015 gains a host_ip proxy_env case.
- Security considerations states the cohort lane and per-box steering.

* docs(spec): keep the first slice paragraph unchanged and move the host_ip e2e checks to BEP-087

* docs(spec): address review on the host_ip lane requirements

- BEP-083: the cohort lane also admits TCP 443 at the proxy's address,
  the direct TLS path dns steering uses.
- BEP-084: refuse and audit a cohort-attributed value that names no
  live host_ip box of this host.
- BEP-086: cite NET-003's VM-backed resolver requirement, not NET-079.
- BEP-087: the proxy_env case is its own sub-requirement.
- Security considerations: BEP-083 and BEP-084 join the redemption
  invariant, and BEP-084 the egress invariant.

* T10 — Log a box's output from its start, out of the box's reach (#2852)

* feat(boxes): name a box's output log beside its record

Adds LOG_FILE and BoxDir, the box's directory as code outside the store
sees it: the log path, a lookup by id through the index, a log read by
offset, and an event append for a writer that holds no DiskBox.

* feat(minimald-rpc): add a streamed read of a box's output log

* feat(minimald): log a box's output from its start

The host appends every read from the box's terminal to its output log
before it hands the bytes to an attached client, so the client is a
second reader. A binding whose client closes its channel, drops its
connection or is shed records a detached event, and the box runs on.

* feat(minimald): serve a box's output log by its id

ReadLog streams the log from a byte offset, and with follow sends new
output until the box is reaped. A test shows that files written into
the box's own directories reach neither the log nor the record.

* fix(minimald): read a box's log on the blocking pool

The followed log read polled the store with blocking std::fs calls on an
async task. The find, the chunk reads and the retained check now run
through spawn_blocking, so a slow disk does not hold a runtime worker.

* fix(boxes): cap a box's output log and read it across a drop

The log keeps a drop mark and the newest half past 8 MiB. A reader
keeps its file open and moves to the replaced file with no byte sent
twice. The read refuses a link or a file that is not regular.

* fix(minimald): start no store box without its output log

BoxOutputLog::open returns the open's error for a box in the store, and
Host::build stops before the launch. The log writes through the capped
store writer, and ReadLog keeps one reader for the whole stream.

* fix(minimald): run detach hooks when a PTY client is lost

A lost client already records a detached event. Its on_detach hooks now
run too, so the event and the hooks agree. A test drives a box past the
log cap.

* style: format the log cap tests

* docs(boxes): mark the 8 MiB log cap as not yet in the design

The cap drops the start of a box's output past 8 MiB. That departs from
architecture.md line 473. gominimal/arch#159 decides the bound.

* docs(specs): record the interim 8 MiB box log cap in BOX

The decision that logs a box's output from its start now states the
8 MiB cap, what the log keeps past it, and the arch#159 decision that
removes the cap or changes BOX-155.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>

* T9 — End a box when its entrypoint returns, never for idleness or client loss (#2850)

* feat(minimald): end an until_complete box when its entrypoint returns

The host loop now says whether a kill ended it. The actor watches each
launch's loop and, when the entrypoint returned on its own and the spec
sets lifetime = "until_complete", sets the record to exited with the
exit code and records an exited event with reason "exit". The daemon
does this whether or not a client is attached. Such a box raises no
shell-exit prompt (BOX-038). A client that goes away never stops a box
(BOX-015).

* test(minimald): pin box ends on entrypoint return, not client loss

Adds the actor tests for BOX-038 and BOX-015. The shell round trip now
expects no prompt and an exited record. Tests about a box kept after its
shell exits now create an until_stopped box. The rpc shutdown test no
longer answers a prompt.

* fix(minimald): retry the exited-record write when an entrypoint ends

The host and the watch are gone by the time the write runs, so a
single failed write left the box running with nothing in it. Retry it
with a short backoff, and pin the retry with a test seam.

* test(e2e): expect an exited box, not a prompt, when a shell exits

The session-exit prompt is gone: exiting the shell ends the box, which
stays listed as exited. The pty driver no longer answers a prompt. Each
leg that exited a shell now checks the box is exited with code 0, and
destroys it where it used to answer Delete.

* docs(minimald): put the launch-record seam doc back on its module

* test(e2e): resume the exited kept box before the exec into it

An exec runs only in a running box. After the shell exits and the row is
withdrawn, the leg now resumes the box with a pty 'min session attach',
checks that it runs under the same id and that its row is back, and then
runs the exec as before.

* test(minimald): fail when the channel stays open after shell exit

The wait loop ended on a timeout as well as on close, so the test
passed even if the channel never closed. Panic on the timeout.

* fix(minimald): end an exited box before a queued attach or exec

A message queued beside a returned entrypoint ran first and launched
a new host, so the entrypoint ran again and its exit was lost. Now
only a stop or a destroy goes ahead of the exit, and ensure_host
refuses a stopped or exited box.

---------

Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>

* build(deps): bump sysinfo to 0.40

sysinfo 0.40 makes System construction fallible (System::new returns
Result<System, sysinfo::Error>). The three callers keep their 0.39
behaviour on an unsupported platform: minvmd's metrics sample and
minimald's resource-pool probe return None, and minvmd's host capacity
probe reports zero memory.

Unblocks the dependabot cargo group (#2844), which bumped sysinfo
without migrating the callers.

---------

Co-authored-by: Karl Godard <karl@minimal.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T114 — min ls and the box commands tell the truth, end to end

1 participant