feat: add sandbox domain model and runtime layer refactor#97
feat: add sandbox domain model and runtime layer refactor#97
Conversation
- 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
There was a problem hiding this comment.
💡 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; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
SandboxKindtype ("worktree" | "docker") andDEFAULT_SANDBOX_KINDto the project domain modelsandboxfield to session model with a new migration (0004_add_sandbox_to_sessions)workspaceLayerForSandbox()andlocalRuntimeBaseLayerfor pluggable sandbox backendsThis is the foundation for sandbox support — subsequent PRs will add the Docker sandbox service and CLI integration.