Skip to content

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

test(saas_isolation): dump core log when a probe yields no result

Steven Enamakelac67698c5613
diff --git a/tests/saas_isolation/probes.rs b/tests/saas_isolation/probes.rs
index f4f9ce3c17..a1745c4c6a 100644
--- a/tests/saas_isolation/probes.rs
+++ b/tests/saas_isolation/probes.rs
@@ -173,6 +173,14 @@ fn host_tool_probes_are_refused_under_the_profile_policy() {
}
}
eprintln!("[isolation] probe results:\n{}", report.join("\n"));
+ if results.iter().any(|(_, o)| o.is_none()) {
+ let log = std::fs::read_to_string(&node.log).unwrap_or_default();
+ let lines: Vec<&str> = log
+ .lines()
+ .filter(|l| l.contains("approval") || l.contains("file_read") || l.contains("policy") || l.contains("gate"))
+ .collect();
+ eprintln!("[isolation] core log (approval/policy):\n{}", lines[lines.len().saturating_sub(60)..].join("\n"));
+ }
assert!(!pwned_host.exists(), "a user wrote a host file");
assert!(!d.root.join("users/bob/sandbox/pwned.txt").exists(), "alice wrote into bob's sandbox");
assert!(!shell_marker.exists(), "a user ran a host shell command");