8000 fix(boxes,minimal,minimal-client): the box record keeps its name origin, and min box list and show by minimal-foundry[bot] · Pull Request #3788 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(boxes,minimal,minimal-client): the box record keeps its name origin, and min box list and show - #3788

Merged
mitodrummer merged 3 commits into
mainfrom
agent/3785-the-box-record-keeps-its-name-origin-and-min-box
Nov 25, 2026
Merged

mitodrummer merged 3 commits into
mainfrom
agent/3785-the-box-record-keeps-its-name-origin-and-min-box

Conversation

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

Follow-up

Fixes #3785
Closes #3754

  • Epic: charged to Box — one record, one spec, one grammar for every session and task on a stock install #2236
  • Size: L; estimated 340 code, 330 tests
  • May touch:
    • crates/boxes/src/lib.rs
    • crates/boxes/src/store.rs
    • crates/minimald/src/box_actor/naming.rs
    • crates/minimald/src/box_manager.rs
    • crates/minimald-rpc/src/lib.rs
    • crates/minimald/src/box_manager/tests.rs
    • crates/minimal-client/src/box_registration.rs
    • crates/minimal/src/cmd/box_audit.rs
    • crates/minimal/src/cmd/boxes/vm_host.rs
    • crates/minimal/src/cmd/mod.rs
    • crates/minimal/src/dash/render.rs
    • crates/minimal/src/dash/rpc.rs
    • crates/minimal/src/tests.rs
    • crates/minimal/tests/dash_snapshots.rs
    • crates/minimald-rpc/src/tests.rs
    • crates/minimald/src/box_actor/host.rs
    • crates/minimald/src/box_actor/setup.rs
    • crates/minimald/src/box_actor/tests.rs
    • crates/minimald/src/box_manager/composables.rs
    • crates/minimald/src/box_runtime.rs
    • crates/minimald/src/box_runtime/tests.rs
    • crates/minimald/src/build_boxes/tests.rs
    • crates/minimald/src/exec/tests.rs
    • crates/minimald/src/store.rs
    • crates/minimal/src/cmd/boxes/list.rs
    • crates/minimal/src/cmd/boxes/show.rs
    • crates/minimal/src/cmd/boxes/address.rs
    • crates/minimal/src/cmd/session.rs
Task marker
### D3754 — The box record keeps its name origin, and min box list and show return entry, project_name and name_origin
  kind: task
  size: L
  est: 340 code, 330 tests
  executor: agent
  origin: bug
  epic: 2236
  layers:
    - record:
      - crates/boxes/src/lib.rs: Record gains a serde-defaulted name_origin (written or derived, absent reads as written), plus project_name and entry if #3752 did not add them
      - crates/boxes/src/store.rs: rename sets name_origin to written beside the new name
      - crates/minimald/src/box_actor/naming.rs: the actor rename writes name_origin written on the new record
      test: cargo nextest run -p minimald record_keeps_name_origin_written_or_derived
    - daemon:
      - crates/minimald/src/box_manager.rs: create stamps name_origin from NameSource with the project name and entry, and box_listing_entry returns entry, project_name and name_origin
      - crates/minimald-rpc/src/lib.rs: BoxListingEntry gains serde-defaulted entry, project_name and name_origin, and the wire tests cover an old reply
      - crates/minimald/src/box_manager/tests.rs: adds the BOX-158, BOX-159 and legacy-record tests, and a test that a box process cannot write the fields (BOX-164)
      test: cargo nextest run -p minimald list_returns_every_retained_record_with_state_project_and_entry
      test: cargo nextest run -p minimald legacy_record_lists_and_reads_missing_name_fields_as_absent
    - literals:
      - crates/minimal-client/src/box_registration.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/cmd/box_audit.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/cmd/boxes/vm_host.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/cmd/mod.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/dash/render.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/dash/rpc.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/src/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimal/tests/dash_snapshots.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald-rpc/src/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_actor/host.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_actor/setup.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_actor/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_manager/composables.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_runtime.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/box_runtime/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/build_boxes/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/exec/tests.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      - crates/minimald/src/store.rs: each boxes::Record struct literal sets the new fields (name_origin written, project_name and entry absent), or uses a Record constructor that defaults them; no behaviour change
      test: cargo nextest run -p minimald box_manager
    - cli:
      - crates/minimal/src/cmd/boxes/list.rs: the table adds an ENTRY column after NAME and its PROJECT column shows project_name, falling back to the project root when absent (BCLI-001, spec 28); the min/v1/box object adds entry, project_name and name_origin, and its project stays the root
      - crates/minimal/src/cmd/boxes/show.rs: min box show renders project name, entry and name origin, and its min/v1/box object carries the three fields
      - crates/minimal/src/cmd/boxes/address.rs: stopped_vm_entries fills the new BoxListingEntry fields as absent and written
      - crates/minimal/src/cmd/session.rs: the BoxListingEntry literal in its tests sets the new fields
      test: cargo nextest run -p minimal box_json_carries_project_name_entry_and_name_origin
      test: cargo nextest run -p minimal box_show_renders_project_entry_and_name_origin
  proof: After the fix, min box list shows ID NAME ENTRY TYPE PARENT PROJECT STATE PROVIDER HOST. With -o json, each box object has entry, project_name and name_origin, and a renamed box reads as written.

Proof

min box list now prints the columns ID NAME ENTRY TYPE PARENT PROJECT STATE PROVIDER HOST. PROJECT shows the project name, or the project root for an old record. With -o json, each min/v1/box object carries entry, project_name and name_origin, and project stays the root. A box renamed with min box rename reads name_origin "written". min box show prints Name origin, Entry and Project name, and its -o json/yaml object has the same three fields.

Notes from the agent: crates/minimald/src/box_actor/setup.rs and crates/minimald/src/box_manager/composables.rs have no boxes::Record literal, so they did not change. Record gains project_name and entry, because #3752 did not add them. A new NameOrigin enum (written, derived) in the boxes crate is the type of name_origin on the record and on the wire. The daemon stamps project_name as the project name a derived name uses: the request's project name, else the project root directory name. It also does this when the request wrote the name. entry is the stored spec's entry key as written, so a session entry reads "default". It is absent when the box has no spec. A rename to the same name returns early in the store and leaves the origin unchanged. min box show widens its label column from 11 to 13 characters for 'Project name:'. That changed pinned spacing in list.rs tests and in three assertions in crates/minimal/src/tests.rs, and box_show_output_yaml_matches_json gained the three new keys. These are test-only edits in layer files. The BOX-164 test checks attrs and a planted record.json in the project directory. It does not run a process inside a real sandbox. Extra runs: cargo nextest run -p minimal (1278 passed), -p minimald-rpc (97 passed), -p boxes rename (16 passed), -p minimal-client box_registration (19 passed). clippy --all-targets is clean on boxes, minimald, minimald-rpc, minimal and minimal-client.

Tests

line exit tail
cargo nextest run -p minimald record_keeps_name_origin_written_or_derived 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network warning: unknown fields in task runtime-implement-test-3: network warning: unknown fields in task runt
cargo nextest run -p minimald list_returns_every_retained_record_with_state_project_and_entry 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network warning: unknown fields in task runtime-implement-test-3: network warning: unknown fields in task runt
cargo nextest run -p minimald legacy_record_lists_and_reads_missing_name_fields_as_absent 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network warning: unknown fields in task runtime-implement-test-3: network warning: unknown fields in task runt
cargo nextest run -p minimald box_manager 0 _keeps_name_origin_written_or_derived PASS [ 1.925s] (122/156) minimald box_manager::tests::prune_selectors_reap_and_print PASS [ 1.620s] (123/156) minimald box_manager::tests::reap_hands_name_to_retained_holder PASS [ 0.566s] (124/156) minimald box_manager::tests::rena
cargo nextest run -p minimal box_json_carries_project_name_entry_and_name_origin 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network warning: unknown fields in task runtime-implement-test-3: network warning: unknown fields in task runt
cargo nextest run -p minimal box_show_renders_project_entry_and_name_origin 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network warning: unknown fields in task runtime-implement-test-3: network warning: unknown fields in task runt

Verify

min task run agent-verify exited 101, so this PR is a draft.

uild-cache/cargo-home/build/debug/deps/libserial_test-8e7a105cb1948559.rlib --extern sha2=/work/build-cache/cargo-home/build/debug/deps/libsha2-1ef4ab62964b5cf6.rlib --extern size=/work/build-cache/cargo-home/build/debug/deps/libsize-0a8a7
8000
350b7e7e72e.rlib --extern stdlib=/work/build-cache/cargo-home/build/debug/deps/libstdlib-03fbd3589b073e70.rlib --extern switch=/work/build-cache/cargo-home/build/debug/deps/libswitch-6c812704e5da955c.rlib --extern sysinfo=/work/build-cache/cargo-home/build/debug/deps/libsysinfo-c713cd278cf33e00.rlib --extern tar=/work/build-cache/cargo-home/build/debug/deps/libtar-bb27b0a5d6ba0193.rlib --extern tempfile=/work/build-cache/cargo-home/build/debug/deps/libtempfile-abc317159fa85a66.rlib --extern thiserror=/work/build-cache/cargo-home/build/debug/deps/libthiserror-d936554554fa5dac.rlib --extern tokio=/work/build-cache/cargo-home/build/debug/deps/libtokio-13fd64194b408f82.rlib --extern tokio_util=/work/build-cache/cargo-home/build/debug/deps/libtokio_util-55bfa9e349d7b2c1.rlib --extern tokio_vsock=/work/build-cache/cargo-home/build/debug/deps/libtokio_vsock-721a779abb11ee8a.rlib --extern tracing=/work/build-cache/cargo-home/build/debug/deps/libtracing-83feaaf26e80a884.rlib --extern tracing_appender=/work/build-cache/cargo-home/build/debug/deps/libtracing_appender-4049512b24d27abd.rlib --extern tracing_opentelemetry=/work/build-cache/cargo-home/build/debug/deps/libtracing_opentelemetry-4bc00377a5611f16.rlib --extern tracing_subscriber=/work/build-cache/cargo-home/build/debug/deps/libtracing_subscriber-b9d261067ec6d0c0.rlib --extern uuid=/work/build-cache/cargo-home/build/debug/deps/libuuid-2ad4c678aa627cb6.rlib --extern version=/work/build-cache/cargo-home/build/debug/deps/libversion-26aec4f378b53f65.rlib --extern vsock=/work/build-cache/cargo-home/build/debug/deps/libvsock-28a991460262852d.rlib --extern vt100=/work/build-cache/cargo-home/build/debug/deps/libvt100-cfaab5484d385f52.rlib --extern walkdir=/work/build-cache/cargo-home/build/debug/deps/libwalkdir-8278203427ac3159.rlib --extern zstd=/work/build-cache/cargo-home/build/debug/deps/libzstd-587a39a8eee416fb.rlib -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-6abcf750100a3ada/out -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-nickel-4d55240ed02e956b/out -L native=/work/build-cache/cargo-home/build/debug/build/zstd-sys-0d91391d9ed43bde/out -L native=/work/build-cache/cargo-home/build/debug/build/ring-43aedddb25fbb121/out -L native=/work/build-cache/cargo-home/build/debug/build/aws-lc-sys-467e076f78a0a3c4/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-493bdc0df5a171ff/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-493bdc0df5a171ff/out` (exit status: 101)
error: command `/usr/bin/cargo '--color=auto' test --no-run --message-format json-render-diagnostics --package boxes --package minimal --package minimal-client --package minimald --package minimald-rpc --locked` exited with code 101

The record keeps name_origin (written or derived), project_name and
entry, stamped by the daemon at create. A rename sets the origin to
written. A record without the fields reads as written, with no project
name and no entry. ListBoxes and ShowBox return the three fields.
min box list adds an ENTRY column after NAME. Its PROJECT column shows
the project name, else the project root. min box show prints the name
origin, the entry and the project name. The min/v1/box object of both
carries entry, project_name and name_origin, and project stays the
root.
@coderabbitai
coderabbitai Bot commented Nov 25, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

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: 0bf834ba-9e3c-4244-b719-1cabee13c019

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

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

@agent-137
Copy link
Copy Markdown
Member

/arch-review

@agent-137
Copy link
Copy Markdown
Member

/review

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

Reviewed: 2 findings, none blocking at 2f65e0780fdd.

Address the comments on the diff.

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

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

< 10000 /tr>
let mut lines = vec![
("ID", record.box_id.to_string()),
("Name", or_none(record.name.clone())),
("Name origin", record.name_origin.to_string()),
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.

LOW · correctness · confidence 0.50 · in render_box_show

Name origin prints written for a box with no name, and for an old record that was derived. The code cannot prove either. The record default is Written for old records. Print - when the record has no name, so the line says only what the record holds.

What the reviewer checked

("Name origin", record.name_origin.to_string()), next to Name: - in the test output

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/cmd/boxes/show.rs
Lines:      566-566
Category:   correctness
Severity:   low (reviewer confidence 0.50)

Finding:
`Name origin` prints `written` for a box with no name, and for an old record that was derived. The code cannot prove either. The record default is `Written` for old records. Print `-` when the record has no name, so the line says only what the record holds.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

Disputed. Spec 29 BOX-158 (sub-bullet, line 348) requires it: "a missing name origin as written (BOX-228), in the listing and in BOX-159's read alike". So min box show printing written for an old record is the specified answer, not a guess. Every box has a name (BOX-163: the requested name, else a derived one), so the no-name case does not arise. Printing - would contradict BOX-158 and BOX-159.

@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 architecture.md §Addressing. The box record now holds the project name, the entry and the name origin (line 401). minimald alone stamps them at create (line 407). The list shows the project name as the box's project (line 1248). Both rename paths set the origin to written, and old records read as written with no project name and no entry. The Verify step in the PR body failed to compile. The last commit adds the missing test record, but CI must show that the head builds.

Ruled at 2f65e07 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

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

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 334a714 Nov 25, 2026
40 checks passed
@mitodrummer
mitodrummer deleted the agent/3785-the-box-record-keeps-its-name-origin-and-min-box branch November 25, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

0