8000 T9 — Tasks run and waited on, end to end by minimal-foundry[bot] · Pull Request #3230 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T9 — Tasks run and waited on, end to end - #3230

Merged
agent-137 merged 3 commits into
mainfrom
agent/2902-tasks-run-and-waited-on-end-to-end
Nov 10, 2026
Merged

agent-137 merged 3 commits into
mainfrom
agent/2902-tasks-run-and-waited-on-end-to-end

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T9 — Tasks run and waited on, end to end

slice: S2
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: one span covers the run, the log follow and the wait of the same task
layers:
- tests:
- crates/minimal/src/tests.rs: the slice's end-to-end test over a test daemon
test: cargo nextest run -p minimal task_run_logs_wait_list_end_to_end
produces: none
consumes: none
proof: Run a task or an entry with min task run or min box run, see its output and exit code, follow its logs, wait for it, and still see it in min task list until a prune removes it.
depends on:
- blocked by #2892
- blocked by #2896
- blocked by #2897

Proof

A person can run cargo nextest run -p minimal task_run_logs_wait_list_end_to_end and see one task go through every step. min task run and min box run both parse to a run of the entry. The run gives back the entrypoint's stdout, stderr and exit code 3. min task logs check -f writes the task's output in order and ends when the prune removes the task. min box wait check returns when the task stops, with the code its record keeps. min task list shows the task as exited (exit 3) until min box prune removes it.

Notes from the agent: cargo-nextest is not installed here, so I ran the test line with cargo test -p minimal --lib <name>. The runner must still run the nextest line as written. The run half goes through the existing stand-in SSH entrypoint (stand_in_daemon), under the task box's id. It does not use the harness daemon, because minimald's mock launcher is cfg(test) inside minimald and a test in this crate cannot start a real entrypoint. The other steps use a native harness daemon (native_box_daemon). The test rewrites the stopped task's record.json to exited with exit code 3, as task_list_shows_exited_until_pruned does, so that the list shows the code that the run returned. Diagnostics: every assertion message carries a transcript of each command run so far, with its stdout, stderr and exit. Observability: one task_end_to_end tracing span, with the box id, wraps the run, the log follow and the wait. The spawned futures use in_current_span. rustfmt and cargo clippy -p minimal --all-targets are clean. I did not run just ci or the whole crate suite.

Tests

line exit tail
cargo nextest run -p minimal task_run_logs_wait_list_end_to_end 101 warning: unknown fields in [defaults] section of minimal.toml: session,task 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... error: no such command: 'nextest' help: a command with a simil

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.

the sandbox ran rustc (1.99.0), the repository pins 1.99.1 in rust-toolchain.toml; a failure here may be the newer toolchain's, not this change's
warning: unknown fields in [defaults] section of minimal.toml: session,task
help: do you need to update to a newer version of minimal?
Applying loadouts: default
Running task runtime-implement-verify in box runtime-implement-verify-1...
    Checking paths v0.0.1 (/workbench/crates/paths)
    Checking args v0.0.1 (/workbench/crates/args)
    Checking ot v0.0.1 (/workbench/crates/ot)
    Checking client-config v0.0.1 (/workbench/crates/client-config)
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
    Checking common v0.0.1 (/workbench/crates/common)
    Checking bep v0.0.1 (/workbench/crates/bep)
    Checking switch v0.0.1 (/workbench/crates/switch)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    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 minimal v0.8.0 (/workbench/crates/minimal)
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Finished `dev` profile [unoptimized] target(s) in 1m 20s
error: no such command: `nextest`

help: a command with a similar name exists: `test`

help: view all installed commands with `cargo --list`
help: find a package to install `nextest` with `cargo search cargo-nextest`

Closes #2902

One test drives a task through the run verbs, `min task logs -f`,
`min box wait`, `min task list` and `min box prune`. A failure prints
each command it ran with its stdout, stderr and exit.
@coderabbitai
coderabbitai Bot commented Nov 10, 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: 63e4615d-ab2b-4901-b370-81a466859482

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

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

Approved: every review thread resolved at d6bc3417d3e0.

@agent-137 resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@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 adds one end-to-end test and no product code. Each assertion matches the design. Line 494 of architecture.md says the run returns the entrypoint's stdio and exit code. Line 485 says min box wait returns the code. Line 502 says the record stays until a prune. The record rewrite and the stand-in run follow the rulings on #3184 and #3087. CI must still run the nextest line, because the sandbox did not have cargo-nextest.

Ruled at 4260d21 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 — 1 finding, 1 inline.

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

Comment thread crates/minimal/src/tests.rs Resolved
The end-to-end test now files the code the run ended with, not a
literal 3, and a second min box wait must return that code from the
record. The comment names the minimald test that pins the daemon's
filing of an entrypoint's exit code.
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

The new commit carries the run's exit code into the task record. A second min box wait must now return that code, and the list must show it. This matches lines 377 and 485 of architecture.md. The earlier PASS on 4260d21d stands for everything else. No conditions.

Ruled at d6bc341 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 — approval withheld

Verdict COMMENT — APPROVE withheld: 1 unresolved thread — minimal-foundry[bot] crates/minimal/src/tests.rs. No findings.

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

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

line exit tail
cargo nextest run -p minimal task_run_logs_wait_list_end_to_end 101 warning: unknown fields in [defaults] section of minimal.toml: session,task 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... error: no such command: 'nextest' help: a command with a simil

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.

.45
    Checking sha3 v0.12.0
    Checking ring v0.17.14
    Checking ml-kem v0.3.2
    Checking ratatui-core v0.1.2
    Checking heapless v0.9.3
    Checking mlog v0.0.1 (/workbench/crates/mlog)
    Checking ssh-key v0.7.0-rc.11
    Checking signal-hook-mio v0.2.5
    Checking generic-array v1.4.4
    Checking derive_more v2.1.1
    Checking russh-cryptovec v0.62.0
    Checking num-bigint v0.5.1
    Checking yasna v0.6.0
    Checking pem v4.0.0
    Checking russh-util v0.52.0
    Checking bitflags v1.3.2
    Checking tagptr v0.2.0
    Checking constcat v0.6.1
    Checking managed v0.8.0
    Checking hex-literal v1.1.0
    Checking hashbrown v0.14.5
    Checking lcache v0.0.1 (/workbench/crates/lcache)
    Checking smoltcp v0.14.0
    Checking russh v0.65.0
    Checking dashmap v6.2.1
    Checking minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
    Checking moka v0.12.16
    Checking rcgen v0.14.10
    Checking crossterm v0.29.0
    Checking async-compression v0.4.50
    Checking rcache v0.0.1 (/workbench/crates/rcache)
    Checking async-tar v0.6.1
    Checking line-clipping v0.3.8
    Checking object v0.40.0
    Checking serde_bytes v0.11.19
    Checking is_executable v1.0.6
    Checking russh-sftp v2.4.0
    Checking clap_complete v4.6.11
    Checking ratatui-widgets v0.3.2
    Checking bep v0.0.1 (/workbench/crates/bep)
    Checking switch v0.0.1 (/workbench/crates/switch)
    Checking sysinfo v0.39.6
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking ratatui-macros v0.7.2
    Checking diagnostics v0.0.1 (/workbench/crates/diagnostics)
    Checking op v0.0.1 (/workbench/crates/op)
    Checking ratatui-crossterm v0.1.2
    Checking fuzzy-matcher v0.3.7
    Checking ratatui v0.30.2
    Checking inquire v0.9.4
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking vsock v0.5.4
    Checking vte v0.15.0
    Checking wait-timeout v0.2.1
    Checking bit-vec v0.10.1
    Checking quick-error v1.2.3
    Checking rusty-fork v0.3.1
    Checking bit-set v0.11.1
    Checking vt100 v0.16.2 (https://github.com/gominimal/vt100-rust.git?rev=9b8cce5a6798daf061948259ebcb073bb1ea54a6#9b8cce5a)
    Checking tokio-vsock v0.7.2
    Checking check v0.0.1 (/workbench/crates/check)
    Checking orchestrator v0.0.1 (/workbench/crates/orchestrator)
    Checking async-dialog v0.0.1 (/workbench/crates/async-dialog)
    Checking rand_xorshift v0.5.0
    Checking core_detect v1.0.0
    Checking unarray v0.1.4
    Checking similar v2.7.0
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking proptest v1.12.0
    Checking insta v1.49.0
    Checking minimald v0.8.0 (/workbench/crates/minimald)
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 46s
error: no such command: `nextest`

help: a command with a similar name exists: `test`

help: view all installed commands with `cargo --list`
help: find a package to install `nextest` with `cargo search cargo-nextest`

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

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/tests.rs: The filed exit_code is now the code that the run returned, not a literal 3. A second min box wait on the ended task must return that code, and the list asserts on it too. The record is still written by hand, because the harness cannot run a real entrypoint. The comment now names the minimald test th

A person can read task_run_logs_wait_list_end_to_end and see one task run with min task run or min box run give back its output and exit code 3. It follows the task's logs and waits for the task. Then a second min box wait and min task list both show that same run code, and the task stays listed until min box prune removes it.

Notes from the agent: The test line cargo nextest run -p minimal task_run_logs_wait_list_end_to_end did not run, because this box has no cargo-nextest. I ran the same test with cargo test -p minimal --lib task_run_logs_wait_list_end_to_end, and it passed. The test still writes record.json by hand, because the harness daemon cannot start a real entrypoint. The daemon's filing of an entrypoint exit code is in minimald (box_actor.rs end_on_entrypoint_return), outside this task's layers. The minimald test until_complete_ends_on_entrypoint_return_without_client_records_exited already pins it.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 10, 2026 03:57
@agent-137
agent-137 marked this pull request as ready for review November 10, 2026 03:59
@agent-137
Copy link
Copy Markdown
Member

Undrafted by the BCLI babysitter. The draft comes only from the runtime's test lines failing with no such command: nextest, and the one file, crates/minimal/src/tests.rs, is inside layers:. That is the owner's standing rule for BCLI. CI is the gate.

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

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — every review thread is resolved; @agent-137 closed the last one. The review of d6bc3417d3e0 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 10, 2026
@agent-137
agent-137 added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit a2a3101 Nov 10, 2026
38 checks passed
@agent-137
agent-137 deleted the agent/2902-tasks-run-and-waited-on-end-to-end branch November 10, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T9 — Tasks run and waited on, end to end

2 participants

0