Skip to content

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

test(attachments): add provider owner tests

Steven Enamakel3c50d0031be9
diff --git a/crates/openhuman-core/src/attachments/provider_owner_tests.rs b/crates/openhuman-core/src/attachments/provider_owner_tests.rs
new file mode 100644
index 0000000000..0ee34c830b
--- /dev/null
+++ b/crates/openhuman-core/src/attachments/provider_owner_tests.rs
@@ -0,0 +1,16 @@
+use super::*;
+
+#[test]
+fn omitted_unsupported_url_is_redacted_without_changing_local_path_detection() {
+ let source = "ftp://docs.example.test/old.pdf?signature=private-query";
+ let block = history_source_block(InputModality::Document, source);
+ let hint = super::super::historical_source_hint(&block, &AttachmentAccessScope::default());
+ assert_eq!(hint, "remote or inline media omitted");
+ assert!(!hint.contains("private-query"));
+
+ let local = history_source_block(InputModality::Document, r"C:\docs\old.pdf");
+ assert!(matches!(
+ local,
+ ContentBlock::Document(MediaRef::Path { .. })
+ ));
+}