Skip to content

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

test(cron): assert policy refusal leaves persistent state untouched

Steven Enamakel195fc852cb08
diff --git a/tests/support/cron_policy_failure.rs b/tests/support/cron_policy_failure.rs
index 46a810a958..7e58f0346a 100644
--- a/tests/support/cron_policy_failure.rs
+++ b/tests/support/cron_policy_failure.rs
@@ -276,6 +276,11 @@ pub(super) async fn policy_reads_refuse_execution_without_consuming_a_slot(case:
(direct, manual, queued, tool)
})
.await;
+ assert_eq!(
+ faults.writes.load(Ordering::SeqCst),
+ 0,
+ "policy refusal mutated persistent job/run state"
+ );
assert_eq!(
scheduled_calls, 0,
"policy read failure admitted a scheduled job"