8000 T12 — Keep a name unique only among running boxes by minimal-foundry[bot] · Pull Request #2756 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T12 — Keep a name unique only among running boxes - #2756

Merged
mitodrummer merged 8 commits into
mainfrom
agent/2396-keep-a-name-unique-only-among-running-boxes
Oct 30, 2026
Merged

mitodrummer merged 8 commits into
mainfrom
agent/2396-keep-a-name-unique-only-among-running-boxes

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T12 — Keep a name unique only among running boxes

slice: S3
kind: task
covers: BOX-004, BOX-005, BOX-010, BOX-143
size: L
est: 360 code, 480 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: daemon log names holders and candidates
observability: renamed event carries both names
layers:
- names:
- crates/boxes/src/store.rs: one name, many records
- crates/boxes/src/lib.rs: running, latest, candidates
- crates/boxes/Cargo.toml: proptest dev-dependency
- Cargo.lock: proptest for boxes
test: cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop
test: cargo nextest run -p boxes unqualified_name_resolves_running_else_latest
test: cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates
test: cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates
test: cargo nextest run -p boxes rename_changes_only_alias_and_records_event
test: cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder
test: cargo nextest run -p boxes nothing_keys_on_box_name
- actor:
- crates/minimald/src/box_actor/naming.rs: rename refusals, renamed event
- crates/minimald/src/box_actor.rs: routes rename
- crates/minimald/src/box_actor/tests.rs: tests
test: cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event
produces: none
consumes:
- crates/boxes/src/events.rs
proof: Two boxes named dev retained; the running one answers.
depends on:
- blocked by #2394
- blocked by #2389

Proof

In this branch, the store can keep two boxes named dev. When one of them is stopped and the other is running, a lookup of dev returns the running box. When neither runs, the lookup returns the box created last. A new box can take a name that only a stopped or exited box has. A rename to a name that a running box has, or to self, is refused with exit 2, and the message names the running box or self. A successful rename writes one renamed event with old_name and new_name. The tests unqualified_name_resolves_running_else_latest and rename_through_the_actor_writes_one_renamed_event show this.

Notes from the agent: Design 8000 : the store index no longer has the name-keyed name_to_id map. It now has names, keyed on box id. An old index.json is still read: the first start ignores name_to_id and rebuilds names from the records (a test covers this). A daemon from before this change cannot read the new index.json, because it requires name_to_id. A box holds its name while it is pending, materializing or running. A box that is still starting counts, so two concurrent creates of one name cannot both reach running. The 'latest' box is the one with the greatest id. That is creation order for UUIDv7 ids, but not for a legacy record with a v4 id. Cross-host resolution (box_name::resolve_across_hosts) is a pure function. Nothing calls it yet, because no caller in this tree reads more than one host. BCLI work must connect it.

Layers with no change: crates/boxes/Cargo.toml and Cargo.lock already have proptest as a dev-dependency of boxes, so neither changed. crates/minimald/src/box_actor.rs already routes BoxMessage::Rename to the actor's rename, so it did not change. Behaviour change in the store's DiskLoader::rename: it now appends the renamed event. Only boxes tests call it. The actor writes its event through box_manager::write_box_event.

Printed text (new; the CLI does not show it yet except through the rename RPC error): the rename refusal says "…[truncated]

Tests

line exit tail
cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-0125... 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 boxes unqualified_name_resolves_running_else_latest 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-db90... Finished 'test' profile [unoptimized] target(s) in 0.31s ──────────── Nextest run ID 0aa2d201-e6c3-47d7-95a8-f1b29337960a with nextest profile: default Starting 3 tests across 3
cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-e464... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID 3534dcf3-78eb-43c1-bd33-8a49621bcc60 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-3acb... Finished 'test' profile [unoptimized] target(s) in 0.37s ──────────── Nextest run ID 4fcb21ed-7875-4bb5-b76e-3adbee47ee87 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_changes_only_alias_and_records_event 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-1007... Finished 'test' profile [unoptimized] target(s) in 0.30s ──────────── Nextest run ID 5426fb60-1693-4cfd-a370-731e8df30777 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-5822... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 162018a6-0285-4252-b402-34b8cda94e38 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes nothing_keys_on_box_name 0 Applying loadouts: default Running task runtime-implement-test-6 in session task-runtime-implement-test-6-a438... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID ed214346-000c-45dd-8f6e-629d70839634 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event 0 Applying loadouts: default Running task runtime-implement-test-7 in session task-runtime-implement-test-7-f982... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify

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

Base

The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:

  • crates/minimald/src/box_actor/tests.rs

Closes #2396

A name is now an alias that many retained records share. Only a
pending, materializing or running box holds it, so a stopped or exited
box keeps its name and a new box can reuse it (BOX-004). The index keys
names on the box id, and a name lookup returns the running box, else
the latest one (BOX-005, BOX-143). Rename refuses self and a name a
running box holds, and records a renamed event (BOX-010). A pure
cross-host resolution refuses an ambiguous name with exit 2.
The actor refuses a rename to self before it touches the box's route,
logs every refusal with its exit code, and writes one renamed event
with the old and new names once the store accepts the rename (BOX-010).
The store makes the running-holder check and names the holder.
@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: b599a71d-8c79-4d38-865c-f31805279885

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

Approved: every review thread resolved at b598e99fb4ff.

@mitodrummer resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@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_actor/naming.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 · the full ruling

The change conforms to the Addressing rules in architecture.md line 389. A name is unique among running boxes only, and a stopped or exited box keeps its name. Resolution returns the running box, else the latest creation. A rename refuses self and a running-held name, and it writes one renamed event with both names, as line 382 says. The index keys on the id, not the name. Nothing calls the cross-host resolver yet. The BOX spec gives that rendering to BCLI-002.

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

The refusal carries exit_code() 2, but rename returns an io::Error, so
the code reaches only the daemon log. The RPC and min rename do not
carry it yet.
@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 since the last PASS is one doc comment on BoxActor::rename. The comment is accurate. The refusal has exit code 2, but the RPC reply and min rename do not carry it yet. The code did not change, so the earlier ruling stands. The CLI exit path belongs to BCLI-002, not to this task.

Ruled at e638ca0 against gominimal/arch@42d214dc8ac8 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 — 2 findings, 2 inline.

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

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

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

line exit tail
cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-2f83... 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 boxes unqualified_name_resolves_running_else_latest 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-8044... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID d36ec7e6-2a2c-47f5-a794-199e690dea23 with nextest profile: default Starting 3 tests across 3
cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-e80d... Finished 'test' profile [unoptimized] target(s) in 0.31s ──────────── Nextest run ID 7f01a43e-f9ee-4263-81ca-8a828862a375 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-a1a9... Finished 'test' profile [unoptimized] target(s) in 0.49s ──────────── Nextest run ID 8c600bca-1dca-463a-b53f-966376a2f4af with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_changes_only_alias_and_records_event 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-320f... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID 8dfae0a9-8458-4ecf-ad21-367001f1b9af with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-ee73... Finished 'test' profile [unoptimized] target(s) in 0.47s ──────────── Nextest run ID 61682c8f-ec33-4d50-895e-0789a15e19a8 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes nothing_keys_on_box_name 0 Applying loadouts: default Running task runtime-implement-test-6 in session task-runtime-implement-test-6-630f... Finished 'test' profile [unoptimized] target(s) in 0.37s ──────────── Nextest run ID 9fcbc37c-4939-4dc0-aa0b-7c4e4d7d5a44 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event 0 Applying loadouts: default Running task runtime-implement-test-7 in session task-runtime-implement-test-7-1009... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6x2dDS: Rewrote the rename doc comment: exit_code() 2 reaches only the daemon log. Carrying it through the RPC and cmd_rename needs crates/minimal/src/cmd/session.rs, which is outside this task's files. The exit2 test names are the spec's verify lines, and they assert exit_code() == 2 on the boxes refusal t (not posted on the thread: not an open thread on the pull request)

With two boxes named dev retained on a host, an unqualified dev resolves to the running one. A rename to a name that a running box holds, or to self, is refused, names the holder, and changes nothing.

Notes from the agent: Revise round 1. The rename doc comment in naming.rs now says where the exit code goes: the refusal's exit_code() is 2, but it reaches only the daemon log. To carry exit 2 to the user, a later task must change the rename RPC error and cmd_rename in crates/minimal/src/cmd/session.rs. Those files are outside this task's layers. The exit2 test names come from the spec verify lines, so they stay. They assert RenameRefusal::exit_code() == 2 in the boxes crate (lib.rs and store.rs tests).

A stopped Dev hid a running dev, because resolution took exact-case
matches first. Fold case first, let the running box answer, and use
the exact case only to break a tie among retained 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 fixes name resolution so that it folds case first. A running box that holds a name now answers for that name in any case, as architecture.md line 389 requires. The exact case only breaks a tie among boxes that do not run, and the design does not state a case rule. The rest of the PR keeps the PASS on e638ca08.

Ruled at 12cbb73 against gominimal/arch@42d214dc8ac8 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 — 2 findings, 2 inline.

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

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

Round 2 of 10 on a failed check suite, pushed as 12cbb7308844.

line exit tail
cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-ca10... 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 boxes unqualified_name_resolves_running_else_latest 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-fdc3... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 21593df1-c5f3-4cc2-b6a3-1df7aedbc9ba with nextest profile: default Starting 3 tests across 3
cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-158f... Finished 'test' profile [unoptimized] target(s) in 0.31s ──────────── Nextest run ID 83566ab6-7d98-4bba-b849-01dffbf74185 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-1fe8... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID b6d18819-34f2-4a33-b6c6-42fd2e6e98b2 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_changes_only_alias_and_records_event 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-d33b... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 2d3201c3-cb20-426d-b97d-ea6f411de31c with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-91bd... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID 18d44433-451b-4389-b281-386863e99fb2 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes nothing_keys_on_box_name 0 Applying loadouts: default Running task runtime-implement-test-6 in session task-runtime-implement-test-6-abd4... Finished 'test' profile [unoptimized] target(s) in 0.32s ──────────── Nextest run ID ce070a15-848a-4b13-a815-bedf82bc6055 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event 0 Applying loadouts: default Running task runtime-implement-test-7 in session task-runtime-implement-test-7-45c7... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — PRRT_kwDOPdfcxM6x2jfT: candidates now folds case. resolve_on_host lets the running box answer and uses the exact case only to break a tie. The property test oracle and the store test now cover a stopped Dev beside a running dev. (not posted on the thread: not an open thread on the pull request)
  • 👎 invalid — PRRT_kwDOPdfcxM6x2jfW: It is true that nothing calls resolve_across_hosts yet. The task's layers are crates/boxes and the minimald box actor, which resolve on one host only. A caller needs the CLI's multi-host resolver in crates/minimal, outside this task. The result notes say it is not wired yet, so the PR body says so. (not posted on the thread: not an open thread on the pull request)

Two boxes named dev are retained on one host and one of them runs. find_by_name returns the running one for dev, and also for Dev when a stopped Dev exists. With none running, the latest box in the exact case answers.

Notes from the agent: Failed checks: the job log excerpt does not name a failing test. The full boxes suite (622) and the full minimald suite (1241) pass on this branch. No other crate uses the changed store code. The boxes and minimald doctests did not run here, because rustdoc is not executable on this box. So the failing test in the CI tests job is not reproduced. It can be in a crate outside this task's layers, or a flaky test. ci-linux-native-success is the aggregator, and it failed because tests failed. Not wired yet: resolve_across_hosts and AmbiguousName have no caller outside their tests. The daemon resolves names on one host only, so no user sees the two-host refusal yet. Wiring it needs the CLI's resolver in crates/minimal, which is outside this task's layers.

Loader::rename now logs a failed renamed-event write and returns Ok,
as the actor path does. The new name is already saved at that point.
@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 changes one function: DiskLoader::rename in crates/boxes/src/store.rs. When the event write fails after the new name is saved, the store now logs the failure and keeps the rename. The actor path already does this. The design does not say that a lost lifecycle event must undo a rename. The earlier PASS stands for the rest of the change.

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

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

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

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

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

line exit tail
cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-1c52... 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 boxes unqualified_name_resolves_running_else_latest 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-c163... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 060f9b51-9beb-41ef-b161-f3f8b855d6ce with nextest profile: default Starting 3 tests across 3
cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-3ccf... Finished 'test' profile [unoptimized] target(s) in 0.34s ──────────── Nextest run ID 2c475738-eb28-430e-82c2-88a79155e211 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-e4ac... Finished 'test' profile [unoptimized] target(s) in 0.36s ──────────── Nextest run ID 49f071d3-678e-4b2e-9400-bd276b21569f with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_changes_only_alias_and_records_event 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-1326... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 5f15d88b-9d03-47d7-a73c-a0fd2a911388 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-fa35... Finished 'test' profile [unoptimized] target(s) in 0.29s ──────────── Nextest run ID dab1b2f1-962d-4d92-829d-4042e822b509 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes nothing_keys_on_box_name 0 Applying loadouts: default Running task runtime-implement-test-6 in session task-runtime-implement-test-6-2ab4... Finished 'test' profile [unoptimized] target(s) in 0.33s ──────────── Nextest run ID 74b8cc2b-0fe3-4dd9-96bf-a7738097d306 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event 0 Applying loadouts: default Running task runtime-implement-test-7 in session task-runtime-implement-test-7-f7be... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👎 invalid — PRRT_kwDOPdfcxM6x206z: Failing closed is deliberate, and the boxes_named doc says why: an unreadable record can belong to the running box that holds the name. If we skip it, create and rename can give a running name to two boxes (BOX-004), and find_by_name can answer a stopped box instead of the running one (BOX-005). The (not posted on the thread: not an open thread on the pull request)
  • 👍 valid — PRRT_kwDOPdfcxM6x2065: Loader::rename now logs a failed renamed-event write as a warning and returns Ok after save, as record_renamed does. The trait doc says this too. (not posted on the thread: not an open thread on the pull request)

Two boxes named dev can be retained on one host. A lookup of dev answers the running one, and only a running box holds the name.

Notes from the agent: Revise round 3. Loader::rename now logs a failed renamed-event write and returns Ok, the same rule as the actor path. Failed checks: ci-macos-success is the lane aggregator. Its excerpt shows only exit 1, with no failing job named. The e2e excerpt shows expose steps and the cleanup, but no failing step. The rename steps in scripts/session-e2e.sh expect 'session is already named', and crates/minimald/src/box_actor/naming.rs still prints that. I found no cause for either failure in this diff, so I changed nothing for them. Please re-run them, or send the full e2e log if they fail again. cargo clippy -p boxes --all-targets is clean.

@mitodrummer
Copy link
Copy Markdown
Member

/revise Fix the open thread in crates/minimald/src/box_actor/naming.rs (rename, the Err(error) arm near line 750): log rename refused (info, with exit_code) only when the downcast finds a RenameRefusal; log any other error (record write, index flush, stale key, invalid name) as warn!(%error, "rename failed"). Add or adjust a test only if one already asserts on this log line. Touch nothing else.

Only a RenameRefusal logs 'rename refused' at info. A record write or
index flush error now logs 'rename failed' at warn.
@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. The new commit logs a failed rename apart from a refused rename. It does not change what rename returns or the renamed event. The merge of main is clean. The earlier PASS on 733d7806 stands for the rest of the change.

Ruled at b598e99 against gominimal/arch@42d214dc8ac8 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 — approval withheld

Verdict COMMENT — APPROVE withheld: 1 unresolved thread — minimal-foundry[bot] crates/minimald/src/box_actor/naming.rs. 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 b598e99fb4ff.

line exit tail
cargo nextest run -p boxes name_unique_among_running_on_host_reusable_after_stop 0 a v1.1.0 Compiling block-buffer v0.12.1 Compiling rustls-webpki v0.103.16 Compiling crypto-common v0.2.2 Compiling subtle v2.6.1 Compiling tokio-util v0.7.20 Compiling digest v0.11.3 Compiling url v2.5.8 Compiling getrandom v0.3.4 Compiling h2 v0.4.18 Compiling getrando
cargo nextest run -p boxes unqualified_name_resolves_running_else_latest 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-b4a5... Finished 'test' profile [unoptimized] target(s) in 0.44s ──────────── Nextest run ID a393aade-e2ca-46d5-9663-face4851b0f0 with nextest profile: default Starting 3 tests across 3
cargo nextest run -p boxes unqualified_name_running_on_two_hosts_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-0746... Finished 'test' profile [unoptimized] target(s) in 0.43s ──────────── Nextest run ID 83044e4d-e114-4150-ae2d-20f097184659 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes unqualified_name_retained_on_two_hosts_none_running_refused_exit2_lists_candidates 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-1c43... Finished 'test' profile [unoptimized] target(s) in 0.67s ──────────── Nextest run ID 6379fb84-4455-4152-91a7-17bcad558465 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_changes_only_alias_and_records_event 0 Applying loadouts: default Running task runtime-implement-test-4 in session task-runtime-implement-test-4-d822... Finished 'test' profile [unoptimized] target(s) in 0.41s ──────────── Nextest run ID c6dbae68-36a8-491f-8165-7c1415856f50 with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes rename_to_running_held_name_or_self_refused_exit2_names_holder 0 Applying loadouts: default Running task runtime-implement-test-5 in session task-runtime-implement-test-5-6113... Finished 'test' profile [unoptimized] target(s) in 0.40s ──────────── Nextest run ID aa0d1520-181e-4fd0-99c6-56c38c9ed33a with nextest profile: default Starting 1 test across 3
cargo nextest run -p boxes nothing_keys_on_box_name 0 Applying loadouts: default Running task runtime-implement-test-6 in session task-runtime-implement-test-6-335d... Finished 'test' profile [unoptimized] target(s) in 0.42s ──────────── Nextest run ID a9fd3a44-5c18-48c8-b567-107f4d6c8af4 with nextest profile: default Starting 1 test across 3
cargo nextest run -p minimald rename_through_the_actor_writes_one_renamed_event 0 Applying loadouts: default Running task runtime-implement-test-7 in session task-runtime-implement-test-7-e730... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — crates/minimald/src/box_actor/naming.rs: The Err arm now logs 'rename refused' (info, with exit_code) only when the error downcasts to RenameRefusal. Any other error logs warn 'rename failed'.

Two boxes named dev are retained, and the running one answers to the name. In the daemon log, a rename that the name rules refuse shows as 'rename refused' with its exit code. A rename that fails on a write shows as 'rename failed' at warn.

Notes from the agent: This revise round changes only the Err arm of rename in naming.rs, as the note asks. No test asserts on the log line, so no test changed. The boxes test lines were not run again this round, because no file in crates/boxes changed. cargo clippy -p minimald --all-targets is clean.

@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 b598e99fb4ff 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 b598e99. Name uniqueness among running boxes, case-folded resolution preferring the running box, and the rename refusal path are correct; the open logging thread is fixed. Disclosed and accepted for follow-up: exit 2 is not yet carried through the RPC and min rename (BCLI), resolve_across_hosts has no caller yet, and find_by_name fails closed on an unreadable record. The per-test port lease in box_actor tests replaces the fixed 18080 that collided under nextest.

@mitodrummer
mitodrummer added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 30c43a1 Oct 30, 2026
36 checks passed
@mitodrummer
mitodrummer deleted the agent/2396-keep-a-name-unique-only-among-running-boxes branch October 30, 2026 16:59
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.

T12 — Keep a name unique only among running boxes

1 participant

0