8000 T3 — Boxes listed, shown, stopped and removed, end to end by minimal-foundry[bot] · Pull Request #2991 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T3 — Boxes listed, shown, stopped and removed, end to end - #2991

Merged
agent-137 merged 3 commits into
mainfrom
agent/2894-boxes-listed-shown-stopped-and-removed-end-to-en
Nov 4, 2026
Merged

agent-137 merged 3 commits into
mainfrom
agent/2894-boxes-listed-shown-stopped-and-removed-end-to-en

Conversation

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

T3 — Boxes listed, shown, stopped and removed, end to end

slice: S0
kind: integration
covers: none
size: S
est: 20 code, 100 tests
executor: agent
difficulty: routine
model: light
diagnostics: when the end-to-end test fails, it prints each command it ran with that command's stdout, stderr and exit code
observability: one span per verb in the test run covers list, show, stop and remove of the same box
layers:
- tests:
- crates/minimal/src/tests.rs: the slice's end-to-end test over a test daemon
test: cargo nextest run -p minimal box_first_slice_list_show_stop_rm_end_to_end
produces: none
consumes: none
proof: min box list|show|stop|rm over the existing daemon, before any alias work. It renders id, name, type, state, provider and host (BCLI-001, BCLI-003, BCLI-004, BCLI-051, BCLI-059, BCLI-060).
depends on:
- blocked by #2889
- blocked by #2890

Proof

A person can run the test box_first_slice_list_show_stop_rm_end_to_end and see one box go through min box list --all, min box show web, a refused min box rm web (exit 2, names --force), min box stop web, min box show web (State: stopped) and min box rm web over a harness daemon on the native host socket. The listing and the show print the id, name, type, state, provider (local) and host of the box, and the last listing prints that the machine has no boxes.

Notes from the agent: The test drives the same library paths the min box commands use (local_hosts, connect_daemon, list_box_records, find_listed_box, ShowBox, stop_listed_box, rm_listed_box, render_box_list, render_box_show). It does not spawn the min binary, because the test lives in the lib unit tests where CARGO_BIN_EXE_min is not set. The exit code in the transcript mirrors main.rs failure_exit_code for the two cases this flow reaches (2 for BoxRunningRefusal, 1 otherwise), because failure_exit_code is private to the binary. The rm step writes the Removed web. line itself, as cmd_box_rm does after its best-effort VM host cleanup, which does not apply to a native host. Observability: each step runs in a box_verb{verb, box_id} span, and the test asserts from the captured log that list, show, stop and rm each have a span with the same box id. cargo clippy -p minimal --all-targets is clean. I did not run just ci or the wider suite.

Tests

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

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "01d146a114280b6f",
                "span_id": "18b4dd4d452ea8cf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "01d146a114280b6f",
                "span_id": "d2f6b1b975149490",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "01d146a114280b6f",
                "span_id": "fd3fb347a85c6bd6",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "01d146a114280b6f",
                "queued_behind": "0",
                "span_id": "79cb020d10109b3f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "01d146a114280b6f",
                "queued_behind": "0",
                "span_id": "4f8636d360bb5d57",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "4f8636d360bb5d57",
                "span_id": "d1e248d37ed4cfec",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "4f8636d360bb5d57",
                "queued_behind": "0",
                "span_id": "43a42aa29bf88d59",
                "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 [  56.514s] 862 tests run: 861 passed, 1 failed, 1 skipped
        FAIL [   4.194s] (862/862) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Closes #2894

Correction (maintainer, 2026-11-04): the Notes predate 652fe11. The rm step no longer writes Removed web. itself. cmd_box_rm writes that line, and #2993 tracks testing it.

Residuals

One test runs list, show, stop and rm of the same box over a harness
daemon on the native host's socket. It checks the id, name, type,
state, provider and host columns, the refusal of rm on a running box,
and the removal after the stop. A failed step prints every command it
ran with its stdout, stderr and exit code. Each verb runs in its own
box_verb span with the box id.
@coderabbitai
coderabbitai Bot commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

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

Run configuration
  • 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: 4ecc5875-8d69-45f5-aa21-79c15e76f3ad

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 4, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: 1 finding, none blocking at dbe84265e6b5.

Address the comments on the diff.

Clobber: none seen.

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

This PR adds one end-to-end test for min box list, show, stop and rm, and changes no product code. Each step asserts a line of architecture.md: provider and host attribution (line 53), the --force refusal with exit 2 (lines 350 and 363), the kept record after stop (lines 458 and 499), and the deleted record after rm (line 458). The test calls the library paths that the commands use, and it relaxes no gate. The test writes the Removed web. line itself, so that assertion proves nothing. The empty listing after the remove is the proof.

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

@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 — 3 findings, 3 inline.

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

Comment thread crates/minimal/src/tests.rs Resolved
Comment thread crates/minimal/src/tests.rs Resolved
Comment thread crates/minimal/src/tests.rs Resolved
The end-to-end test now checks the TYPE cell of the listing and the
Type line of show. It no longer writes the Removed line itself: rm
of the stopped box asserts the empty stdout that rm_listed_box gives.
The span check counts one box_verb span for each run of a verb.
@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 · the full ruling

The compare makes the end-to-end proof stricter, and the earlier PASS on a40b9310 stands. The test now checks the box type in min box list and min box show. Line 475 of the design lists that field. The test no longer writes the Removed web. line itself. It asserts the empty stdout of rm_listed_box, so the proof checks only real output. The span check now counts one box_verb span for each run of a verb. The answerer.rs hunks come from the clean merge of #2985 and are not part of this PR.

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

@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/minimal/src/tests.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

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

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "7825943d948b35eb",
                "span_id": "e2028e0461603037",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "7825943d948b35eb",
                "span_id": "4f654b4ff84ca054",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "7825943d948b35eb",
                "span_id": "75fdc6e3b6238ca7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "7825943d948b35eb",
                "queued_behind": "0",
                "span_id": "edabc682d194d342",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "7825943d948b35eb",
                "queued_behind": "0",
                "span_id": "2c0628279195705d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "2c0628279195705d",
                "span_id": "7f4ed7b9a7de5faa",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "2c0628279195705d",
                "queued_behind": "0",
                "span_id": "95b4ce7ddcebc620",
                "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 [  48.857s] 862 tests run: 861 passed, 1 failed, 1 skipped
        FAIL [   3.409s] (862/862) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6zeyEO: The rm step no longer writes Removed web. itself. It now asserts the empty stdout that rm_listed_box gives, and a comment says that the printed line comes from cmd_box_rm and is not checked here. A test of that line needs cmd_box_rm to take a writer, and lifecycle.rs is outside this task's layers. (not posted on the 8000 thread: not an open thread on the pull request)
  • 👍 valid — PRRT_kwDOPdfcxM6zeyER: The span check now counts the min box <verb> ran lines in the span for each verb, and asserts that the count is the same as the number of runs of that verb. The box id in the span filter keeps the spans of other tests out of the shared log. (not posted on the thread: not an open thread on the pull request)
  • 👍 valid — PRRT_kwDOPdfcxM6zeyEU: The row now asserts that the cell under the TYPE header is boxes::SESSION_BOX_TYPE. The show step also checks for a Type: session line. (not posted on the thread: not an open thread on the pull request)

The test box_first_slice_list_show_stop_rm_end_to_end runs min box list, show, stop and rm of one box over a test daemon on the native socket. It checks that the listing renders the id, name, type (session), state, provider and host of the box. It checks that show prints the same facts, that rm of a running box is refused with exit 2, and that stop and then rm remove the box.

Notes from the agent: Revise round 1. The test does not check the Removed web. line. cmd_box_rm writes that line straight to the process stdout after its cleanup, and lifecycle.rs is outside this task's layers. A test of that line needs cmd_box_rm to take a writer, as stop_listed_box does. That change belongs in a later task.

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

Reviewed at dbe84265. box_first_slice_list_show_stop_rm_end_to_end drives the first slice over a harness daemon: list → show → refused rm (exit 2, names --force) → stop (Stopped web., then State: stopped) → rm → "No boxes on this machine."

  • Assertions: they're exact, and the state really transitions.
  • Columns: every column is checked, TYPE by header index.
  • Spans: one span per verb run.
  • Diff: in its one layer file, with no out-of-layer edits.
  • Residual #2993: list and show are re-implemented in the test rather than driven, Removed <box>. is untested, and the test uses its own exit-code mapping.
  • Merge order: T4 (#2987) removes BoxLookup and changes the stop_listed_box/rm_listed_box signatures this test calls. Merge this first, then T4 updates the test.

@agent-137 agent-137 left a comment
Copy link
Copy Markdown
Member
8BD0

Choose a reason for hiding this comment

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

Reviewed at dbe8426 against #2894's plan. Tests-only (crates/minimal/src/tests.rs): box_first_slice_list_show_stop_rm_end_to_end pins all six list columns and the show lines, rm of a running box refusing with exit 2 naming --force, stop keeping the record, rm emptying the list, and one box_verb span per run filtered by box id. The bot-resolved threads (self-written Removed line, any() span check, unchecked TYPE cell) are fixed on this head. The open exit-code-mapping thread is deferred to #2993, which names it; the partial mapping can only misreport a failure transcript's code, never pass a failing step.

@agent-137
agent-137 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit bb7cf6d Nov 4, 2026
36 checks passed
@agent-137
agent-137 deleted the agent/2894-boxes-listed-shown-stopped-and-removed-end-to-en branch November 4, 2026 16:24
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.

T3 — Boxes listed, shown, stopped and removed, end to end

2 participants

0