8000 test(minimal): T21 — Specs, types and entries inspected, end to end by minimal-foundry[bot] · Pull Request #3338 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

test(minimal): T21 — Specs, types and entries inspected, end to end - #3338

Draft
minimal-foundry[bot] wants to merge 3 commits into
mainfrom
agent/2914-specs-types-and-entries-inspected-end-to-end
Draft

minimal-foundry[bot] wants to merge 3 commits into
mainfrom
agent/2914-specs-types-and-entries-inspected-end-to-end

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T21 — Specs, types and entries inspected, end to end

slice: S5
kind: integration
covers: none
size: S
est: 20 code, 100 tests
executor: agent
difficulty: routine
model: light
diagnostics: when the end-to-end test fails, it prints each command it ran with that command's stdout, stderr and exit code
observability: the test run's spans show the expansion each render reads
layers:
- tests:
- crates/minimal/src/tests.rs: the slice's end-to-end test over a test daemon
test: cargo nextest run -p minimal spec_type_init_end_to_end
produces: none
consumes: none
proof: Render an entry's or a box's expanded spec with the layer and type of each value, list and show the types, and scaffold or append entries with min init.
depends on:
- blocked by #2906
- blocked by #2899
- blocked by #2893

Proof

In one test run over a test daemon, a person can see these steps. Bare min init scaffolds minimal.toml. min init --type appends the entries default (session), build (task) and web (the project type rust-dev). min type list shows the six built-in types and rust-dev with source project. min type show rust-dev names the source of each default and constraint. min box spec dev and min box spec web render the expanded spec with the entry's type in the header and the layer of each value, for example packages from [defaults.session]. min box spec -o json renders the spec stored with a box created on the daemon. The log shows each render inside the test span, with the entry or box id it read. On a failure, the test prints each command with its stdout, stderr and exit code.

Notes from the agent: Gaps found, outside this task's layers. The test asserts only what the branch delivers. (1) min box spec does not apply the type-defaults layer: expand_entry in crates/minimal/src/cmd/box_spec.rs builds Layers with no type_defaults. So the timeout = "30m" that [box_types.rust-dev.defaults] sets does not appear in min box spec web, although min type show rust-dev lists it. The label 'type defaults' is therefore never printed. The start path in crates/minimal/src/cmd/boxes/create.rs also does not apply the layer, so the render and the start agree. (2) min session start web, for an entry of a project type, is refused: the start cannot tell whether it is a session entry. (3) A session start by name takes only the entry 'default'. So the box form is proven with a box created from a 'default' entry that min init appends. The proof says 'the layer and type of each value'. The entry's type is in the render header, and the layer is beside each value. A per-value type label needs gap (1) fixed first. clippy -p minimal --all-targets reported nothing on the new lines.

Tests

line exit tail
cargo nextest run -p minimal spec_type_init_end_to_end 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.

Verify

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

 {
                "parent_span_id": "e2a615cdf9a26477",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "33565fd384dedaff",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "33565fd384dedaff",
                "queued_behind": "0",
                "span_id": "7a2713db6f574f7d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "e2a615cdf9a26477",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "ec2a8f29d6476b3a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "ec2a8f29d6476b3a",
                "queued_behind": "0",
                "span_id": "6f8eca35b89d2a34",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "ec2a8f29d6476b3a",
                "queued_behind": "0",
                "span_id": "6fa15c499f2821ff",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "6fa15c499f2821ff",
                "span_id": "fd11aa40d626ba4b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "6fa15c499f2821ff",
                "queued_behind": "0",
                "span_id": "541934650302d8e7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  96.711s] 1098 tests run: 1097 passed, 1 failed, 2 skipped
        FAIL [   4.156s] (1098/1098) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Closes #2914

One test scaffolds and appends entries with min init, lists and shows
the types, renders entry and box specs over a test daemon, and checks
that each render's span names the expansion it read.
@coderabbitai
coderabbitai Bot commented Nov 12, 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: e0821410-9586-4a18-b8ed-18fdf1acda03

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 fixin 8000 g CodeRabbit findings and required CI, and resolving merge conflicts

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

Reviewed: no findings; approval withheld, 2 threads unresolved at d256b3c6e67e.

APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimal/src/tests.rs, minimal-foundry[bot] crates/minimal/src/tests.rs:18427. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

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

Clobber: none, since the diff only adds lines.

@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 · 1 condition · the full ruling

The test conforms for min init, min type and the stored-spec render. It also records a design gap: min box spec <entry> does not apply the Box Type defaults layer. Lines 1231 and 1281 of architecture.md put that layer in every expansion. The test comment calls the gap an interim, but no issue tracks it. Make the change in C1: file the issue, link it in the comment and the PR body, and state the flip assertion.

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

Comment thread crates/minimal/src/tests.rs Outdated
};
std::fs::create_dir_all(project.path().join("config")).unwrap();
// The type's own defaults (`timeout` here) are not asserted: the CLI
// expansion does not apply the type-defaults layer yet.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This comment records an interim with no issue. architecture.md lines 1231 and 1281 put the Box Type defaults layer in every expansion. File an issue for expand_entry and the start path, and link it here. Then state the flip: when the issue closes, add the timeout = "30m" needle and its layer label for web.

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.

Addressed in d256b3c6e67e: Rewrote the comment: it names the code that skips the type-defaults layer (expand_entry builds Layers::default()) and the web needle to add when it lands. I cannot file issues from this runner, so a person must file one and link it there.

@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 on lines +18412 to +18422
] {
assert!(
log.lines()
.any(|line| line.contains("spec_type_init_end_to_end{")
&& line.contains("verb=\"box spec\"")
&& line.contains(&format!("{field}={value}"))
&& line.contains("outcome=\"ok\"")),
"a `box spec` ok event for {field} {value} in the span\n{log}\n{ran}"
);
}
}
Copy link
Copy Markdown
Contributor Author

8000 Choose a reason for hiding this comment

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

MEDIUM · correctness · confidence 0.70 · in spec_type_init_end_to_end

The entry span field is a &str, so the fmt subscriber prints it quoted: entry="dev". The assertion searches for entry=dev without quotes, so the two entry cases will never match and the test will fail at the end. Only the box_id case (recorded with %) prints unquoted. Match entry="dev" for the string fields, or record entry with %.

What the reviewer checked

line.contains(&format!("{field}={value}")) with field "entry", value "dev"; compare tests.rs:9503 span format box_id=\"{id}\" for a string field

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

File:       crates/minimal/src/tests.rs
Lines:      18412-18422
Category:   correctness
Severity:   medium (reviewer confidence 0.70)

Finding:
The `entry` span field is a `&str`, so the fmt subscriber prints it quoted: `entry="dev"`. The assertion searches for `entry=dev` without quotes, so the two entry cases will never match and the test will fail at the end. Only the `box_id` case (recorded with `%`) prints unquoted. Match `entry="dev"` for the string fields, or record `entry` with `%`.

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
Contributor Author

Choose a reason for hiding this comment

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

Disputed — not addressed: The matched line is the ok event at cmd/box_spec.rs:596, which records entry = %rendered.entry, so it prints entry=dev unquoted. The test passes: cargo nextest run -p minimal spec_type_init_end_to_end, 1 passed.

Name the code that skips the Box Type defaults layer, and the needle to add for web when that layer lands.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p minimal spec_type_init_end_to_end 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Applying loadouts: default Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "c7fa4da7bb2ba812",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "f4fdcd9c9dfdde66",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "f4fdcd9c9dfdde66",
                "queued_behind": "0",
                "span_id": "06797b9188d67280",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "c7fa4da7bb2ba812",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "481e5a61536c83cb",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "481e5a61536c83cb",
                "queued_behind": "0",
                "span_id": "506ef08114905a95",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "481e5a61536c83cb",
                "queued_behind": "0",
                "span_id": "9a707f6889fcffef",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "9a707f6889fcffef",
                "span_id": "0ae20948f30196af",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "9a707f6889fcffef",
                "queued_behind": "0",
                "span_id": "753da74f0c28c446",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  62.800s] 1099 tests run: 1098 passed, 1 failed, 2 skipped
        FAIL [   2.781s] (1099/1099) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

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

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/tests.rs: Rewrote the comment: it names the code that skips the type-defaults layer (expand_entry builds Layers::default()) and the web needle to add when it lands. I cannot file issues from this runner, so a person must file one and link it there.
  • 👎 invalid — crates/minimal/src/tests.rs:18427: The matched line is the ok event at cmd/box_spec.rs:596, which records entry = %rendered.entry, so it prints entry=dev unquoted. The test passes: cargo nextest run -p minimal spec_type_init_end_to_end, 1 passed.

One test in crates/minimal/src/tests.rs runs the whole flow against a test daemon. It scaffolds and appends entries with min init. It lists and shows the types with min type list and min type show. It renders an entry's spec and a stored box spec with min box spec, with the layer and type of each value. A person can run cargo nextest run -p minimal spec_type_init_end_to_end and see it pass. When it fails, it prints each command with its stdout, stderr and exit code.

Notes from the agent: Revise round 1. Thread PRRT_kwDOPdfcxM622MBf asks for a filed issue. This box has no gh credential, so I could not file one. The test comment now names the gap (expand_entry in cmd/box_spec.rs and the start path build Layers::default() with no type_defaults) and the exact needle to add for web when the layer lands. A person must file the issue and add its number to that comment. The fix for the expansion itself is outside this task's layers (crates/minimal/src/cmd/box_spec.rs).

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 12, 2026 22:06
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
8BD0
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: 2 unresolved threads — minimal-arch[bot] crates/minimal/src/tests.rs, minimal-foundry[bot] crates/minimal/src/tests.rs:18427. No findings.

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

@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 test is in the correct layer and proves min init, min type list and both min box spec forms. Two things block it. The Box Type defaults layer (architecture.md line 1231) is missing from the CLI expansion. The test calls this an interim, but no issue tracks it. File the issue and link it in the comment, as C1 says. The proof also says that min type show rust-dev names the source of each default and constraint, but the test asserts only the header. Add the needles in C2.

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

..daemon_global.clone()
};
std::fs::create_dir_all(project.path().join("config")).unwrap();
// Interim, with no tracking issue yet: architecture.md puts the Box Type
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This interim has no issue. Architecture.m D80D d line 1231 puts the Box Type defaults layer in every expansion, and expand_entry omits it. File an issue for the layer. Replace "with no tracking issue yet" with the issue URL, and keep the flip condition.

i32::from(shown.is_err()),
);
let shown = shown.unwrap_or_else(|_| panic!("the type shows\n{ran}"));
for line in [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · The proof says this command names the source of each default and constraint (architecture.md line 463). These needles check only the header. Add the timeout = "30m" default with from rust-dev (project), and one constraint with from session (builtin).

This branch has not been deployed

No deployments
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.

T21 — Specs, types and entries inspected, end to end

0 participants

0