8000 T18 — Render an entry's or a box's expanded spec by minimal-foundry[bot] · Pull Request #3290 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T18 — Render an entry's or a box's expanded spec - #3290

Merged
mitodrummer merged 9 commits into
mainfrom
agent/2906-render-an-entry-s-or-a-box-s-expanded-spec
Nov 12, 2026
Merged

mitodrummer merged 9 commits into
mainfrom
agent/2906-render-an-entry-s-or-a-box-s-expanded-spec

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T18 — Render an entry's or a box's expanded spec

slice: S5
kind: task
covers: BCLI-021, BCLI-022, BCLI-023
size: L
est: 340 code, 480 tests
executor: agent
difficulty: routine
model: standard
diagnostics: min box spec <entry> prints each value with the layer and type it came from, and a secret as its reference only, pinned by box_spec 8000 _renders_formats_secrets_as_refs
observability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cli.rs: the verb's arguments and help in the one command model
- crates/minimal/src/cmd/mod.rs: dispatches the verb
- crates/minimal/src/cmd/box_spec.rs: the entry and box forms, -o toml|json|yaml, the layer and type beside each value
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal box_spec_renders_formats_secrets_as_refs
test: cargo nextest run -p minimal box_spec_path_form_renders_bep_rows
test: cargo nextest run -p minimal box_spec_entry_network_flags_match_start
test: cargo nextest run -p minimal box_spec_box_renders_stored_copy
test: cargo nextest run -p minimal box_spec_argument_directory_then_entry_then_box
test: cargo nextest run -p minimal box_spec_renders_unenforced_sections
- daemon:
- crates/minimald-rpc/src/lib.rs: a GetBoxSpec request returns a box's stored spec (spec.json) to the client
- crates/minimald/src/box_manager.rs: answers GetBoxSpec from the box's stored spec.json
test: cargo nextest run -p minimald get_box_spec_returns_stored_spec
produces: none
consumes:
- crates/minimal/src/cmd/boxes/address.rs
proof: min box spec shows an entry's expanded spec before start and a box's stored spec after, with the source of every value.
depends on:
- blocked by #2895
- blocked by #2877
- blocked by #2878

Proof

In a project, min box spec <entry> prints the entry's expanded spec before any start, as TOML (default), JSON or YAML with -o. Each value names its source: the minimal.toml table that set it ([defaults], [sessions.default] and so on), the command line for an override flag, or the default. A secret prints as its reference only. With the same --network and egress flags, it prints the network that min box start sends. min box spec <box> prints the spec stored with the box's record. min box spec with no argument still prints the proxy rows for the project that --repo-dir names.

Notes from the agent: Outside the layers: crates/minimald/src/rpc.rs gains serve_get_box_spec and two dispatch lines for GetBoxSpec. A new RPC cannot be served without them.

Spec over task: the task's test name box_spec_argument_directory_then_entry_then_box says a directory is read first. The spec excerpt (BCLI-022 sub-bullet and the 2026-11-09 ruling) says the argument is never a directory, so the positional PATH is removed. The project form is only --repo-dir/-C now. The test keeps the task's name and checks that a directory path is read as a box address (exit 4). docs/reference/cli-min.md line 589 still documents min box spec [--network ...] [PATH]. That file is not in the layers, so a follow-up must update it.

How the entry form matches start: start does not yet send the expanded spec (BOX-065 bytes). It sends BoxSpec v0, with network computed from the flags. So the entry form renders mfile::expand's spec and report, which is the expansion start uses for the daemon entry. Its [network] mode/egress/ingress are then replaced with the values that project_egress, effective_egress, flag_network_overrides and network_override_policy give, the same calls start makes. For a session entry with no --network, the mode is the start default (host_ip), because start ignores the entry's network.mode (#3238). Task entries follow the min box run rule (flag, then file, then defaul…[truncated]

Tests

line exit tail
cargo nextest run -p minimal box_spec_renders_formats_secrets_as_refs 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_spec_path_form_renders_bep_rows 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_spec_entry_network_flags_match_start 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_spec_box_renders_stored_copy 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_spec_argument_directory_then_entry_then_box 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_spec_renders_unenforced_sections 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 get_box_spec_returns_stored_spec 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 timed out after 1800s, so this PR is a draft.

crates/mlog)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking google-cloud-lro v1.11.0
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling serial_test_derive v4.0.1
    Checking google-cloud-storage v1.20.0
    Checking serial_test v4.0.1
    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 mfile v0.0.1 (/workbench/crates/mfile)
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking decode v0.0.1 (/workbench/crates/decode)
    Checking checkouts v0.0.1 (/workbench/crates/checkouts)
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking graph v0.0.1 (/workbench/crates/graph)
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 16s
   Compiling opentelemetry v0.33.1
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimald/src/rpc.rs

Closes #2906

min box spec <box> reads the spec stored beside the box's record
(spec.json). The RPC name joins the dispatch table in rpc.rs.
An argument is an entry of the project that --repo-dir names, else a
box address. The entry form expands the entry, applies the override
flags as min box start does, and names the layer of each value. The box
form reads the stored spec with GetBoxSpec. Both write toml, json or
yaml with -o. With no argument, the proxy rows render as before.
@coderabbitai
coderabbitai Bot commented Nov 11, 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: c1887bfc-2aa0-4a80-9cca-06490207a446

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

@agent-137
Copy link
Copy Markdown
Member

Undrafted by the BCLI babysitter under the owner's standing rules. The only file outside layers: is crates/minimald/src/rpc.rs, which routes the new GetBoxSpec request to its handler, and the change needs it. The runtime's test lines lack nextest. CI is the gate.

@agent-137
agent-137 requested a review from a team as a code owner November 11, 2026 18:45
@minimal-foundry
minimal-foundry Bot commented Nov 11, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: 1 finding, none blocking at af61b5aeff0d.

Address the comments on the diff.

Clobber: none found.

@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/minimal/src/cmd/box_spec.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 box form, the GetBoxSpec RPC and the secret redaction conform to the design. The entry form drops --loadout. A task entry renders where min box start refuses with exit 2 (C1). A session entry renders with a loadout that start cannot resolve (C2). Line 1234 says the render is exactly what the host receives. The removed path form also breaks scripts/session-e2e.sh at lines 14374 and 14650 (C3). The CLI reference still documents [PATH], and no issue tracks that (C4).

Outside the diff

  • scripts/session-e2e.sh:14374: C3 · This call passes a directory as the positional argument. After this PR, the argument reads as a box address and exits 4. Change it to mnl box spec --repo-dir "$GRANT_SEED_DIR".
  • scripts/session-e2e.sh:14650: C3 · This is the same removed path form. Change it to mnl box spec --repo-dir "$GRANT_SEED_DIR".
  • docs/reference/cli-min.md:589: C4 · This line documents the removed grammar. Document the entry, box and no-argument forms, with -o and --repo-dir.

Ruled at 00018a0 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
@agent-137
Copy link
Copy Markdown
Member

/revise

Head 00018a01. Merge main first: this PR conflicts with it. Then meet arch ruling 1141's four conditions.

1. C1: min box spec <task entry> --loadout refuses as start does.
In expand_entry() (crates/minimal/src/cmd/box_spec.rs), task branch: refuse a non-empty overrides.loadout with exit 2, naming --loadout, beside the existing --ingress refusal. min box spec build --loadout x then refuses as min box start build --loadout x does (StartEntryRefusal::FlagUnsupported, #3237). Add the case to box_spec_entry_network_flags_match_start, or add a new test.

2. C2: the session branch resolves the loadout selection as start does.
Use loadouts::resolve_active_loadouts(LoadoutSelection::from_flags(&overrides.loadout, false), &cfg, global) with the client config start reads. A missing or malformed loadout then fails min box spec <entry> with start's error, and renders nothing. Render the selected loadouts' names: a loadouts field beside entry and type in json/yaml, and a comment line in the TOML header. Pin both in a test. Folding the composed values into the spec stays the #3236 residual.

3. C3: scripts/session-e2e.sh moves to --repo-dir.
Change mnl box spec "$GRANT_SEED_DIR" at about lines 14374 and 14650 to mnl box spec --repo-dir "$GRANT_SEED_DIR". This PR removes the positional path, so those calls would read the directory as a box. Spec 28's Rollout puts this edit in this change.

4. C4: docs/reference/cli-min.md ### box spec.
Replace min box spec [--network <none|host_ip|own_ip>] [PATH] with the three forms this PR ships:

  • min box spec <entry>, with the override flags and -o toml|json|yaml;
  • min box spec <box>;
  • min box spec with no argument, for the proxy rows of the project that --repo-dir/-C names.

Reply on the arch threads with the commit. Run the whole minimal suite. A minimald test, box_runtime::tests::task_box_exits_with_code_and_output_after_client_drop, failed once on this head. If it passes on rerun, leave it.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #2906. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite: the coder changed nothing. every commit this round put on the branch above 00018a0 is a merge of the base branch, so it carries no work of its own

…entry-s-or-a-box-s-expanded-spec

# Conflicts:
#	crates/minimal/src/tests.rs
A task entry refuses --loadout with exit 2, as min box start refuses it.
A session entry resolves the loadout selection from the client config
that start reads, fails on a missing loadout with start's error, and
names the selected loadouts in each output format.
The reference shows the entry, box and project forms. The session e2e
names the demo project with --repo-dir, because a bare argument is now
an entry or a box, never a directory.
@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 entry and box forms conform in placement, flags, addressing and redaction. Two gaps remain in the machine-output contract. The -o json document of each form has no schema field, and section Output conventions line 381 requires min/v1/<type> on every object. Add ObjectType::Spec.schema() to both documents (C1). A failure under min box spec -o json prints plain text, because machine_output_mode() in main.rs has no arm for box spec. Line 383 requires one min/v1/error object on stderr. Add the arm (C2).

Outside the diff

  • crates/minimal/src/main.rs:627: C2 · machine_output_mode() has no arm for BoxCommand::Spec. A min box spec -o json failure is then plain text. Line 383 requires one min/v1/error object on stderr. Add the arm for -o json and -o yaml, and add a test case.

Ruled at 1eda4a9 against gominimal/arch@15b603e6afb8 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 — 4 findings, 4 inline.

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

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

Round 2 of 10 on a /revise note, pushed as 1eda4a95b10d.

Resolved conflicts in: crates/minimal/src/tests.rs

line exit tail
cargo nextest run -p minimal box_spec_renders_formats_secrets_as_refs 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_spec_path_form_renders_bep_rows 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_spec_entry_network_flags_match_start 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_spec_box_renders_stored_copy 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_spec_argument_directory_then_entry_then_box 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_spec_renders_unenforced_sections 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 get_box_spec_returns_stored_spec 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 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

               "span_id": "39ef86c636ccf21a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "3b44fa811fef1f3f",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "5b18de626a964184",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "5b18de626a964184",
                "queued_behind": "0",
                "span_id": "9633f2486e16de87",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "5b18de626a964184",
                "queued_behind": "0",
                "span_id": "d99ead366fc66c68",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "d99ead366fc66c68",
                "span_id": "28841bdeb6f606f4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "d99ead366fc66c68",
                "queued_behind": "0",
                "span_id": "1f0b7a6f8119ac1c",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   2.345s] (1101/2644) minimald box_actor::tests::a_box_nobody_handed_an_address_publishes_at_the_answerers_grant
        PASS [   2.329s] (1102/2644) minimald box_actor::tests::a_contended_walk_never_replaces_a_present_verdict
        PASS [   2.404s] (1103/2644) minimald box_actor::tests::a_box_re_registered_inside_the_landing_window_keeps_its_grant
────────────
     Summary [  67.983s] 1103/2644 tests run: 1102 passed, 1 failed, 28 skipped
        FAIL [   3.224s] (1100/2644) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
warning: 1541/2644 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

Outside the task's layers::

  • crates/minimald/src/rpc.rs
  • docs/reference/cli-min.md
  • scripts/session-e2e.sh

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

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:507: A task entry now refuses --loadout with exit 2, as start does. A session entry resolves the selection with resolve_active_loadouts and names the loadouts in the render. Commit 00fd111.
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:611: The task branch of expand_entry refuses --loadout with exit 2 and names the flag, next to --ingress. box_spec_entry_network_flags_match_start pins it against plan_start's FlagUnsupported.
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:663: The session branch calls resolve_active_loadouts with the client config that start reads, so a missing loadout fails with start's error. The names render as loadouts in json/yaml and as a TOML header comment.

min box spec <entry> shows the entry's expanded spec before start, with the layer of each value and the loadouts that start applies. min box spec <box> shows the spec stored with the box. A task entry refuses --loadout and --ingress as min box start does.

Notes from the agent: Revise round 2. The merge of origin/main conflicted only in crates/minimal/src/tests.rs. Both sides appended tests, so the resolution keeps both, and the merge commit completes it. C1: the task branch of expand_entry refuses --loadout with exit 2, next to --ingress. box_spec_entry_network_flags_match_start checks that start refuses both flags too. C2: the session branch reads the client config with crate::config::read_client_config and calls loadouts::resolve_active_loadouts(LoadoutSelection::from_flags(&overrides.loadout, false), ...). A missing loadout fails with start's error. The selected names render as a loadouts field in json/yaml and as a # Loadouts: ... header line in TOML. A task entry renders no loadouts field. The new test box_spec_entry_loadouts_resolve_as_start pins this. The yaml assertion in box_spec_renders_formats_secrets_as_refs now expects the loadouts key. The composed loadout values are still not in the spec (#3236). C3 and C4 touch files outside the task's layers, at the person's explicit request: scripts/session-e2e.sh and docs/reference/cli-min.md. The script had three mnl box spec "$GRANT_SEED_DIR" calls (lines 14374, 14651, 15233), and all three now pass --repo-dir. The third call was not in the note but has the same defect. I did not run just lint-prose, because vale is not installed on this box. I did not run the e2e script (it needs a VM lane). I did not post replies on the arch threads, because I have no credential. The runtime posts the thread verdicts below. I did not run just clippy-strict.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 11, 2026 20:48
Add the min/v1/spec schema to the -o json and yaml documents of both
forms. Show only a stored grant's reference keys in the box form. Parse
an entry's grants before the render strips them, so a grant that
min box start refuses is refused here too. Quote YAML scalars outside a
narrow safe set. Read the argument as a box address when minimal.toml
does not load, and keep the project file error when no box matches.
@agent-137
agent-137 marked this pull request as ready for review November 11, 2026 21:45
@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 schema stamp, the stored-grant filter, the grant parse and the YAML quoting conform to lines 381 and 384. The new fallback in box_spec_to() does not conform. When minimal.toml does not load, it reads every target as a box address. A bare name is an entry first, and line 476 says the entry form exits 3 on an invalid file. With [tasks.build and a box named build, the command now shows the box and exits 0. Apply C1 to limit the fallback to a qualified address, a full id or self. Apply C2 to make the test prove that rule.

Ruled at 69b7227 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

Comment thread crates/minimal/src/cmd/box_spec.rs Resolved
Comment thread crates/minimal/src/tests.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/minimal/src/cmd/box_spec.rs Resolved
@agent-137
Copy link
Copy Markdown
Member

/revise

Head 69b7227b. Arch ruling 1154 has two conditions. Change nothing else.

1. C1: an invalid project file blocks the entry form, not a box address.
In box_spec_to() (crates/minimal/src/cmd/box_spec.rs), Err(project_error) arm (about lines 259–282): take the box form only when target can't be an entry name. That is when one of these holds:

  • super::box_verbs::parse_box_address(&target) is BoxAddress::Qualified;
  • boxes::SessionId::parse_str(&target) is Ok;
  • target == "self".

For every other target, return Err(project_error) (exit 3) before ensure_daemon and before any box lookup. Keep the override-flag check and the tracing::info! with outcome = "project file invalid" on the refusal path.

2. C2: the test pins both halves.
In box_spec_argument_directory_then_entry_then_box (crates/minimal/src/tests.rs, about lines 15260–15275), with the invalid [tasks.build file:

  • min box spec build fails with crate::ProjectFileInvalid (exit 3), even though box build exists;
  • min box spec <id_text>, the box's full id, renders # The spec box {id} was created with. past the invalid file.

Keep the nothing-here assertion.

Reply on the arch threads with the commit. Run the whole minimal suite.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #2906. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

…entry-s-or-a-box-s-expanded-spec

# Conflicts:
#	crates/minimal/src/tests.rs
With a minimal.toml that does not load, min box spec takes the box form
only for a qualified address, a full box id or self. Any other target
can name an entry, so it fails with the project file error (exit 3).
@agent-137
Copy link
Copy Markdown
Member

/revise

Head 69b7227b. needs-human was removed after the reaped job (owner's OK, 2026-11-12). This repeats the held note above so a round starts. First merge main, since the PR conflicts with it. Then meet arch ruling 1154 C1 and C2 exactly as the held /revise above says: refuse the entry form with exit 3 on an invalid project file before any box lookup, and pin both halves in box_spec_argument_directory_then_entry_then_box.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #2906. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as af61b5aeff0d.

Resolved conflicts in: crates/minimal/src/tests.rs

line exit tail
cargo nextest run -p minimal box_spec_renders_formats_secrets_as_refs 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_spec_path_form_renders_bep_rows 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_spec_entry_network_flags_match_start 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_spec_box_renders_stored_copy 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_spec_argument_directory_then_entry_then_box 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_spec_renders_unenforced_sections 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 get_box_spec_returns_stored_spec 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 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

-home/build/debug/deps/libserial_test-616c86b3b044ed08.rlib --extern sha2=/work/build-cache/cargo-home/build/debug/deps/libsha2-405f5187d962ed1a.rlib --extern size=/work/build-cache/cargo-home/build/debug/deps/libsize-e57ebc05cac6ccb3.rlib --extern stdlib=/work/build-cache/cargo-home/build/debug/deps/libstdlib-f3b17164c250397c.rlib --extern switch=/work/build-cache/cargo-home/build/debug/deps/libswitch-0af40ca30538ccd4.rlib --extern sysinfo=/work/build-cache/cargo-home/build/debug/deps/libsysinfo-82e2106fbfb32fa0.rlib --extern tar=/work/build-cache/cargo-home/build/debug/deps/libtar-d8cf8e5bef99c1a6.rlib --extern tempfile=/work/build-cache/cargo-home/build/debug/deps/libtempfile-64539d81e127ad8f.rlib --extern thiserror=/work/build-cache/cargo-home/build/debug/deps/libthiserror-31ad7b029b93b712.rlib --extern tokio=/work/build-cache/cargo-home/build/debug/deps/libtokio-a9eca338333a2325.rlib --extern tokio_util=/work/build-cache/cargo-home/build/debug/deps/libtokio_util-c623093db2043123.rlib --extern tokio_vsock=/work/build-cache/cargo-home/build/debug/deps/libtokio_vsock-1b22471493ad6549.rlib --extern tracing=/work/build-cache/cargo-home/build/debug/deps/libtracing-be36af57e81cc6b6.rlib --extern tracing_appender=/work/build-cache/cargo-home/build/debug/deps/libtracing_appender-a781743e4fae0de5.rlib --extern tracing_opentelemetry=/work/build-cache/cargo-home/build/debug/deps/libtracing_opentelemetry-75005db83331e3e9.rlib --extern tracing_subscriber=/work/build-cache/cargo-home/build/debug/deps/libtracing_subscriber-ac6841183ad66e15.rlib --extern uuid=/work/build-cache/cargo-home/build/debug/deps/libuuid-19bd2dbddf178337.rlib --extern version=/work/build-cache/cargo-home/build/debug/deps/libversion-ee2066c0d67b2e56.rlib --extern vsock=/work/build-cache/cargo-home/build/debug/deps/libvsock-c2be0d0dc103bb93.rlib --extern vt100=/work/build-cache/cargo-home/build/debug/deps/libvt100-060d3379d50b0dbc.rlib --extern walkdir=/work/build-cache/cargo-home/build/debug/deps/libwalkdir-78bf723f3e841c1f.rlib --extern zstd=/work/build-cache/cargo-home/build/debug/deps/libzstd-b7c20e74c54f6308.rlib -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-64b47a9d246aab62/out -L native=/work/build-cache/cargo-home/build/debug/build/tree-sitter-nickel-50eec70fb8e68069/out -L native=/work/build-cache/cargo-home/build/debug/build/zstd-sys-3df630743cf715ff/out -L native=/work/build-cache/cargo-home/build/debug/build/ring-3c60c1595d114743/out -L native=/work/build-cache/cargo-home/build/debug/build/aws-lc-sys-4c33c964f163c571/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-12a86e91b52050e7/out -L native=/work/build-cache/cargo-home/build/debug/build/blake3-12a86e91b52050e7/out` (exit status: 2)
warning: build failed, waiting for other jobs to finish...
error: command `/usr/bin/cargo '--color=auto' test --no-run --message-format json-render-diagnostics --package minimal --package minimald --package minimald-rpc --locked` exited with code 101

Outside the task's layers::

  • crates/minimald/src/rpc.rs
  • docs/reference/cli-min.md
  • scripts/session-e2e.sh

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

Review threads the coder judged:

  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:567: Already so at this head: the entry form inserts "schema" with ObjectType::Spec.schema() before write_document() (box_spec.rs line 568), and a test asserts it.
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:876: Already so at this head: the box form inserts "schema" (box_spec.rs line 877), and box_spec_box_renders_stored_copy asserts doc["schema"] equals ObjectType::Spec.schema().
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:985: Already so at this head: yaml_string writes a string plain only in a narrow safe set. It compares typed words case-insensitively. yaml_string_quotes_text_that_reads_as_another_type pins True, NO, Yes, Null, -, 0x1F, 1_000, .inf and a date.
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs: Already so at this head, as arch ruling 1154 narrows it: in af61b5a an invalid minimal.toml falls back to the box form only for a qualified address, a full box id or self. A bare name gets the project file error (exit 3).
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:784: Already so at this head: entry_spec parses the grants into SecretGrants before fields.retain runs (box_spec.rs lines 776-785). So min box spec refuses a grant with an unknown key, as min box start does.
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:260: af61b5a: with an invalid minimal.toml, only a qualified address, a SessionId or self takes the box form. Other targets return the project file error before ensure_daemon.
  • 👍 valid — crates/minimal/src/tests.rs:15872: af61b5a: the test asserts ProjectFileInvalid for build and checks that the box's full id renders past the invalid file. It keeps the nothing-here assertion.
  • 👎 invalid — crates/minimal/src/cmd/box_spec.rs:903: TOML has no null and no integer above i64::MAX, so the default TOML render cannot show those values. -o json and -o yaml show the stored spec exactly. This round's /revise note limited the change to ruling 1154, so json_to_toml is unchanged.

min box spec shows an entry's expanded spec before start and a box's stored spec after, with the source of every value. With a minimal.toml that does not load, min box spec <name> now fails with the project file error (exit 3). A full box id, a qualified address or self still shows the box's stored spec.

Notes from the agent: The merge with origin/main had a conflict in crates/minimal/src/tests.rs. Both sides only added tests (the box spec tests and concept_and_reference_docs_use_no_removed_session_verb), so the merge commit b1fdde6 keeps both. The other files in the merge diff come from main. The fix for C1 and C2 is commit af61b5a. I ran the six minimal test lines once, as part of the whole minimal suite, so only one of them has its own run. The directive said to change nothing else, so I did not change json_to_toml (see its thread).

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 12, 2026 01:00
@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/minimal/src/cmd/box_spec.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 last commit makes an invalid minimal.toml block the entry form. A bare name now fails with exit 3, and only a full box id or a qualified address reads as a box. This matches the exit 3 that architecture.md line 476 gives an invalid file, and it fails closed. The earlier conditions stay met, and the merge from main does not touch this path. One residual stays open: the entry render does not fold loadout values yet (#3236).

Ruled at af61b5a against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on a /revise note: the coder changed nothing. every commit this round put on the branch above af61b5a is a merge of the base branch, so it carries no work of its own

@agent-137
agent-137 marked this pull request as ready for review November 12, 2026 01:15
@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 12, 2026
Merged via the queue into main with commit 438af70 Nov 12, 2026
37 checks passed
@mitodrummer
mitodrummer deleted the agent/2906-render-an-entry-s-or-a-box-s-expanded-spec branch November 12, 2026 02:30
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.

T18 — Render an entry's or a box's expanded spec

2 participants

0