Repository navigation
T46 — Name a new box from its entry, refuse a held name, number a fresh one - #2760
mitodrummer merged 8 commits into
Conversation
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.
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.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: no findings; approval withheld, 2 threads unresolved at 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. |
There was a problem hiding this comment.
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.
|
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 Review threads the coder judged:
|
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
|
Round 2 of 10 on a failed check suite, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
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 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 |
|
/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 C2: in crates/minimald/src/box_manager.rs |
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.
|
Round 3 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
|
Round 4 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
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. |
|
/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.
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
|
Round 5 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…-box-from-its-entry-refuse-a-held-name # Conflicts: # crates/minimald/src/box_manager.rs # crates/minimald/src/box_manager/tests.rs
There was a problem hiding this comment.
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.
|
A merge of main before round 6, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
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. |
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
devis refused while a runningdevexists. The refusal names the holder by name and id, and the daemon log records exit_code=2. A fresh-instance create ofdevgetsdev-1, thendev-2, then the smallest free suffix. The minimald tests show this. A person at theminCLI cannot see it yet: the create request has no fresh-instance field, andminstill sends its own<dir>-<hex>or--namename on every create.Notes from the agent: Client layer not done.
crates/minimal-client/src/box_name.rs: no invented namecannot be done in that file alone. The functions that mint<dir-basename>-<hex>(autogen_session_name,random_hex4,should_retry_autogen) are called fromcrates/minimal/src/cmd/boxes/create.rs,crates/minimal/src/task.rs,crates/minimal/src/dash/rpc.rsandcrates/minimal-client/src/box_registration.rs.crates/minimal/src/tests.rspins them. All of these are outside the layers. Sono_invented_directory_hex_nameis 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/BoxConfighas no field for a fresh instance, andminimald-rpcis not a layer. The daemon accepts it only through the new in-processBoxManagerHandle::create_fresh_box_with_spec. The RPC and the CLIrun/--newmapping 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'sminalways 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 nameddefaultand would differ from its VM host row. When the client stops sending a name, remove the middle step. A spec …[truncated]Tests
cargo nextest run -p mfile spec_names_box_from_box_name_else_entrycargo nextest run -p minimald create_names_box_from_box_name_else_entrycargo nextest run -p minimald create_with_name_held_by_running_box_refused_exit2_names_holdercargo nextest run -p minimald fresh_instance_creation_named_smallest_unused_suffixcargo nextest run -p minimal-client no_invented_directory_hex_namecargo nextest run -p minvmd reuse_of_a_stopped_name_takes_over_its_holdVerify
min task run agent-verifypassed ([tasks.verify]).Closes #2400
Residuals
<dir>-<hex>names, and the testno_invented_directory_hex_namemoves with it: T58 — Stop min inventing box names and carry the held-name refusal to the user #2762CreateSessionRequest/BoxConfig, andrun/--newmapped ontocreate_fresh_box_with_spec: T58 — Stop min inventing box names and carry the held-name refusal to the user #2762serve_create_sessionpasses the holder refusal through, andminexits 2: T58 — Stop min inventing box names and carry the held-name refusal to the user #2762T58 (#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.