Skip to content

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

test(saas_isolation): accept path-policy refusal for apply_patch probes

Steven Enamakel4986f52709fe
diff --git a/tests/saas_isolation/probes.rs b/tests/saas_isolation/probes.rs
index fed0bb0ab5..95a04c0b80 100644
--- a/tests/saas_isolation/probes.rs
+++ b/tests/saas_isolation/probes.rs
@@ -167,7 +167,11 @@ fn host_tool_probes_are_refused_under_the_profile_policy() {
assert_eq!(outcome.status, "error", "probe {tag} was not refused: {outcome:?}");
if offered.iter().any(|t| t == tool) || ["file_read", "file_write", "apply_patch"].contains(tool) {
// A tool the user has: refused by the profile's path policy.
- assert_eq!(outcome.class, "BlockedByPolicy", "probe {tag}: {outcome:?}");
+ // (`apply_patch` reports the same path check per edit.)
+ assert!(
+ outcome.class == "BlockedByPolicy" || outcome.output.contains("path not allowed"),
+ "probe {tag} was not refused by the path policy: {outcome:?}"
+ );
} else {
// A tool the user does not have: it does not exist for them.
assert!(outcome.output.contains("unknown tool"), "probe {tag}: {outcome:?}");