From 4206df8d81573f3951db2a28918dc6a2292bd300 Mon Sep 17 00:00:00 2001 From: Manideep Malyala Date: Sun, 23 Aug 2026 23:27:34 +0530 Subject: [PATCH] fix(backends): default supports_mount_free to not supports_bind_mounts for fail-closed safety --- strix/runtime/backends.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/strix/runtime/backends.py b/strix/runtime/backends.py index 51abb7e6..d77bb8f8 100644 --- a/strix/runtime/backends.py +++ b/strix/runtime/backends.py @@ -81,16 +81,17 @@ def register_backend( backend: SandboxBackend, *, supports_bind_mounts: bool = False, - supports_mount_free: bool = True, + supports_mount_free: bool | None = None, ) -> None: """Register a custom backend under ``name``. Intended for downstream users who ship their own runtime — register before any ``session_manager.create_or_reuse`` call. Re-registering - an existing name overwrites the prior entry. ``supports_bind_mounts`` - defaults to False: a remote runtime cannot see the caller's filesystem, so - it is handed local sources as manifest entries to upload instead. + an existing name overwrites the prior entry. Remote backends without bind + mounts default to mount-free support, while bind-mount backends must explicitly opt in. """ + if supports_mount_free is None: + supports_mount_free = not supports_bind_mounts _BACKENDS[name] = backend if supports_bind_mounts: _BIND_MOUNT_BACKENDS.add(name)