8000 T46 — Name a new box from its entry, refuse a held name, number a fresh one by minimal-foundry[bot] · Pull Request #2760 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T46 — Name a new box from its entry, refuse a held name, number a fresh one - #2760

Merged
mitodrummer merged 8 commits into
mainfrom
agent/2400-name-a-new-box-from-its-entry-refuse-a-held-name
Oct 30, 2026
Merged

mitodrummer merged 8 commits into
mainfrom
agent/2400-name-a-new-box-from-its-entry-refuse-a-held-name

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

T46 — Name a new box from its entry, refuse a held name, number a fresh one

slice: S3
kind: task
covers: BOX-163
size: L
est: 260 code, 360 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: daemon log names holder or suffix
observability: create span carries name given
layers:
- spec:
- crates/mfile/src/spec.rs: box name, else entry
test: cargo nextest run -p mfile spec_names_box_from_box_name_else_entry
- daemon:
- crates/minimald/src/box_manager.rs: held-name refusal; fresh suffix
- crates/minimald/src/box_manager/tests.rs: tests
test: cargo nextest run -p minimald create_names_box_from_box_name_else_entry
test: cargo nextest run -p minimald create_with_name_held_by_running_box_refused_exit2_names_holder
test: cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix
- client:
- crates/minimal-client/src/box_name.rs: no invented name
test: cargo nextest run -p minimal-client no_invented_directory_hex_name
- vm-host:
- crates/minvmd/src/box_registry.rs: reuse takes over hold
test: cargo nextest run -p minvmd reuse_of_a_stopped_name_takes_over_its_hold
p 8000 roduces: none
consumes:
- crates/mfile/src/spec.rs
proof: A second dev is refused; a fresh run gets dev-1.
depends on:
- blocked by #2396
- blocked by #2388

Proof

Partly delivered, and only inside the daemon. In the box manager, a second create named dev is refused while a running dev exists. The refusal names the holder by name and id, and the daemon log records exit_code=2. A fresh-instance create of dev gets dev-1, then dev-2, then the smallest free suffix. The minimald tests show this. A person at the min CLI cannot see it yet: the create request has no fresh-instance field, and min still sends its own <dir>-<hex> or --name name on every create.

Notes from the agent: Client layer not done. crates/minimal-client/src/box_name.rs: no invented name cannot be done in that file alone. The functions that mint <dir-basename>-<hex> (autogen_session_name, random_hex4, should_retry_autogen) are called from crates/minimal/src/cmd/boxes/create.rs, crates/minimal/src/task.rs, crates/minimal/src/dash/rpc.rs and crates/minimal-client/src/box_registration.rs. crates/minimal/src/tests.rs pins them. All of these are outside the layers. So no_invented_directory_hex_name is not written, and its test line exits 4 (no tests to run). The task needs those files as layers, or a separate client task.

Fresh instance wiring. minimald_rpc::CreateSessionRequest/BoxConfig has no field for a fresh instance, and minimald-rpc is not a layer. The daemon accepts it only through the new in-process BoxManagerHandle::create_fresh_box_with_spec. The RPC and the CLI run/--new mapping must follow in a later task.

Name precedence in the daemon (creation_name): the spec's [box] name, then a name the request sends, then the spec's entry. The middle step is not in BOX-163. It is there because today's min always sends a name, and on the VM path the client registers that same name with minvmd before the create. If the daemon used the entry in its place, every session would be named default and would differ from its VM host row. When the client stops sending a name, remove the middle step. A spec …[truncated]

Tests

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-ed1f... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-d4ad... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-1083... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-f1ec... 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-client no_invented_directory_hex_name 4 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-b0f3... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling common v0.0.1 (/workb
cargo nextest run -p minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-e00a... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbench/crates/version) Compiling minvmd v0.8.0 (/workb

Verify

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

Closes #2400

Residuals

T58 (#2762) is a walk task that waits on this PR. The maintainer moved #2400's client layer to it, so this PR closes #2400 for the daemon, VM host and spec parts of BOX-163.


Undrafted by the maintainer: this PR was drafted because its client layer could not be done. That layer moved to T58 (#2762), and every file here is in T46's layers.

The spec now has an optional [box] name, left out when unset, and
BoxSpec::box_name answers it, else the entry's name (BOX-163).
A create names its box with the spec's [box] name, else the entry's
name, and keeps a name the request sends ahead of the entry until the
client stops sending one (BOX-163). A create under a name a running box
holds is refused, naming the holder, with exit code 2 in the log. A
fresh instance takes <name>-<n>, the smallest n no retained record
uses. Only an in-process caller can ask for a fresh instance yet: the
create request has no field for it.
8000
A dormant creation is a stopped box, so it no longer holds its name
(BOX-004). A registration under the name takes it over, ends the
dormant creation and gives its reserved addresses back. The test that
pinned the old refusal now pins the takeover.
@coderabbitai
coderabbitai Bot commented Oct 30, 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: 98c4a50b-9059-4212-ae43-80e4d5f0b478

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

Use the checkbox below for a quick retry:

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

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

@minimal-foundry
minimal-foundry Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor Author

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

APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimald/src/box_manager.rs:317, minimal-arch[bot] crates/minimald/src/box_manager.rs:387. Resolving the last thread releases the approval on this head.

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

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/minimald/src/box_manager.rs Resolved
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

The daemon naming, the held-name refusal and the fresh suffix conform to the Addressing rule at line 389. The minvmd change frees a stopped box's name, but it also ends that box's creation. After that, the stopped box cannot resume on a VM host. Lines 458 and 487 say a stopped box resumes under the same id and name. C1 fixes this. C2 amends the spec 18 comment that still says a dormant creation holds its name. C3 and C4 file the client layer and the fresh-instance wiring as issues, and link them from the interim code.

Ruled at 6b73a78 against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

Comment thread crates/minvmd/src/box_registry.rs Resolved
Comment thread crates/minvmd/src/box_registry.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings: the coder changed nothing. Revise round 1: this round changed no code. I judged the one thread as invalid (see threads). Client layer not done: BOX-163 asks the client to stop inventing a <dir>-<hex> name. crates/minimal-client/src/box_name.rs only mints that name. The callers that put it on the request are crates/minimal/src/cmd/boxes/create.rs, crates/minimal/src/dash/rpc.rs, crates/minimal/src/task.rs, and the autogen retry in crates/minimal-client/src/box_registration.rs. No layer names those files. On the VM path, box_registration.rs also registers the request name with minvmd before the create, so that registration must change in the same piece of work. That is a planning defect: the client layer must name those files. So no_invented_directory_hex_name does not exist, and its test line exits 4 (no tests to run). The same follow-up must also send the final daemon name (spec [box] name or fresh suffix) to minvmd, and that closes the latent mismatch the review thread describes.

Review threads the coder judged:

  • 👎 invalid — crates/minimald/src/box_manager.rs:302: The order is deliberate. BOX-163 names the box from the spec's [box] name first, and create_names_box_from_box_name_else_entry pins that the spec name beats a request name. If the request name came first, a client that sends --name would override [box] name and break the requirement. The other f

A registration under a stopped box's name no longer ends the stopped
box's creation. The creation is superseded: it keeps its addresses and
its box id, and is persisted. A resume by that id is refused while a
running box holds the name, and is accepted once that row is withdrawn
(BOX-004). The creator can still destroy the stopped box.
@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-foundry[bot] crates/minimald/src/box_manager.rs:302, minimal-arch[bot] crates/minvmd/src/box_registry.rs:4199, minimal-arch[bot] crates/minvmd/src/box_registry.rs, minimal-arch[bot] crates/minimald/src/box_manager.rs:287, minimal-arch[bot] crates/minimald/src/box_manager.rs:360. No findings.

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

The compare fixes the stopped-box point: a stopped box keeps its creation and resumes under its id once its name is free, as lines 389 and 487 require. BOX-163 is still not delivered at the min CLI. The client still mints <dir>-<hex> names, and the RPC drops the holder and exit 2. No request reaches the fresh-instance path. Line 389 requires all of these. File an issue for each open item and stop the close of #2400 (C1). Mark the request-name step in creation_name() as an interim with its issue (C2).

Ruled at 1ebcb34 against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

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

Round 2 of 10 on a failed check suite, pushed as 1ebcb3443188.

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-3aba... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-203c... 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 minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-6ef7... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-3748... 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-client no_invented_directory_hex_name 4 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-22c7... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling version v0.8.0 (/workbench/crates/version) Compiling common v0.0.1 (/workb
cargo nextest run -p minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-7152... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbench/crates/version) Compiling minvmd v0.8.0 (/workb

Verify min task run agent-verify passed.

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

Review threads the coder judged:

  • 👍 valid — crates/minvmd/src/box_registry.rs:4199: A takeover now keeps the replaced creation as superseded, with its addresses and its box id. A resume by that id is refused only while a live row holds the name.
  • 👍 valid — crates/minvmd/src/box_registry.rs: The test now asserts both cases: the resume is refused with NameAlreadyHeld while the new box's row stands, and the same resume is accepted after that row is withdrawn.
  • 👎 invalid — crates/minimald/src/box_manager.rs:287: The request-name step is an interim, but this coder session has no GitHub access and cannot file the issue or get its URL. A person must file it. The next round can then cite its URL here and in the PR body.
  • 👎 invalid — crates/minimald/src/box_manager.rs:360: No request reaches this method yet, but this coder session has no GitHub access and cannot file the issue for the request field and the run / --new mapping. A person must file it. The next round can then cite its URL here.

On this branch, a create under a name that a running box holds is refused with exit 2, and the refusal names the holder. A fresh-instance create of dev gets dev-1, the smallest unused suffix. On a VM host, a new box can take a stopped box's name, and the stopped box stays resumable by its box id after the new box's row is withdrawn. Only an in-process caller can ask for a fresh instance today, because the create request has no field for it. So min cannot yet show a person dev-1.

Notes from the agent: Revise round 2. (1) C1 (minvmd): a takeover no longer ends the stopped box's creation. The creation is kept in a superseded list. It keeps its switch, task and loopback addresses and its box id, and it is persisted. A resume by its id is refused with NameAlreadyHeld while a live row holds the name, and is accepted after that row is withdrawn. The creator can still destroy it with withdraw_client_box. On reload, a dormant second creation under one name is kept as superseded, not dropped. The box_registry (80) and answerer (61) tests in minvmd pass, and clippy -p minvmd --all-targets is clean. (2) C3 and C4 ask me to file GitHub issues and cite their URLs. This session has no GitHub access (no gh, no token), so I filed nothing and changed nothing. A person must file the issues: one for the request-name step in creation_name, and one for a create-request field for a fresh instance with the run / --new mapping. The next round can then put the URLs in the doc comments. (3) The client layer (crates/minimal-client/src/box_name.rs, 'no invented name') is not done, and its test no_invented_directory_hex_name does not exist. The minted

- name is called from crates/minimal/src/task.rs, crates/minimal/src/dash/rpc.rs, crates/minimal/src/cmd/boxes/create.rs, crates/minimal/src/cmd/mod.rs, crates/minimal-client/src/box_registration.rs and crates/minimal/src/tests.rs. All of these are outside the task's layers. A client that stops sending a name need…[truncated]

@mitodrummer
Copy link
Copy Markdown
Member

/revise Arch review C2, and the moved client layer. The maintainer moved this task's client layer (crates/minimal-client/src/box_name.rs and the no_invented_directory_hex_name test) to T58 #2762; drop that test leg here and do not touch the client.

C2: in crates/minimald/src/box_manager.rs creation_name() (doc comment near lines 285-289), mark the NameSource::Request step as an interim. Name its flip condition: the client sends a request name only for --name, never a minted <dir>-<hex> name. Link #2762 there. Keep the step, because --name uses it. The PR body already has the C1 Residuals section; leave it and Closes #2400 as they are. Touch nothing else.

The request name goes ahead of the entry for --name and, today, for
the client's minted <dir>-<hex> names. Name the flip condition and
link issue 2762, which stops the client sending a minted name.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 658559d13a05.

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-a3f7... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-3415... 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 minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-6b7d... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-86b9... Compiling stdlib v0.0.22 ( 10000 /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 minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-7cce... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbench/crates/version) Compiling minvmd v0.8.0 (/workb

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/box_manager.rs:295: Marked the request-name step in the creation_name doc comment as an interim. Named the flip condition (the client sends a request name only for --name, never a minted - name) and linked issue 2762.
  • 👎 invalid — crates/minimald/src/box_manager.rs:365: This needs no code change in this PR. It asks for an issue and a PR-body entry. The maintainer's note says the PR body already has the C1 Residuals section. The RPC field and the CLI mapping are in rpc.rs and the min CLI, which are outside this task's layers.
  • 👎 invalid — crates/minimald/src/box_manager.rs:2759: This needs no code change in this PR. The fix is in crates/minimald/src/rpc.rs (serve_create_session) and the min CLI exit path, which are outside this task's layers. The maintainer's note says the PR body Residuals section (C1) already covers the issue.

In minimald, a create under a name that a running box holds is refused, and the refusal names the holder. A fresh instance of dev gets dev-1, the smallest unused suffix. The creation_name doc comment now marks the request-name step as an interim, names its flip condition and links issue 2762.

Notes from the agent: Round 3 changed only the creation_name doc comment in crates/minimald/src/box_manager.rs (C2). The no_invented_directory_hex_name test and crates/minimal-client are not on this branch, so I removed nothing for the moved client layer. I did not file issues or edit the PR body because this session has no gh credential. The note says the PR body already has the C1 Residuals section. I did not run just clippy-strict.

@mitodrummer
mitodrummer marked this pull request as ready for review October 30, 2026 19:40
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

The daemon, spec and VM-host layers conform to Addressing line 389 and the min box resume line 487. The request-name step in creation_name is now an interim with a flip condition and a linked issue. A user cannot see BOX-163 yet. min still sends minted names, no request field asks for a fresh instance, and exit 2 does not reach the CLI. C1 and C2 name those edits, and #2762 owns them. The merge can go ahead with them open.

Ruled at 658559d against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/minvmd/src/box_registry.rs Resolved
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

The daemon and VM-host parts of BOX-163 conform to design line 389. The refusal names the holder with exit 2. A fresh instance takes the smallest unused suffix. A stopped box no longer blocks its nam 10BC8 e. One spec line is now wrong. Spec 18's NET-138 comment still says a dormant creation holds its name until its destroy. Amend that comment as C1 says. The client part, the RPC field and the exit 2 at min are filed on #2762.

Ruled at 01ffc8a against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

Comment thread crates/minvmd/src/box_registry.rs Resolved
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 4 unresolved threads — minimal-arch[bot] crates/minimald/src/box_manager.rs:305, minimal-arch[bot] crates/minimald/src/box_manager.rs:365, minimal-foundry[bot] crates/minvmd/src/box_registry.rs, minimal-arch[bot] crates/minvmd/src/box_registry.rs:4782. 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 the runtime's review findings, pushed as 01ffc8a76f45.

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2dda... Compiling parking_lot_core v0.9.12 Compiling errno v0.3.14 Compiling mio v1.2.2 Compiling socket2 v0.6.5 Compiling signal-hook-registry v1.4.8 Compiling parking_lot v0.
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Compiling zstd v0.14.3 Compiling pathrs v0.2.5 Compiling fd-lock v4.0.4 Compiling nix v0.29.0 Compiling const_format_proc_macros v0.2.34 Compiling heapless v0.7.17 Compiling netlink-sys v0.8.8 Compiling procfs v0.18.0 Compiling derive_builder v0.20.2 Compiling netlink-pac
cargo nextest run -p minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-a438... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-35ce... 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 minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-450b... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbench/crates/version) Compiling minvmd v0.8.0 (/workb

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👎 invalid — crates/minimald/src/box_manager.rs:305: The finding does not ask for a change in this PR. The creation_name doc comment already marks the request-name step as an interim and links T58 — Stop min inventing box names and carry the held-name refusal to the user #2762. The fix needs crates/minimal to send a request name only for --name, and crates/minimal is outside this task's layers.
  • 👎 invalid — crates/minimald/src/box_manager.rs:365: This is follow-up work for T58 — Stop min inventing box names and carry the held-name refusal to the user #2762. The fix needs a new request field in minimald-rpc, routing of run/--new, and a HeldNameRefusal pass-through in serve_create_session in crates/minimald/src/rpc.rs. All of these files are outside this task's layers. The doc comment on create_fresh_box_with_spec alread
  • 👍 valid — crates/minvmd/src/box_registry.rs: I rewrote the held_name_for doc comment. A takeover now supersedes the old creation and does not end it. The old creation keeps its addresses and box id, and it can resume once no live row holds the name.

In the daemon tests, a second create named dev is refused with exit 2 while a running box holds dev, and the refusal names the holder. A fresh-instance create gets dev-1. Today only an in-process caller can ask for a fresh instance, and min does not yet exit 2 on the refusal. Both gaps are tracked in #2762. This round changes only a doc comment.

Notes from the agent: Revise round 4. I changed only the held_name_for doc comment in box_registry.rs. I ran only the minvmd test line, because the minimald and mfile code did not change this round. Threads C1 and C2 ask for client and RPC work, and the reviewer tracks that work in #2762. That work is outside this task's layers.

@mitodrummer
Copy link
Copy Markdown
Member

/revise Arch C1 at 01ffc8a. The maintainer accepts one file outside the layers for this: docs/specs/18-spec-box-networking/18-spec-box-networking.md. Edit only the NET-138 rationale comment (about line 698): replace "and holds its name, so no other box is handed them, until its creator's destroy releases them" with text saying a dormant creation keeps its addresses until its creator's destroy but holds no name; a new registration under the name supersedes it (BOX-004), and it resumes by its box id only while no live row holds the name. Keep the requirement text, id, tier and verify lines as they are. Touch nothing else in that file. If a round is already running on this PR, fold this note into it.

A dormant creation keeps its addresses until its creator's destroy,
but a new registration under its name supersedes it (BOX-004). It
resumes by its box id only while no live row holds the name.
@github-actions
github-actions Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

Spec lint

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

docs/specs/18-spec-box-networking/18-spec-box-networking.md:159: P004 NET-009 names test 'native_resolution_without_proxy_env', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:339: P004 NET-040 names test 'fresh_install_own_ip_ingress_publishes_loopback', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:344: P004 NET-041 names test 'installer_switch_binary_executable', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:382: P004 NET-048 names test 'linux_amd64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:387: P004 NET-049 names test 'fresh_linux_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:392: P004 NET-050 names test 'linux_arm64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:397: P004 NET-051 names test 'fresh_arm64_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:752: P004 NET-132 names test 'proxy_sees_each_vm_box_by_its_switch_address', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:778: P004 NET-134 names test 'deny_all_box_reaches_proxy_and_no_other_host_port', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:802: P004 NET-107 names test 'session_outbound_request', which was not found in the repository

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

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

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

Choose a reason for hiding this comment

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

arch-review: PASS_WITH_CONDITIONS · 3 conditions · the full ruling

The NET-138 amendment agrees with the design. Addressing line 389 says a stopped box keeps its name, and a new box can reuse it. The spec now says that a dormant creation holds no name, and resumes only while no running box holds it. box_registry.rs line 5017 enforces this. C1 to C3 are the filed residuals on #2762: the client name, the exit 2 at min, and run/--new. They can stay open at merge.

Ruled at 6d42330 against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread crates/minimald/src/box_manager.rs Resolved
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 7 unresolved threads — minimal-arch[bot] crates/minimald/src/box_manager.rs:305, minimal-arch[bot] crates/minimald/src/box_manager.rs:365, minimal-foundry[bot] crates/minvmd/src/box_registry.rs, minimal-arch[bot] crates/minvmd/src/box_registry.rs:4782, minimal-arch[bot] crates/minimald/src/box_manager.rs:289, …. No findings.

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

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 ble-atomic v1.14.0 Compiling miette v7.6.0 Compiling anstream v1.0.0 Compiling pretty_assertions v1.4.1 Compiling ouroboros v0.18.5 Compiling jaq-std v3.0.1 Compiling pretty v0.12.5 Compiling toml v1.1.6+spec-1.1.0 Compiling saphyr-parser v0.0.6 Compiling malachite v0.9.2
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Compiling lcache v0.0.1 (/workbench/crates/lcache) Compiling crossbeam-channel v0.5.16 Compiling curve25519-dalek v5.0.0 Compiling hakoniwa v1.7.2 (https://github.com/souk4711/hakoniwa.git?rev=0810ffa37620ef5c57de263c8eaa1f4d7633c14a#0810ffa3) Compiling version v0.8.0 (/workbench/crates
cargo nextest run -p minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-ea2d... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-f241... 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 minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-fd33... Compiling parking_lot_core v0.9.12 Compiling tracing-subscriber v0.3.23 Compiling rustix v1.1.4 Compiling google-cloud-wkt v1.9.0 Compiling parking_lot v0.12.5 Compilin

Verify min task run agent-verify passed.

Outside the task's layers::

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

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

Review threads the coder judged:

  • 👍 valid — crates/minvmd/src/box_registry.rs:4782: Amended the NET-138 rationale comment in spec 18: a dormant creation keeps its addresses until its creator's destroy but holds no name; a new registration supersedes it (BOX-004), and it resumes by box id only while no live row holds the name.

A second box named dev is refused while dev runs, and a fresh run gets dev-1. Spec 18 NET-138 now agrees with that code: a dormant creation keeps its addresses until its creator's destroy but holds no name.

Notes from the agent: This round changed only the NET-138 rationale comment in docs/specs/18-spec-box-networking/18-spec-box-networking.md. The maintainer accepted that file outside the layers in the /revise note. The requirement text, id, tier and verify lines are unchanged. No Rust code changed, so I did not re-run the five test: lines this round. Earlier rounds ran them against the same code. I could not run Vale (just lint-prose) because vale is not installed on this box. The failed checks are test-kvm and its aggregator ci-linux-kvm-success. The log excerpt shows only the step scripts and the job cleanup, with no failing test, and this box has no /dev/kvm. I cannot reproduce the failure here, and a docs-only round cannot fix it. Somebody must read the full job log or re-run the job.

10BC8

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 30, 2026 20:29
@mitodrummer
mitodrummer marked this pull request as ready for review October 30, 2026 20:40
@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; @mitodrummer closed the last one. The review of 6d4233014ea2 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 Oct 30, 2026
@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 6d42330. Naming precedence ([box] name, then the request name as an interim, then the entry), the held-name refusal naming its holder through the store's atomic check, the fresh-suffix numbering, and the minvmd takeover keeping a superseded creation resumable by id are all correct, with no change for today's clients. The client half is T58 #2762. Non-blocking notes are in the walk ledger: the registry file version is not bumped for superseded creations, and there is no reload test for them.

@mitodrummer
mitodrummer added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 30, 2026
…-box-from-its-entry-refuse-a-held-name

# Conflicts:
#	crates/minimald/src/box_manager.rs
#	crates/minimald/src/box_manager/tests.rs
@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 merge of main changes no naming behaviour in this PR. The create path now files the record under the VM-minted id. The [box] name-else-entry rule, the <name>-<n> suffix and the exit 2 holder refusal still run before the record is filed, as Addressing line 389 requires. C1 and C2 stay open from the earlier ruling, and #2762 tracks them. C1 removes the interim request-name step. C2 wires the fresh-instance field and exit 2 through the RPC and min.

Ruled at f508982 against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.

Comment thread crates/minimald/src/box_manager.rs Resolved
Comment thread 10BC8 crates/minimald/src/box_manager.rs Resolved
@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Oct 30, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

A merge of main before round 6, not counted against the cap (1 of 3), pushed as f508982e511f.

Resolved conflicts in: crates/minimald/src/box_manager.rs, crates/minimald/src/box_manager/tests.rs

line exit tail
cargo nextest run -p mfile spec_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-d586... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimald create_names_box_from_box_name_else_entry 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-c109... 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 minimald create_with_name_held_by_running_box_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-139b... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffix 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-3bdb... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling mlog v0.0.1 (/workbench/crates/mlog) Compiling decode v0.0.
cargo nextest run -p minvmd reuse_of_a_stopped_name_takes_over_its_hold 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-1d19... Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling version v0.8.0 (/workbench/crates/version) Compiling minvmd v0.8.0 (/workb

Verify min task run agent-verify passed.

Outside the task's layers::

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

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

A second create of a box named dev, while a running box holds dev, is refused and names the holder. A fresh run of the same entry gets dev-1. This holds at the branch head after the merge with main.

Notes from the agent: This round resolved the merge conflict with main in two files. In box_manager.rs, the retry after a destroyed holder now uses main's create closure, which honours a minted id. It keeps this branch's held-name refusal for a second collision and for a running holder. In box_manager/tests.rs, the tests from both sides are kept. cargo clippy -p minimald --all-targets is clean, and cargo fmt --check is clean.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft October 30, 2026 21:46
@mitodrummer
mitodrummer marked this pull request as ready for review October 30, 2026 21:56
@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.

Re-approved at f508982: it only merges main onto 6d42330, which I reviewed. The conflict resolution in box_manager.rs keeps T13's minted-id create path, and the PR still removes only 5 lines of that file against main.

@mitodrummer
mitodrummer added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit ff44045 Oct 30, 2026
37 checks passed
@mitodrummer
mitodrummer deleted the agent/2400-name-a-new-box-from-its-entry-refuse-a-held-name branch October 30, 2026 22:41
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.

T46 — Name a new box from its entry, refuse a held name, number a fresh one

1 participant

0