Skip to content

(MOT-4279) test(harness): validate shell coder and sandbox workflow - #635

Merged
ytallo merged 1 commit into
mainfrom
feat/mot-4279-shell-coder-sandbox
Jul 29, 2026
Merged

(MOT-4279) test(harness): validate shell coder and sandbox workflow#635
ytallo merged 1 commit into
mainfrom
feat/mot-4279-shell-coder-sandbox

Conversation

@ytallo

@ytallo ytallo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the shell_coder_sandbox real-model E2E scenario
  • validate 12 ordered operations across registry worker installation, Coder file handling, host Shell execution, and the Sandbox lifecycle
  • grade exact filesystem effects, exact host and sandbox output, operation ordering, function-call failures, and cleanup
  • give scenarios an isolated filesystem root and let dynamic worker installation update the isolated engine configuration
  • prepare KVM only for the sandbox scenario in CI and document the added coverage

Why

The quality suite did not exercise a full coding workflow across dynamically installed workers and an isolated microVM. This left worker readiness, cross-surface coordination, exact file mutations, and sandbox teardown without real-model regression coverage.

Impact

The new scenario becomes part of the code-defined CI matrix. It fails when the model skips or reorders required operations, uses the wrong execution surface, produces unexpected output, leaves a sandbox running, or records any function-call error.

Validation

  • cargo test -p harness-e2e (55 passed)
  • bash -n tests/e2e/run-ci.sh
  • git diff --check

Fixes MOT-4279

Summary by CodeRabbit

  • New Features

    • Added an end-to-end scenario covering worker setup, file operations, host execution, and isolated Python sandbox workflows.
    • Added scenario-specific filesystem configuration and workspace isolation.
  • Bug Fixes

    • Improved CI reliability by validating ports, configuring isolated runs, and ensuring required services are ready before testing.
    • Added automatic preparation of virtualization support where required.
  • Documentation

    • Documented the new scenario and clarified CI test coverage.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Jul 29, 2026 10:57pm
workers-tech-spec Ready Ready Preview Jul 29, 2026 10:57pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e8402c18-3f09-4cde-b4cb-4b573ad1db6e

📥 Commits

Reviewing files that changed from the base of the PR and between 0877b2d and 9688722.

📒 Files selected for processing (10)
  • .github/workflows/_harness-e2e.yml
  • harness/tests/e2e/README.md
  • harness/tests/e2e/run-ci.sh
  • harness/tests/e2e/src/scenarios/direct_answer.rs
  • harness/tests/e2e/src/scenarios/mod.rs
  • harness/tests/e2e/src/scenarios/persistent_state.rs
  • harness/tests/e2e/src/scenarios/reactive_automation/mod.rs
  • harness/tests/e2e/src/scenarios/security_review.rs
  • harness/tests/e2e/src/scenarios/shell_coder_sandbox.rs
  • harness/tests/e2e/src/suite.rs

📝 Walkthrough

Walkthrough

Adds a shell_coder_sandbox Harness E2E scenario covering worker installation, coder file operations, host execution, isolated sandbox execution, lifecycle cleanup, and filesystem-scoped metadata. CI now configures isolated ports and /dev/kvm.

Changes

Shell coder sandbox E2E flow

Layer / File(s) Summary
Isolated CI and virtualization setup
.github/workflows/_harness-e2e.yml, harness/tests/e2e/run-ci.sh, harness/tests/e2e/README.md
Configures isolated engine ports, waits for worker::add, prepares /dev/kvm, and documents the new scenario coverage.
Scenario registration and filesystem metadata
harness/tests/e2e/src/scenarios/mod.rs, harness/tests/e2e/src/scenarios/*.rs, harness/tests/e2e/src/suite.rs
Adds optional filesystem roots, registers the fifth scenario, updates existing specifications, and forwards filesystem metadata to E2E requests.
Ordered worker and execution evaluation
harness/tests/e2e/src/scenarios/shell_coder_sandbox.rs
Defines the scenario prompt and validates worker installation, coder file operations, host execution, and sandbox execution evidence.
Sandbox cleanup and scenario tests
harness/tests/e2e/src/scenarios/shell_coder_sandbox.rs
Cleans owned sandbox resources and workspaces, and tests prompt contents, lifecycle evidence, cleanup selection, and per-run naming.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant E2E Runner
  participant Engine
  participant Coder
  participant Shell
  participant Sandbox
  E2E Runner->>Engine: Send shell_coder_sandbox prompt
  Engine->>Engine: Expose worker::add
  Engine->>Coder: Install coder worker
  Engine->>Shell: Install shell worker
  Coder->>Coder: Create, update, move, and read Python file
  Shell->>Shell: Execute final Python file on host
  E2E Runner->>Sandbox: Create isolated Python sandbox
  Sandbox->>Sandbox: Execute Python and return stdout
  E2E Runner->>Sandbox: List and stop sandbox
Loading

Possibly related PRs

  • iii-hq/workers#481: Changes filesystem-root handling for coder tool registration and resolver constraints.

Suggested labels: no-ticket

Poem

A rabbit hops where sandboxes spring,
Three workers dance and files take wing.
Python runs on host and cloud,
KVM hums beneath the crowd.
Cleanly stopped, the burrow sings!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mot-4279-shell-coder-sandbox

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 49 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@ytallo
ytallo marked this pull request as ready for review July 29, 2026 23:20
@ytallo
ytallo merged commit e8c6cf4 into main Jul 29, 2026
16 checks passed
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.

1 participant