Enforce sandbox prerequisites before launching Podman tools - #25
Merged
Conversation
Closes the loop on the sandbox-prereqs feature: PR-A added detection, PR-B added the status indicator and install modal, and this is the enforcement half that decides what happens when prereqs are missing at tool-launch time. Two new crates: - paddleboard_sandbox_prereqs_state extracts the `SandboxPrereqs` GPUI global out of the UI crate so non-UI callers (`agent`, `project`) can read the cached probe status without a `workspace` cycle. - paddleboard_sandbox_settings owns the policy model: `OnMissingRuntime` (Block / FallBackToHost / WarnOnce), `SandboxSettings`, a pure `decide_gate(prereqs, settings) -> SandboxGateDecision`, and a `claim_warn_once_slot()` AtomicBool so `warn_once` is genuinely once-per-session. Three call sites consult the gate before spawning podman: sandbox_tool.rs, sandbox_service_tool.rs (host fallback registers a Forwarded Ports entry with host_port == container_port), and the `Sandboxed` arm in project/context_server_store.rs (keeping the upstream-shaped sandboxed_stdio_transport.rs untouched, per fork hygiene). The new `paddleboard_sandbox.on_missing_runtime` setting drives the policy, with `block` as the default so the sandbox guarantee stays honest. WELCOME.md, README.md, and the in-app tour are updated to match. Release Notes: - Added `paddleboard_sandbox.on_missing_runtime` policy that decides whether sandboxed tools block, fall back to the host, or warn once when Podman / gVisor prerequisites are missing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jasonsmithio
added a commit
that referenced
this pull request
May 31, 2026
…ment Enforce sandbox prerequisites before launching Podman tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the loop on the sandbox-prereqs feature. PR #23 added detection, PR #24 added the status-bar indicator and install modal — those were visibility only. This PR is the enforcement half that decides what happens when Podman / gVisor are missing at tool-launch time.
paddleboard_sandbox_prereqs_stateextracts theSandboxPrereqsGPUI global out of the UI crate so non-UI callers (agent,project) can read cached probe status without aworkspacecycle.paddleboard_sandbox_settingsowns the policy:OnMissingRuntime(Block / FallBackToHost / WarnOnce),SandboxSettings, a puredecide_gate(prereqs, settings) -> SandboxGateDecision, and aclaim_warn_once_slot()AtomicBool sowarn_onceis genuinely once-per-session. 7 unit tests cover the decision matrix.sandbox_tool.rs,sandbox_service_tool.rs(host fallback registers a Forwarded Ports entry withhost_port == container_port), and theSandboxedarm inproject/src/context_server_store.rs. The upstream-shapedsandboxed_stdio_transport.rsis intentionally untouched — gating at the caller keeps the fork-divergence surface minimal.paddleboard_sandbox.on_missing_runtimedefaulting toblock, pluspaddleboard_sandbox.prereq_check_enabledto disable the probe entirely. Schema lives incrates/settings_content/src/paddleboard_sandbox.rs(net-new file); the three required additions tosettings_content.rsand thevscode_import.rsinitializer are tagged// PaddleBoard:per fork hygiene.WELCOME.mdSandbox section describes the policy and shield UX,README.md's "Secure agent sandbox" bullet picks up the same note, andcrates/workspace/src/tour.mdsection 2 mirrors it.Test plan
cargo build -p paddleboardcleancargo clippy --no-deps -p paddleboard_sandbox_settings -p paddleboard_sandbox_prereqs -p paddleboard_sandbox_prereqs_state -p paddleboard_sandbox_prereqs_ui -p settings_content -p settings -p agent -p project --testsclean (pre-existingllm_pickerclippy failure onmainis unrelated)paddleboard_sandbox_settings, 3 insandbox_tool, 7 insandbox_service_tool, 6 insandboxed_stdio_transportpaddleboard_sandbox.on_missing_runtimetofall_back_to_hostand verifysandbox_toolruns on the host shell,sandbox_service_toolregisters a Forwarded Ports row, and asandboxed_stdioMCP server falls through to plainstdiowarn_onceand verify the log warning fires exactly once per sessionNotes
workspace.rs:785/paddleboard/src/main.rs:1494is loosened. Out of scope here.tour.mdis a pre-existing bug, left alone to keep this PR scoped.Release Notes:
paddleboard_sandbox.on_missing_runtimepolicy that decides whether sandboxed tools block, fall back to the host, or warn once when Podman / gVisor prerequisites are missing.🤖 Generated with Claude Code