Skip to content

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

test(saas_isolation): cover subagent cancel and steer isolation

Steven Enamakel0ffcb756e046
diff --git a/tests/saas_isolation/generators.rs b/tests/saas_isolation/generators.rs
index 9b17d116d1..a16b2f1a50 100644
--- a/tests/saas_isolation/generators.rs
+++ b/tests/saas_isolation/generators.rs
@@ -210,6 +210,20 @@ pub const GENERATORS: &[(&str, Generator)] = &[
"openhuman.memory_forget",
|w, a| json!({ "ids": [w.memory_id_for(a)] }),
),
+ // Sub-agent ids are minted by live turns the mock model cannot spawn, so
+ // these aim at ids no profile owns: another profile's or an unknown task
+ // must answer the same "nothing running" and never touch a worker.
+ ("openhuman.subagent_cancel", |w, a| {
+ json!({ "taskId": format!("sub-{}", w.next_id()), "reason": w.canary(a) })
+ }),
+ ("openhuman.subagent_steer", |w, a| {
+ let mode = ["steer", "collect"][w.rng.below(2)];
+ json!({
+ "taskId": format!("sub-{}", w.next_id()),
+ "message": w.canary(a),
+ "mode": mode,
+ })
+ }),
("openhuman.memory_items_list", |_, _| json!({ "limit": 20 })),
("openhuman.memory_explore", |w, _| {
let facet = ["kind", "source", "workspace", "folder"][w.rng.below(4)];