The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(channels): add dispatch and cron add tests
Steven Enamakel7b850d11f24a
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch_tests.rsindex 5cbe84297f..10305a6fe5 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch_tests.rs@@ -109,10 +109,12 @@ fn channel_context_block_for_telegram_includes_routing_hint() {let block = build_channel_context_block(&cm("telegram", "123456"));assert!(block.contains("[Channel context]"));assert!(block.contains("\"telegram\""));- assert!(block.contains("\"123456\""));- // Hint must steer the model toward announce mode with the same channel/target.- assert!(block.contains("announce"));- assert!(block.contains("cron_add"));+ // Reminders return to this chat on their own: the hint says so and does+ // not ask the model to copy a delivery target.+ assert!(block.contains("delivered back to this chat automatically"));+ assert!(!block.contains("\"123456\""));+ assert!(!block.contains("announce"));+ assert!(!block.contains("cron_add"));}#[test]@@ -120,7 +122,6 @@ fn channel_context_block_for_discord_and_slack_share_shape() {for ch in ["discord", "slack", "matrix"] {let block = build_channel_context_block(&cm(ch, "chan-42"));assert!(block.contains(ch), "missing channel name in `{ch}` block");- assert!(block.contains("chan-42"));- assert!(block.contains("announce"));+ assert!(block.contains("delivered back to this chat automatically"));}}diff --git a/crates/openhuman-core/src/cron/tools/add_tests.rs b/crates/openhuman-core/src/cron/tools/add_tests.rsindex 7a14d63938..1dda7d00fa 100644--- a/crates/openhuman-core/src/cron/tools/add_tests.rs+++ b/crates/openhuman-core/src/cron/tools/add_tests.rs@@ -1,4 +1,5 @@use super::*;+use crate::cron::job_builder::validate_delivery;use crate::config::Config;use crate::cron::ActiveHours;use crate::security::AutonomyLevel;@@ -349,7 +350,7 @@ fn validate_delivery_skips_proactive_and_none_modes() {to: None,best_effort: true,};- assert!(validate_delivery(&cfg, &proactive).is_ok());+ assert!(validate_delivery(&cfg, &proactive, None).is_ok());let none = DeliveryConfig {mode: "none".into(),@@ -357,7 +358,7 @@ fn validate_delivery_skips_proactive_and_none_modes() {to: None,best_effort: true,};- assert!(validate_delivery(&cfg, &none).is_ok());+ assert!(validate_delivery(&cfg, &none, None).is_ok());}#[test]@@ -372,7 +373,7 @@ fn validate_delivery_announce_web_is_a_no_op() {to: Some("any".into()),best_effort: true,};- assert!(validate_delivery(&cfg, &cfg_unused).is_ok());+ assert!(validate_delivery(&cfg, &cfg_unused, None).is_ok());}// ── GHSA-f46p-6vf9-64mm: approval gate must fire for cron_add ────