Skip to content

fix(runtime): support MicroSandbox Dockerless setup - #1466

Merged
skevetter merged 2 commits into
mainfrom
codex/microsandbox-dockerless-parity
Oct 11, 2026
Merged

skevetter merged 2 commits into
mainfrom
codex/microsandbox-dockerless-parity

Conversation

@skevetter

@skevetter skevetter commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes bootstrap SSH setup for shell-free MicroSandbox Dockerless images: the generated helper starts with literal arguments through the existing argv capability. Drivers without it retain command-string execution. Raw streams, startup watchdog and caller cancellation remain intact; an argv error never triggers a second shell execution.

Adds eight actual-VM Dockerless scenarios across built-in and published external provider v0.1.7. Both host Docker CLI and API are directed to owned failures; the explicit --force-dockerless path must perform a real guest Dockerfile and local Feature build. Root coverage checks image PATH, DOCKER_CONFIG, Feature environment, hooks/SSH and build reuse through repeat up, stop/start and recreation. Nonroot off/private must work; strict/relaxed fresh creation must refuse before VM or build-volume creation while preserving host data. Cleanup targets only each fixture’s owned resources.

Validation: the old SSH dispatch fails the new regression with the bootstrap shell absent; literal-argv dispatch passes, including quoted arguments, raw bytes, fallback and cancellation. Fresh full affected-package race tests, vet, strict lint (zero issues), module verification and all 13 pre-commit hooks passed. The prior eight-spec dry run proves selection only. A fresh full committed local CodeRabbit review completed with zero findings and exact coverage of all nine PR files. All 80 current-head CI jobs passed, including all 58 actual VM scenarios across both drivers. Fresh Greptile completed at 5/5. Explicit full remote CodeRabbit run 770116d5 completed all nine files with no actionable findings, no retained architecture-level concern and minimal merge risk. Both commits have valid GitHub signatures; there are no review threads. The private-helper docstring metric is not a correctness finding. The review correctly identifies invalid-recreate recovery as a separate, already tracked campaign gate; this slice makes no rollback claim.

Scope remains the explicit Dockerless path. Automatic fallback, invalid-recreate preservation and the later driver cutover are not claimed.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit d832600
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6acbc8aacd8e3600084f6b49

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 770116d5-81ac-4e7c-b269-632d51fb1838



📥 Commits

Reviewing files that changed from the base of the PR and between 2aa3d86 and d832600.




📒 Files selected for processing (9)
  • .github/workflows/pr-ci.yml
  • e2e/tests/up/provider_microsandbox_dockerless.go
  • e2e/tests/up/testdata/microsandbox-dockerless/Dockerfile
  • e2e/tests/up/testdata/microsandbox-dockerless/devsy-dockerless-parity-check
  • e2e/tests/up/testdata/microsandbox-dockerless/features/parity/devcontainer-feature.json
  • e2e/tests/up/testdata/microsandbox-dockerless/features/parity/install.sh
  • pkg/devcontainer/setup.go
  • pkg/devcontainer/setup_test.go
  • sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx



Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The change adds argv-based startup for the bootstrap SSH helper when the driver supports it. It also adds Microsandbox Dockerless end-to-end scenarios for built-in and external providers, plus the CI matrix entry and runtime protocol documentation for those checks.

Changes

Dockerless runtime checks

Layer / File(s) Summary
SSH helper argv execution
pkg/devcontainer/setup.go, pkg/devcontainer/setup_test.go, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
Setup passes literal SSH helper arguments to argv-capable drivers and retains shell-command execution as a fallback. Tests cover arguments, streams, fallback behavior, and cancellation. The runtime protocol documents both execution paths.
Dockerless provider E2E scenarios
.github/workflows/pr-ci.yml, e2e/tests/up/provider_microsandbox_dockerless.go, e2e/tests/up/testdata/microsandbox-dockerless/*, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
The suite checks provider behavior with host Docker unavailable, including policy outcomes, workspace writes and preservation, and root lifecycle state. The CI matrix adds the suite, and the protocol documentation describes its scenarios and requirements.

Priority: ➖ Normal

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant executeSetup
  participant execSetupSSHServer
  participant ArgvExecDriver
  participant CommandDevContainer
  executeSetup->>execSetupSSHServer: Pass generated SSH helper arguments
  alt Driver supports argv execution and arguments are present
    execSetupSSHServer->>ArgvExecDriver: CommandContainerArgv with request streams
  else No argv support or no arguments
    execSetupSSHServer->>CommandDevContainer: Execute shell command
  end
Loading




Merge Risk: ⚪ Minimal · up to d8326

No actionable issue is established for the SSH startup change or Dockerless checks; the change is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to d8326

Literal-argument execution removes the guest-shell requirement while preserving compatibility and the inspected drivers’ execution privileges. No introduced security concern was established, but workspace-ownership and partial-failure recovery coverage remains incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The execution change propagates to every argv-capable driver. Inspected implementations continue targeting the selected workspace sandbox or pod/container: external and Microsandbox execution remain root, while Kubernetes uses the same container execution identity on both paths. No additional host or cross-workspace authority was established by this change; isolation beyond these inspected execution boundaries remains unproven.

Trust Boundaries and Controls

  • observed — Configuration-derived executable and auth-socket values cross the execution boundary as literal arguments on the argv path, avoiding shell interpretation. Regression assertions include quotes and shell metacharacters, binary stream payloads, workspace targeting and an execution error that must not trigger a second shell invocation.
  • observed — The Dockerless fixture redirects host Docker CLI and API access to owned failures and supplies policy and developer identity through existing configuration. Fresh non-root strict/relaxed cases assert refusal, no build start, no VM or build volume, and preserved source ownership, permissions and contents. These are validation assertions, not new production enforcement.

Resilience and Maintainability Implications

  • observed — The fixture prechecks resource absence and scopes cleanup to its temporary workspace, generated sandbox and build-volume names, and isolated provider configuration. Its root lifecycle assertions distinguish reuse and restart from recreation, but do not establish production rollback under interruption or changed ownership policy.
  • observed — The pre-existing Microsandbox replacement path prepares volumes before removing an existing VM and creating its replacement, with direct error returns and no local compensation shown. It explicitly warns that removal cannot be rolled back. Caller-level recovery remains unresolved; this PR did not establish a worsening of that existing behavior.



Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 4 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: fixing runtime support for MicroSandbox Dockerless setup.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 4 files. (5 skipped: 5 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR





  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev ready!

Name Link
🔨 Latest commit d832600
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6acbc8aa3a0a2c0008ee1cd6
😎 Deploy Preview https://deploy-preview-1466--devsydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@skevetter skevetter changed the title test(runtime): cover MicroSandbox Dockerless parity fix(runtime): support MicroSandbox Dockerless setup Oct 11, 2026
@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] This PR appears safe to merge, with no actionable issues found.

Summary

Bootstrap SSH setup now uses literal arguments when the driver supports them, allowing Dockerless setup to start without /bin/sh.

  • Bootstrap SSH starts with literal arguments when a driver supports them.
  • MicroSandbox Dockerless runs now have real guest coverage on both providers.

No actionable issues were found. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Build literal SSH helper arguments] --> B[Run startup watchdog]
  B --> C{Driver supports argv?}
  C -->|Yes| D[Execute literal arguments]
  C -->|No| E[Execute quoted command string]
  D --> F[Return execution result]
  E --> F
Loading

Reviews (1) · Last reviewed commit: "fix(runtime): launch bootstrap SSH with ..." · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@skevetter

Copy link
Copy Markdown
Contributor Author

The full current-head CodeRabbit review has been inspected, including Security Architecture and Merge Risk. Its retained observation about pre-existing MicroSandbox replacement and partial-failure recovery is valid and is tracked separately in the driver campaign: SDK1.6.0 now negotiates explicit recreation, followed by provider/host integration and actual running/stopped invalid-effective-config preservation tests. This Dockerless slice neither changes that deletion boundary nor claims rollback. Literal argv, inspected execution privileges, workspace targeting, raw streams, fallback and cancellation are covered here.

The docstring percentage warning concerns private helpers and test functions; their names, explicit assertions and protocol documentation communicate the contract. No comments that restate implementation are added for a coverage metric. Local validation, all 80 implementation CI jobs and 58 actual VM scenarios passed; Greptile is 5/5 and the full nine-file CodeRabbit review completed without actionable findings.

@skevetter
skevetter marked this pull request as ready for review October 11, 2026 18:21
@skevetter
skevetter merged commit 04a4610 into main Oct 11, 2026
102 checks passed
@skevetter
skevetter deleted the codex/microsandbox-dockerless-parity branch October 11, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant