Skip to content

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

fix(tests): correct test expectations for model pin schema

Steven Enamakela09cf579b589
diff --git a/crates/openhuman-core/src/config/schema/types_model_pin_tests.rs b/crates/openhuman-core/src/config/schema/types_model_pin_tests.rs
index cf67e391a7..6f113e825a 100644
--- a/crates/openhuman-core/src/config/schema/types_model_pin_tests.rs
+++ b/crates/openhuman-core/src/config/schema/types_model_pin_tests.rs
@@ -28,6 +28,15 @@ fn output_language_directive_accepts_language_names() {
assert!(directive.contains("Kannada"));
}
+#[test]
+fn output_language_directive_strips_control_characters_and_blank_input() {
+ let directive = output_language_directive(Some(" Klingon\u{0000} ")).expect("directive");
+ assert!(directive.contains("write all natural-language output in Klingon."));
+ assert_eq!(output_language_directive(Some("\u{0000}\u{0001}")), None);
+ assert_eq!(output_language_directive(Some(" ")), None);
+ assert_eq!(output_language_directive(None), None);
+}
+
#[test]
fn config_parses_orchestrator_and_team_model_pins() {
let config: Config = toml::from_str(