feat(sandbox): Docker sandbox execution with integration tests and examples#337
feat(sandbox): Docker sandbox execution with integration tests and examples#337
Conversation
… caps; forEach-scoped counters; deterministic backoff; tests + RFC - Engine: executeWithRouting for single and forEach items - Inline remediation execution with per-item outputs - Dependency validation then expansion; robust inline dep resolution - RFC updated with goto_js/run_js and on_success semantics - Integration tests for retry+goto, on_success goto, and forEach remediation (robust assertions)
…l superseded runs - Job name: includes matrix.ai_provider.name and event\n- Concurrency: cancel in-progress runs per branch/workflow
…instead of non-existent review-score
…LI and Action banners
…ach, dynamic *_js) and README usage
…amples Add Docker-based sandbox environments for isolated check execution: - src/sandbox/: types, DockerImageSandbox, DockerComposeSandbox, CacheVolumeManager, SandboxManager, CheckRunner, EnvFilter - Engine integration: sandbox lifecycle in executeGroupedChecks, CheckRunner dispatch for sandboxed checks - CLI: --run-check mode for child visor execution inside containers - Config: sandbox validation (mode exclusivity, compose requires service, cache path validation, resource limits) - 8 unit test suites (53 tests) covering all sandbox components - 10 Docker integration tests (auto-skip without Docker): image mode, workspace defaults, per-check overrides, env passthrough, read-only mounts, network isolation, inline Dockerfile, --run-check payload round-trip, container reuse, cache volumes - 6 example YAML configs demonstrating each sandbox capability Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔍 Code Analysis ResultsProbeAgent execution failed: Error: Failed to get response from AI model during iteration 1. No output generated. Check the stream for errors. 🐛 Debug InformationProvider: google Errors
Debug Details
🔗 Download Link: visor-debug-2315 Powered by Visor from Probelabs Last updated: 2026-02-06T16:18:00.741Z | Triggered by: opened | Commit: 51f3646 |
🔍 Code Analysis Results✅ Security Check PassedNo security issues found – changes LGTM. Performance Issues (1)
✅ Quality Check PassedNo quality issues found – changes LGTM. Style Issues (1)
🐛 Debug InformationProvider: google Errors
Debug Details
🔗 Download Link: visor-debug-2315 Powered by Visor from Probelabs Last updated: 2026-02-06T16:18:01.897Z | Triggered by: opened | Commit: 51f3646 |
…ble env allowlist - Add SandboxDefaults type with configurable env_passthrough that replaces hardcoded defaults at workspace level - Add withActiveSpan/addEvent/setSpanError to sandbox lifecycle methods (sandbox-manager, docker-image-sandbox, check-runner) - Add trace-ingester.ts for NDJSON child trace relay via workspace mount - Add sandbox-telemetry.ts wrapper with graceful fallback when telemetry module is unavailable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ngine Merge origin/main into feat/sandbox-integration-tests to bring in: - src/telemetry/ (OTel instrumentation framework) - State machine execution engine refactor - All upstream fixes and features Semantic merge applied to: - src/types/config.ts: added SandboxDefaults, sandbox_defaults to VisorConfig - src/check-execution-engine.ts: compatibility layer (engine moved to state-machine) - src/state-machine-execution-engine.ts: SandboxManager lifecycle integration - src/state-machine/dispatch/sandbox-routing.ts: new sandbox execution routing - src/cli-main.ts: re-added --run-check mode - src/config.ts: re-added sandbox validation logic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix visorDistPath resolution: detect ncc bundle context via existsSync(join(__dirname, 'index.js')) instead of always using dirname(__dirname), which resolves to project root not dist/ - Base64-encode sandbox payload to avoid double shell-escaping through two sh -c layers (check-runner → docker exec) - Initialize OTel telemetry in --run-check mode when VISOR_TELEMETRY_ENABLED=true, wrapping provider.execute() in withActiveSpan for proper child span emission - Set NODE_PATH=/workspace/node_modules in sandbox env so child visor can resolve externalized @opentelemetry/* packages - Rewrite trace-ingester to create proper OTel child spans with original timing instead of flat events, filtering fallback-ndjson duplicates - Fix prettier formatting in merge files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Overview: Docker Sandbox Execution with Integration Tests and ExamplesSummaryThis PR introduces Docker sandbox execution capabilities for Visor, enabling checks to run in isolated container environments. The implementation includes comprehensive infrastructure, testing, and example configurations. Files Changed Analysis24 files changed with 2,797 additions and 1 deletion: Core Infrastructure (New
|
Security Issues (22)
Architecture Issues (14)
Performance Issues (6)
|
…tion - reviewer.test.ts: fix AIReviewService mock message to include "security" - action-cli-bridge.test.ts: remove tests for deleted createTempConfigFromInputs method, update check filtering assertion - github-workflow.test.ts: fix group key from 'default' to 'security-review', update content assertion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The bundled/ directory was accidentally committed and is gitignored. It should not be part of this PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert dist/ files to match origin/main — build artifacts should not diverge in feature branches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
src/sandbox/with types, DockerImageSandbox, DockerComposeSandbox, CacheVolumeManager, SandboxManager, CheckRunner, EnvFilterexecuteGroupedChecks,CheckRunnerdispatch for sandboxed checks,--run-checkCLI mode for child visor inside containers--run-checkpayload round-trip, container reuse, cache volumesTest plan
npx jest --testPathPatterns="sandbox-docker" --no-coverage— 10 tests pass with Docker, skip cleanly withoutnpx jest --testPathPatterns="sandbox-" --no-coverage— all 9 sandbox test suites pass (63 total tests)npx jest --no-coverage— full suite passes (103/104 suites, 1193 tests)npm run buildsucceedsKnown limitation
filterEnvForSandboxforwards hostPATHinto containers, which can breakshon systems where/binis not in PATH (e.g., Arch Linux). The--run-checkintegration test usesDockerImageSandboxdirectly with explicit env to work around this.🤖 Generated with Claude Code