8000 T55 — Build the CLI's and the VM tests' create requests through the same constructor by minimal-foundry[bot] · Pull Request #2480 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T55 — Build the CLI's and the VM tests' create requests through the same constructor - #2480

Merged
mitodrummer merged 2 commits into
mainfrom
agent/2384-build-the-cli-s-and-the-vm-tests-create-requests
Oct 21, 2026
Merged

mitodrummer merged 2 commits into
mainfrom
agent/2384-build-the-cli-s-and-the-vm-tests-create-requests

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T55 — Build the CLI's and the VM tests' create requests through the same constructor

slice: S0
kind: enablement
covers: none
size: M
est: 120 code, 160 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none: test literals only, no behaviour
observability: none: test literals only, no signal
layers:
- cli:
- crates/minimal/src/cmd/boxes/create.rs: constructor
- crates/minimal/src/task.rs: constructor
- crates/minimal/src/dash/rpc.rs: constructor
- crates/minimal/src/tests.rs: constructor
- crates/minimal/tests/cli.rs: constructor
test: cargo nextest run -p minimal cli_create_requests_use_the_constructor
- vm-tests:
- crates/minvmd/tests/egress_allowlist_integration.rs: constructor
- crates/minvmd/tests/guest_classifier_integration.rs: constructor
- crates/minvmd/tests/minimald_session_integration.rs: constructor
- crates/minvmd/tests/vm_escape_integration.rs: constructor
test (deferred: vm): cargo nextest run -p minvmd guest_kernel_accepts_rendered_ruleset
produces: none
consumes: none
proof: Every client create request uses one constructor; activation unchanged.
depends on:
- blocked by #2381
- blocked by #2383

Proof

Every create request in the min CLI (min session activate, min task run, the dashboard's activate), in the minimal crate's test fixtures and in the four minvmd VM harnesses now comes from CreateSessionRequest::new. Each site sets only the fields that differ. The new test cli_create_requests_use_the_constructor fails on any struct literal for the request or its BoxConfig under crates/minimal/src or crates/minimal/tests. Activation is unchanged: every product create still sends this build as must_match_version, and the hooks, network, policy and registered addresses are the same as before. The full minimal suite passes (708 tests).

Notes from the agent: Deferred: cargo nextest run -p minvmd guest_kernel_accepts_rendered_ruleset (lane: vm). That test exists already and I did not run it. The four VM test files sit behind #![cfg(minvmd_libkrun)], and a plain clippy skips them. I type-checked them with LIBKRUN_PREFIX=/tmp/nokrun cargo clippy -p minvmd --tests, which sets the cfg without a link, and it was clean. The dashboard can send an unnamed box, and the constructor always sets a name. So dash::activate and the own_ip_config test helper call new with an empty name and then set config.name from the form. A constructor that takes an Option name is in minimald-rpc, which is outside this task's layers. The existing every_create_session_asserts_the_daemon_build inventory now keys on CreateSessionRequest::new( and on .must_match_version = ...version_assertion() assignments. It also lists dash/rpc.rs::own_ip_config as 'asserts nothing', with a comment, because that test helper builds a config that only a fake create closure receives. In create.rs and task.rs the version assertion is now computed once before the retry loop, not once for each attempt. It reads only the skew-override environment variable, so the value is the same. I ran the full minimal crate once at the end: 708 passed.

Tests

line exit tail
cargo nextest run -p minimal cli_create_requests_use_the_constructor 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-4602... 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 stdlib v0.0.22 (/workbenc

Verify

min task run agent-verify exited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

the sandbox ran rustc (1.98.1), the repository pins 1.97.0 in rust-toolchain.toml; a failure here may be the newer toolchain's, not this change's
Applying loadouts: default
Running task runtime-implement-verify in session task-runtime-implement-verify-0267...
    Checking opentelemetry v0.33.0
    Checking args v0.0.1 (/workbench/crates/args)
    Checking ot v0.0.1 (/workbench/crates/ot)
    Checking paths v0.0.1 (/workbench/crates/paths)
   Compiling version v0.8.0 (/workbench/crates/version)
    Checking switch v0.0.1 (/workbench/crates/switch)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking opentelemetry_sdk v0.33.0
    Checking tracing-opentelemetry v0.34.0
    Checking opentelemetry-http v0.33.0
    Checking opentelemetry-appender-tracing v0.33.0
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling serial_test_derive v4.0.1
    Checking google-cloud-gax-internal v0.7.20
    Checking opentelemetry-proto v0.33.0
    Checking google-cloud-longrunning v1.14.0
    Checking google-cloud-iam-v1 v1.13.0
    Checking opentelemetry-otlp v0.33.0
    Checking serial_test v4.0.1
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking google-cloud-lro v1.11.0
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking bep v0.0.1 (/workbench/crates/bep)
    Checking google-cloud-storage v1.20.0
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking boxes v0.0.1 (/workbench/crates/boxes)
    Checking sandbox v0.0.1 (/workbench/crates/sandbox)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking mfile v0.0.1 (/workbench/crates/mfile)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking graph v0.0.1 (/workbench/crates/graph)
error: using `chunks_exact` with a constant chunk size
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    |
help: consider using `as_chunks::<2>()` instead
   --> crates/minimald-rpc/src/trace.rs:199:46
    |
199 |     for (byte, pair) in out.iter_mut().zip(s.chunks_exact(2)) {
    |                                              ^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#chunks_exact_to_as_chunks
    = note: `-D clippy::chunks-exact-to-as-chunks` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::chunks_exact_to_as_chunks)]`

error: could not compile `minimald-rpc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Deferred

The plan marked these test lines deferred: the executor lacks the lane, so nothing here ran them and they still owe evidence.

line lane
cargo nextest run -p minvmd guest_kernel_accepts_rendered_ruleset vm

Closes #2384

The session and task creates, the dashboard's activate and the crate's
test fixtures now call CreateSessionRequest::new and set only the fields
that differ. A new test refuses any struct literal for the request or its
box config, and the version-gate inventory now keys on the constructor.
…ctor

The egress, classifier, session and escape harnesses call
CreateSessionRequest::new and set only the registered box id and
addresses where a test registers the box.
@coderabbitai
coderabbitai Bot commented Oct 21, 2026
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 011ffd0b-cf93-4895-9626-1dc8129d6609

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 21, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 248ca115e1eb.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none seen.

@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 design does not govern how the client build 8000 s a create request, so this is a PASS by absence, the same as #2472. All three product creates still send the same-build assertion. The VM harnesses send the same request as before. The deferred VM leg guest_kernel_accepts_rendered_ruleset did not run, and it stays open in CI.

Ruled at 248ca11 against gominimal/arch@109541a48c31 by claude-opus-5-5.

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

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 21, 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.

Babysit review on 248ca11 against T55's plan block. Every create in the plan's layers (create.rs, task.rs, dash/rpc.rs, tests/cli.rs and the four minvmd VM tests) now builds through CreateSessionRequest::new and sets only the fields that differ: hooks_enabled from --no-hooks, and the registration's addresses and box id. Each create path still sets must_match_version from version_assertion(), and the version-gate scan in src/tests.rs now looks for that assignment. The dashboard and its own_ip_config test helper set name back to the form's Option after the constructor, so an unnamed box still sends None, not Some(""). In create.rs, version_assertion() is now read once before the create loop, not on every retry, and it is constant for the process. The new literal scan keeps struct-literal creates from coming back. arch-review PASS.

@mitodrummer
mitodrummer added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 5eea194 Oct 21, 2026
37 checks passed
@mitodrummer
mitodrummer deleted the agent/2384-build-the-cli-s-and-the-vm-tests-create-requests branch October 21, 2026 20:30
bryan-minimal added a commit that referenced this pull request Oct 23, 2026
…an attach or an exec

The native daemon's control socket answers only the answerer verbs, so
asking it to re-hold a name was a refusal warned on every native attach
and exec's stderr (#2213). The re-hold is for Minvmd alone, as the
activation's hold is; every caller of box_via_ssh passes the daemon's
provider kind. Re-applied onto main's split CLI files (#2479, #2480).
bryan-minimal added a commit that referenced this pull request Oct 25, 2026
…an attach or an exec

The native daemon's control socket answers only the answerer verbs, so
asking it to re-hold a name was a refusal warned on every native attach
and exec's stderr (#2213). The re-hold is for Minvmd alone, as the
activation's hold is; every caller of box_via_ssh passes the daemon's
provider kind. Re-applied onto main's split CLI files (#2479, #2480).
yermakoffivan pushed a commit to yermakoffivan/minimal that referenced this pull request Oct 26, 2026
…an attach or an exec (gominimal#2225)

The native daemon's control socket answers only the answerer verbs, so
asking it to re-hold a name was a refusal warned on every native attach
and exec's stderr (gominimal#2213). The re-hold is for Minvmd alone, as the
activation's hold is; every caller of box_via_ssh passes the daemon's
provider kind. Re-applied onto main's split CLI files (gominimal#2479, gominimal#2480).
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.

T55 — Build the CLI's and the VM tests' create requests through the same constructor

1 participant

0