Skip to content

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

fix(cron): fail closed in test shell authorization when modules disabled

Steven Enamakel4837085e79ed
diff --git a/crates/openhuman-core/src/cron/scheduler/shell_job.rs b/crates/openhuman-core/src/cron/scheduler/shell_job.rs
index 77cd8674f7..a034ecd72c 100644
--- a/crates/openhuman-core/src/cron/scheduler/shell_job.rs
+++ b/crates/openhuman-core/src/cron/scheduler/shell_job.rs
@@ -29,6 +29,9 @@ pub(crate) async fn authorize_shell_command(
Err(_) => {
#[cfg(test)]
{
+ if !config.modules.enabled {
+ return Err("Command analysis is unavailable.".to_owned());
+ }
// Scheduler unit tests exercise process and retry behavior
// without loading a native artifact. Production has no
// parser fallback and fails closed below.