Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(sandbox): add test for unsupported backend status

Steven Enamakel893b383bcc61
diff --git a/crates/openhuman-core/src/sandbox/ops_tests.rs b/crates/openhuman-core/src/sandbox/ops_tests.rs
index 5e905c35aa..c9ef49cc2a 100644
--- a/crates/openhuman-core/src/sandbox/ops_tests.rs
+++ b/crates/openhuman-core/src/sandbox/ops_tests.rs
@@ -449,3 +449,15 @@ async fn local_jail_removes_the_call_dir_when_the_spawn_fails() {
);
assert!(entries(&sandbox_capture_root(state.path())).is_empty());
}
+
+// ── tinybox `unsupported` backend is not a jail ──────────────────────────────
+
+#[test]
+fn local_status_is_inactive_for_the_unsupported_backend() {
+ assert_eq!(
+ local_status_for_backend(cwd_jail::detect::UNSUPPORTED_BACKEND_NAME),
+ SandboxStatus::Inactive,
+ "`pick_backend` answers `unsupported` when no OS jail exists and the host then runs \
+ commands through the no-op fallback; `Ready` would claim confinement that is absent"
+ );
+}