Skip to content

feat(docker): 32GB RAM containers, pipeline concurrency config, containerized extraction, and tests#16

Merged
echobt merged 5 commits intomainfrom
feat/docker-32gb-pipeline-concurrency-tests
Feb 18, 2026
Merged

feat(docker): 32GB RAM containers, pipeline concurrency config, containerized extraction, and tests#16
echobt merged 5 commits intomainfrom
feat/docker-32gb-pipeline-concurrency-tests

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 18, 2026

Summary

Configures all Docker containers to use 32GB RAM with unlimited CPU and host networking, adds configurable pipeline concurrency parameters, containerizes the patch extraction path, enhances progress monitoring, and adds 33 new unit tests.

Changes

Docker Resource Configuration

  • Set all containers to --memory=32g with --network=host, removed --cpus flag entirely
  • Updated DockerSandbox::start(), harness::evaluate_task(), and runner/sandbox.rs container creation
  • Updated EASY_LIMITS, MEDIUM_LIMITS, HARD_LIMITS, and Default constants in resources.rs to 32GB RAM / 0.0 CPU (unlimited)
  • Updated difficulty/mod.rs resource limit mappings

Pipeline Concurrency & Optimization

  • Increased pre-classification semaphore from 10 to 25 (configurable via --concurrency-preclassify)
  • Increased deep backlog multiplier from 3 to 5 (configurable via --backlog-multiplier)
  • Added both CLI args to swe mine and swe benchmark commands
  • Threaded new config through SwePipelineConfigSweOrchestratorConfig → pipeline semaphore creation
  • Added early cancellation checks between all pipeline stages

Containerized Patch Extraction

  • Refactored PatchExtractor to use Docker-first diff extraction via DockerSandbox
  • Host-side reqwest API call retained as fallback only
  • All extraction now runs inside containers with the configured resource limits

Progress Monitoring Enhancements

  • Added enriched, preclassified, deep_processing, and docker_active counters to ProgressCounters
  • Enhanced ProgressMonitor to emit per-stage throughput metrics

New Unit Tests (33 total)

  • harness.rs: HarnessConfig::default, HarnessStatus Display, container_name() variants, truncate() edge cases, result/summary serialization, discover_tasks() with temp dirs
  • orchestrator.rs: DifficultyTargets::parse (valid, invalid, edge cases), total_tasks, is_empty, SweOrchestratorConfig::default, SweRunResult serialization
  • docker_sandbox.rs: truncate() helper (empty, short, exact boundary, long), SandboxOutput construction
  • pipeline.rs: SwePipelineConfig::default, ExportConfig construction
  • progress.rs: counter increment, clone-shares-state, monitor start/stop

Production Runner Script

  • Added scripts/run_production.sh with nohup launch, crash detection, stall monitoring, log rotation, throughput estimation, and graceful shutdown via signal traps

Testing

All 356 unit tests pass (cargo test --lib). Clippy and fmt checks clean.

- Create scripts/run_production.sh with nohup launch, crash detection,
  stall monitoring, log rotation, and throughput estimation
- Add enriched, preclassified, deep_processing, docker_active counters
  to ProgressCounters and ProgressSnapshot
- Emit per-stage throughput metrics in progress log output
- Update tests for new counter fields
…options

Add two new configurable parameters that flow through CLI -> orchestrator -> pipeline:

- concurrency_preclassify: controls pre-classification semaphore (default: 25, was 10)
- backlog_multiplier: controls deep processing backlog semaphore multiplier (default: 5, was 3)

Both are available as --concurrency-preclassify and --backlog-multiplier CLI args
on swe mine and swe benchmark commands.
…ontainerized extraction, tests, production runner

Changes:
- Docker containers: --memory=32g, no --cpus flag, --network=host
- Resource limits (resources.rs, difficulty/mod.rs, runner/sandbox.rs): 32GB RAM, 0.0 CPU
- Pipeline: pre-classification semaphore 25 (was 10), backlog multiplier 5 (was 3)
- CLI: --concurrency-preclassify and --backlog-multiplier args
- Extractor: Docker-first diff extraction, reqwest API fallback
- Progress monitor: enriched, preclassified, docker_active counters + throughput
- Early cancellation checks between pipeline stages
- 33 new unit tests (harness, orchestrator, docker_sandbox, pipeline, progress)
- scripts/run_production.sh: nohup, monitoring, crash detection, log rotation
@echobt echobt merged commit 0d9f23c into main Feb 18, 2026
10 checks passed
@echobt echobt deleted the feat/docker-32gb-pipeline-concurrency-tests branch February 18, 2026 08:42
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

Comments