8000 T22 — Rename and prune boxes by minimal-foundry[bot] · Pull Request #3008 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T22 — Rename and prune boxes - #3008

Merged
agent-137 merged 9 commits into
mainfrom
agent/2907-rename-and-prune-boxes
Nov 5, 2026
Merged

agent-137 merged 9 commits into
mainfrom
agent/2907-rename-and-prune-boxes

Conversation

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

T22 — Rename and prune boxes

slice: S6
kind: task
covers: BCLI-058, BCLI-061, BCLI-005
size: M
est: 200 code, 180 tests
executor: agent
difficulty: routine
model: standard
diagnostics: off a terminal, min box prune prints "Prune removes boxes. Pass --yes to confirm, or --dry-run to see what it would remove." and exits 2, pinned by prune_off_tty_needs_yes
observability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cli.rs: the verb's arguments and help in the one command model
- crates/minimal/src/cmd/boxes/lifecycle.rs: min box rename and min box prune [--older-than] [--parent] [--yes]
- crates/minimal/src/main.rs: failure_exit_code maps this verb's refusals to their exit codes
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal box_rename_renames_as_box_010
test: cargo nextest run -p minimal box_prune_flags_map_to_box_021_selectors
test: cargo nextest run -p minimal prune_off_tty_needs_yes
produces: none
consumes:
- crates/minimal/src/cmd/boxes/address.rs
proof: min box rename renames a box, and min box prune removes old boxes after --yes.
depends on:
- blocked by #2895

Proof

A person can run min box rename <box> <name>. It prints Renamed <box> to <name>., and a name that a running box holds is refused with exit 2 and names the holder. min box prune --yes removes every stopped or exited box, prints one Removed <name> (<id>). line for each box, and never removes a running box. --older-than <d> and --parent <box> narrow the prune. Off a terminal without --yes, it exits 2 with the pinned message.

Notes from the agent: Files outside the layers: crates/minimal/src/cmd/mod.rs gets the verb names and the dispatch arms for the two new BoxCommand variants, because the matches are exhaustive. crates/minimal/src/cmd/boxes.rs re-exports BoxRenameRefusal and PruneNeedsYes so that main.rs can map them to exit 2. The tests are in the lifecycle.rs test module beside the stop and rm tests, because the harness helpers are there. tests.rs only gets the entry for the new gated daemon connection in cmd_box_prune, which every_daemon_connection_is_classified requires. One full cargo nextest run -p minimal passed: 880 tests. Printed-text issues: (1) The task fixes the BCLI-005 message, so I copied it. It names --dry-run, but min box prune has no --dry-run flag yet, because BCLI-006 waits on #2834. Today the message tells the person to use a flag that clap rejects. (2) The rename refusal text comes from boxes::box_name::RenameRefusal, outside this task's layers. It says The running session and suggests min session rename, not min box rename. The client detects that text by its lead, and the test pins the detection against the daemon's real reply. Behaviour notes: without --parent, the prune runs on every local host that is running. With --parent, it runs only on the host that keeps the parent box. On a terminal without --yes, the prune asks one [y/N] question before it connects. --no-input works the same as no terminal. The tracing records verb, box_id and outcome for rename, and verb, reaped, failed and …[truncated]

Tests

line exit tail
cargo nextest run -p minimal box_rename_renames_as_box_010 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-70fd... 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 minimal box_prune_flags_map_to_box_021_selectors 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-ce50... 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 prune_off_tty_needs_yes 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-76cd... 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.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "7b277340933401d0",
                "span_id": "21eb1be864b23cf7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "7b277340933401d0",
                "span_id": "80d4ff676f49c3b6",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "7b277340933401d0",
                "span_id": "495ce3af0bc5d260",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "7b277340933401d0",
                "queued_behind": "0",
                "span_id": "34e1976890a91488",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "7b277340933401d0",
                "queued_behind": "0",
                "span_id": "769a201c4a184104",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "769a201c4a184104",
                "span_id": "121de93ce3e10d00",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "769a201c4a184104",
                "queued_behind": "0",
                "span_id": "3cfb129e5ea80221",
                "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 [  49.194s] 880 tests run: 879 passed, 1 failed, 1 skipped
        FAIL [   3.160s] (880/880) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Out of scope

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

  • crates/minimal/src/cmd/boxes.rs
  • crates/minimal/src/cmd/mod.rs

Closes #2907


Undrafted by the operator (agent-137) at 96e10b1: the out-of-layer edits are wiring only. cmd/boxes.rs re-exports BoxRenameRefusal and PruneNeedsYes for failure_exit_code, and cmd/mod.rs adds the box rename/prune arms to the exhaustive command_verb and run_command matches.

min box rename renames a box as BOX-010 defines and ends with exit 2 on
the daemon's refusal, which names the holder. min box prune reaps the
stopped and exited boxes through PruneBoxes, narrowed by --older-than
and --parent. Off a terminal it needs --yes and ends with exit 2.
@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: 90cfe825-c8ac-4535-98ab-0a7a05d192f1

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

@agent-137 agent-137 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 8000 .

Reviewed at 96e10b1 against #2907 (BCLI-058, BCLI-061, BCLI-005). min box rename resolves through resolve_box_on_hosts, prints 'Renamed to .', and maps the daemon's refusals to exit 2. min box prune gates on --yes off a TTY or under --no-input (exit 2), asks [y/N] on a TTY, then calls PruneBoxes with --older-than/--parent and prints one line per removed box. The three plan tests exist and are deterministic. Two problems predate this task and are raised separately: rename of a running host_ip box on a VM host retires its egress (copied from min session rename), and the prune refusal names --dry-run, which BCLI-006 has not added yet (the text is the plan's).

@agent-137
Copy link
Copy Markdown
Member

/review

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

Approved: no findings at 84a9a6c3fb28.

Nothing to do.

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 — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, 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 · the full ruling

The change conforms to the design. min box rename and min box prune live under min box, as principle 8 (line 338) requires. A held-name rename and a prune off a te 8000 rminal without --yes both exit 2 (lines 333 and 363). The daemon does the reap, and it removes only stopped or exited boxes (line 501). The --dry-run flag from line 485 is not in this change. Spec 28 files it under #2834 as the residual. The summary notes one gap in the box_id span field for --parent, which the design does not govern.

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

The terminal question said every stopped or exited box, even when
--older-than limits the prune to older boxes.
@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 since the PASS on 96e10b15 changes only the question that min box prune asks on a terminal. The question now names the --older-than age as the time since the box stopped or exited. That matches architecture.md line 501. The off-terminal refusal is unchanged and still follows design principle 3. The earlier PASS stands for the rest of the change.

Ruled at 13ef8b9 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).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p minimal box_rename_renames_as_box_010 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-dec5... 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
cargo nextest run -p minimal box_prune_flags_map_to_box_021_selectors 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-0e25... 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 prune_off_tty_needs_yes 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ed7d... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) 8BD0 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.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "99a2f8410f678cae",
                "span_id": "d3a71529aada3063",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "99a2f8410f678cae",
                "span_id": "51a7ab250f3bb549",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "99a2f8410f678cae",
                "span_id": "6d85796cd5b48a26",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "99a2f8410f678cae",
                "queued_behind": "0",
                "span_id": "c8e534860289799f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "99a2f8410f678cae",
                "queued_behind": "0",
                "span_id": "e7bb4038536efcc4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "e7bb4038536efcc4",
                "span_id": "edc66aca12a0fffc",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "e7bb4038536efcc4",
                "queued_behind": "0",
                "span_id": "6810972e4ecad43b",
                "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 [  47.575s] 880 tests run: 879 passed, 1 failed, 1 skipped
        FAIL [   3.029s] (880/880) 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/boxes.rs
  • crates/minimal/src/cmd/mod.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/lifecycle.rs: The prune question now names the age, for example "Remove every box that stopped or exited at least 7d ago?". A new prune_question function builds it, and box_prune_flags_map_to_box_021_selectors pins it.

min box rename renames a box, and min box prune removes old boxes after --yes. On a terminal, the prune question now names the --older-than age and the --parent box that limit it.

Notes from the agent: Revise round 1. A new pure function prune_question builds the terminal question. box_prune_flags_map_to_box_021_selectors pins its four wordings. cargo clippy -p minimal --all-targets is clean.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 4, 2026 21:37
@agent-137
Copy link
Copy Markdown
Member

/revise Fix thread PRRT_kwDOPdfcxM6zz-tU (MEDIUM) at head 13ef8b9.

cmd_box_prune (crates/minimal/src/cmd/boxes/lifecycle.rs ~1010) stops at the first host error. It uses ? on gated_box_host_client, ensure_version_match, the unreachable probe and prune_host. Hosts already pruned have printed their Removed lines. The remaining hosts are never pruned. The summary and the pruned tracing record are skipped.

Collect each host's error and go on to the next host. At the end:

  • print one line per failed host, naming the host and the reason;
  • count those hosts as failures in the summary;
  • exit non-zero if any host failed.

Fix the summary's plural while you are there: "of 1 boxes" must read "of 1 box". Add a test with two hosts where one fails: the other host is still pruned, and the command exits non-zero naming the failed host.

Change nothing else.

cmd_box_prune stopped at the first host error, so later hosts were never
pruned and the summary was skipped. Collect each host's error, name each
failed host on stderr, count it in the summary and exit non-zero. The box
count now says "1 box" for one.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as acfcef13cbe3.

line exit tail
cargo nextest run -p minimal box_rename_renames_as_box_010 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-dd7e... 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
cargo nextest run -p minimal box_prune_flags_map_to_box_021_selectors 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-2350... 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 prune_off_tty_needs_yes 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-42ed... 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.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "c8dbf57f9ecba53f",
                "span_id": "4d1a1a5a8cda0c90",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "c8dbf57f9ecba53f",
                "span_id": "aef1f074f5bde9a4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "c8dbf57f9ecba53f",
                "span_id": "c0623c6652bfeeae",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "c8dbf57f9ecba53f",
                "queued_behind": "0",
                "span_id": "8e23d969c617f7c8",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "c8dbf57f9ecba53f",
                "queued_behind": "0",
                "span_id": "25b133431f7faa0f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "25b133431f7faa0f",
                "span_id": "9070abcf95ff5e7b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "25b133431f7faa0f",
                "queued_behind": "0",
                "span_id": "94dc795b491ad497",
                "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 [  44.725s] 884 tests run: 883 passed, 1 failed, 1 skipped
        FAIL [   3.060s] (884/884) 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/boxes.rs
  • crates/minimal/src/cmd/mod.rs

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

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/lifecycle.rs:1051: prune_hosts now records each host's error and goes on to the next host. min box prune names each failed host on stderr, counts it in the summary and exits non-zero. box_prune_goes_on_past_a_failed_host pins this.

min box rename renames a box, and min box prune removes old boxes after --yes. When one host fails, min box prune still prunes the other hosts. It prints "Could not prune host : " for each failed host, counts the failed hosts in the summary ("Prune failed on 1 of 2 hosts.") and exits non-zero.

Notes from the agent: The host loop moved from cmd_box_prune into a new prune_hosts function, and the summary moved into finish_prune, so the new two-host test can drive them. The daemon-connection inventory in crates/minimal/src/tests.rs names the function that probes. Its entry for cmd_box_prune now names prune_hosts. The summary now says "1 of 1 box" for one box. A host failure also writes a tracing warn record, and the pruned record carries a failed_hosts count. just clippy-strict was not run.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a failed check suite: the coder changed nothing. Revise round 3: the only directive items are the failed tests job and its aggregator ci-linux-native-success. The job log excerpt does not name a failing test. It shows only the runner preamble, early passing decode tests and the cleanup. I could not reproduce a failure. The branch contains origin/main (0 commits behind). The diff touches only crates/minimal. The whole minimal suite passes under the CI nextest profile (--profile ci, leak-timeout 1s), with no FAIL, LEAK or SLOW rows. The common crate's tree-scanning gates and scripts/next-version.sh --check also pass. No crate outside crates/minimal depends on minimal, so the change cannot break another crate's tests except through a test that reads files. I checked those and found none that fails. I was not able to run the doctests (cargo test -p minimal --doc), because this box has no rustdoc binary. The diff adds no code blocks in doc comments. I did not run cargo nextest run --workspace, because the…[truncated]

@agent-137
agent-137 marked this pull request as ready for review November 4, 2026 22:37
@agent-137 agent-137 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.

Re-reviewed at acfcef1. acfcef1: prune_hosts no longer stops at the first failing host; each host's error goes in the tally, the remaining hosts are pruned, finish_prune prints one 'Could not prune host : ' line per failure and exits non-zero (thread zz-tU). 669a7be: the prune question names --older-than. The failed tests run was otel_cli::exec_run_attach_and_task_run_share_the_commands_trace, a flake (main green; rerun passed).

@agent-137
Copy link
Copy Markdown
Member

/review

< 10BC8 include-fragment loading="lazy" src="/gominimal/minimal/issue_comments/6643957192/edit_form?textarea_id=issuecomment-6643957192-body&comment_context=" data-nonce="v2:23485c1b-ff98-b65a-fd46-0fc6d3f4724f" data-view-component="true" class="previewable-comment-form js-comment-edit-form-deferred-include-fragment">

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

The new commit makes min box prune continue past a host that fails. It names each failed host on stderr and exits non-zero. Each host still passes the version gate before its prune, so the walk fails closed. The request still reaps only stopped or exited boxes, as architecture.md line 501 says. The design does not say how a prune across several hosts handles one failed host. The rest of the PR keeps the PASS on 13ef8b9.

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

@agent-137
agent-137 added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@agent-137
Copy link
Copy Markdown
Member

/revise Merge main into this branch, then fix the compile error it brings. On the merge-queue commit (run 41929133950, clippy):

error[E0061]: this function takes 5 arguments but 4 arguments were supplied
 --> crates/minimal/src/main.rs:1108:20

#2984 (T27, now on main) added alias_hint: Option<&str> to answer_failure (crates/minimal/src/main.rs:177). This PR's test at main.rs ~1108 still calls it with 4 arguments. Pass None for alias_hint, as the other refusal tests on main do. Change nothing else.

@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 head merges main and adapts one test call to the new answer_failure signature. The merge keeps both sides in cli.rs and cmd/mod.rs. The rename and prune code does not change, so the PASS on acfcef13 stands. Rename and prune conform to architecture.md lines 333, 363, 485–486 and 501. --dry-run stays a filed residual on #2834.

Ruled at 84a9a6c 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 — approved

Verdict APPROVE — No findings.

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

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as 84a9a6c3fb28.

line exit tail
cargo nextest run -p minimal box_rename_renames_as_box_010 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-3dbe... 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 minimal box_prune_flags_map_to_box_021_selectors 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-b3d0... 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 prune_off_tty_needs_yes 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-86fb... 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.

dSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "6dc02abf7fe6e21b",
                "span_id": "f773edb1ee0f5c5a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "6dc02abf7fe6e21b",
                "span_id": "f125b0d98858bd83",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "6dc02abf7fe6e21b",
                "span_id": "a7a1ea0086131adf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "6dc02abf7fe6e21b",
                "queued_behind": "0",
                "span_id": "2c241a790bb0a65b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "6dc02abf7fe6e21b",
                "queued_behind": "0",
                "span_id": "e1034fa36fbc603a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "e1034fa36fbc603a",
                "span_id": "a51183e6d4bd0a18",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "e1034fa36fbc603a",
                "queued_behind": "0",
                "span_id": "5db885e6a4f263e9",
                "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 [  45.556s] 895 tests run: 894 passed, 1 failed, 1 skipped
        FAIL [   3.073s] (895/895) 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/boxes.rs
  • crates/minimal/src/cmd/mod.rs

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

min box rename renames a box, and min box prune removes old boxes after --yes. The branch compiles again on top of main.

Notes from the agent: The merge of origin/main was already on the branch (a115ed7) with no conflict markers. The only change this round passes None for alias_hint in the answer_failure call in the prune_off_tty_needs_yes_exits_2 test. cargo clippy -p minimal --all-targets is clean.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 4, 2026 23:47
@agent-137
agent-137 marked this pull request as ready for review November 4, 2026 23:53
@agent-137 agent-137 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.

Re-approved at 84a9a6c: a merge of main plus 84a9a6c, which passes alias_hint None to answer_failure in the prune test (the E0061 from #2984 on the queue commit).

@agent-137
Copy link
Copy Markdown
Member

/review

@agent-137
agent-137 added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 6c1eeaf Nov 5, 2026
36 checks passed
@agent-137
agent-137 deleted the agent/2907-rename-and-prune-boxes branch November 5, 2026 01:15
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.

T22 — Rename and prune boxes

1 participant

0