Skip to content

feat: add sandbox domain model and runtime layer refactor#97

Open
blntrsz wants to merge 1 commit intomainfrom
feat/sandbox-core-models
Open

feat: add sandbox domain model and runtime layer refactor#97
blntrsz wants to merge 1 commit intomainfrom
feat/sandbox-core-models

Conversation

@blntrsz
Copy link
Copy Markdown
Owner

@blntrsz blntrsz commented Mar 29, 2026

Summary

  • Adds SandboxKind type ("worktree" | "docker") and DEFAULT_SANDBOX_KIND to the project domain model
  • Adds sandbox field to session model with a new migration (0004_add_sandbox_to_sessions)
  • Refactors the runtime layer to export workspaceLayerForSandbox() and localRuntimeBaseLayer for pluggable sandbox backends
  • Updates prompt-workspace use case and test mocks to include sandbox field

This is the foundation for sandbox support — subsequent PRs will add the Docker sandbox service and CLI integration.


Open with Devin

- Add SandboxKind type and DEFAULT_SANDBOX_KIND to project domain
- Add sandbox field to session model and migration
- Refactor runtime to export workspaceLayerForSandbox and localRuntimeBaseLayer
- Update prompt-workspace to pass sandbox to session creation
- Update test mocks with sandbox field
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0c8c7b2eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

WorkTreeSandboxServiceLayer,
WorkTreeFileSystemServiceLayer,
);
const sandboxLayerForKind = (_sandbox: SandboxKind) => WorkTreeSandboxServiceLayer;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route workspace layer by requested sandbox kind

workspaceLayerForSandbox("docker") currently behaves the same as "worktree" because sandboxLayerForKind ignores its sandbox parameter and always returns WorkTreeSandboxServiceLayer. Since SandboxKind already allows "docker", this silently wires the wrong backend for docker sessions and will run worktree/tmux behavior instead of container behavior. Please switch on the sandbox kind here (or explicitly fail for unsupported kinds) so callers cannot accidentally run the wrong runtime.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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