Skip to content

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

test: report which path leaks backend detail in cron policy failure

Steven Enamakel4fce1d62cdad
diff --git a/tests/support/cron_policy_failure.rs b/tests/support/cron_policy_failure.rs
index 5d2577c012..7775d2e991 100644
--- a/tests/support/cron_policy_failure.rs
+++ b/tests/support/cron_policy_failure.rs
@@ -378,7 +378,15 @@ pub(super) async fn policy_reads_refuse_execution_without_consuming_a_slot(case:
0,
"manual paths executed the job"
);
- assert!(!format!("{direct:?}{agent:?}{manual:?}{queued:?}{tool:?}").contains("secret"));
+ for (name, shown) in [
+ ("direct", format!("{direct:?}")),
+ ("agent", format!("{agent:?}")),
+ ("manual", format!("{manual:?}")),
+ ("queued", format!("{queued:?}")),
+ ("tool", format!("{tool:?}")),
+ ] {
+ assert!(!shown.contains("secret"), "{name} leaked backend detail: {shown}");
+ }
assert_eq!(
sqlite_stamp(&config),
sqlite_before,