Skip to content

Factor out sandbox creation from orchestrator#44

Merged
jsk11235 merged 1 commit intomainfrom
factor-out-sandbox-creation
Feb 18, 2026
Merged

Factor out sandbox creation from orchestrator#44
jsk11235 merged 1 commit intomainfrom
factor-out-sandbox-creation

Conversation

@jsk11235
Copy link
Copy Markdown
Collaborator

Summary

  • Pre-create sandboxes via SandboxPool::populate() before test execution (fail-fast on creation errors)
  • Zip sandboxes with batches 1:1, asserting same length
  • Simplify Orchestrator to take S: Sandbox instead of P: SandboxProvider (no longer creates sandboxes)
  • Terminate sandboxes in parallel after printing results (fixes delay after progress bar fills)
  • Clear progress bar immediately after tests complete for better UX

Test plan

  • cargo fmt --check passes
  • cargo clippy passes
  • cargo nextest run passes

🤖 Generated with Claude Code

Sandboxes are now created upfront via SandboxPool::populate() and
passed to the orchestrator. The orchestrator zips sandboxes with
batches 1:1 (with an assert to verify they match).

Changes:
- Add SandboxPool::populate() - creates sandboxes concurrently using
  try_join_all for parallel creation with fail-fast behavior
- Change Orchestrator to take SandboxPool directly (no Mutex needed)
- Change type parameter from P: SandboxProvider to S: Sandbox
- Simplify Orchestrator::new() - no longer needs provider or copy_dirs
- Update main.rs to pre-populate pool before running orchestrator
- Sandboxes are terminated at the end of run_with_tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jsk11235 jsk11235 merged commit 0f7cd8f into main Feb 18, 2026
@jsk11235 jsk11235 deleted the factor-out-sandbox-creation branch February 18, 2026 18:36
@github-actions
Copy link
Copy Markdown

Vet found 1 issue.


src/orchestrator.rs:21

[documentation_implementation_mismatch] (severity 2/5) (confidence 0.85)

The ARCHITECTURE.md file is listed as a required read in AGENTS.md ('You must read README.md, DESIGN.md, ARCHITECTURE.md, and STYLE_GUIDE.md before making changes'), and the orchestrator module's doc comments describe the architecture. The doc comment at the top of orchestrator.rs still shows the old architecture diagram with create_sandbox() ──►│ flow from the Scheduler/Provider, but sandbox creation has been factored out of the orchestrator. The architecture diagram should be updated to reflect that sandboxes are pre-created and passed in via SandboxPool.

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.

2 participants