Purpose
-------
Phase 5C tests for pluggable sandbox backends (``NativeBackend``,
``BubblewrapBackend``, ``SandboxExecBackend``) and the
``make_sandbox_backend`` factory.
Responsibilities
----------------
- Verify ``NativeBackend.run()`` returns correctly and passes sanitised
env.
- Verify ``BubblewrapBackend`` and ``SandboxExecBackend`` command
structure.
- Verify ``make_sandbox_backend`` factory for all backend names and
auto-detection per platform.
- Verify ``SandboxExecutor`` delegation, memory-limit conversion, output
capping, and error handling (timeout, OSError, FileNotFoundError).
- Verify ``_sanitise_env`` strips sensitive variables and adds
``OCT_MCP_CWD``.
Diagnostics
-----------
Domain: MCP-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Tests use mock subprocess and platform stubs; no real sandbox commands
are executed.