Skip to content

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

test(attachments): add default to attachment access scope tests

Steven Enamakela3aa9e48cb03
diff --git a/crates/openhuman-core/src/agent/attachments/mod_access_tests.rs b/crates/openhuman-core/src/agent/attachments/mod_access_tests.rs
index 8ef4bf3122..3ecb52adbb 100644
--- a/crates/openhuman-core/src/agent/attachments/mod_access_tests.rs
+++ b/crates/openhuman-core/src/agent/attachments/mod_access_tests.rs
@@ -206,6 +206,7 @@ async fn thread_folder_upload_is_staged_where_the_turn_reads_it() {
&AttachmentAccessScope {
external_channel: false,
workspace: Some(root),
+ ..Default::default()
},
)
.await
diff --git a/crates/openhuman-core/src/agent/attachments/mod_tests.rs b/crates/openhuman-core/src/agent/attachments/mod_tests.rs
index 5e8e06c0dd..377a340e48 100644
--- a/crates/openhuman-core/src/agent/attachments/mod_tests.rs
+++ b/crates/openhuman-core/src/agent/attachments/mod_tests.rs
@@ -60,6 +60,7 @@ async fn legacy_migration_does_not_grant_private_file_or_disabled_image_access()
let external_scope = AttachmentAccessScope {
external_channel: true,
workspace: None,
+ ..Default::default()
};
assert!(
legacy::migrate_from(&cfg, source.to_str().unwrap(), &stash, &external_scope)
@@ -428,6 +429,7 @@ async fn explicit_workspace_wins_over_config_action_dir() {
let scope = AttachmentAccessScope {
external_channel: false,
workspace: Some(scoped.clone()),
+ ..Default::default()
};
let attachment = save(&config, "thread", "file", "text/plain", b"original", &scope)
.await
diff --git a/crates/openhuman-core/src/agent/attachments/provider_security_tests.rs b/crates/openhuman-core/src/agent/attachments/provider_security_tests.rs
index 5da1265398..ffc405b711 100644
--- a/crates/openhuman-core/src/agent/attachments/provider_security_tests.rs
+++ b/crates/openhuman-core/src/agent/attachments/provider_security_tests.rs
@@ -40,6 +40,7 @@ async fn secure_open_rejects_parent_symlink_replaced_after_path_validation() {
let scope = AttachmentAccessScope {
external_channel: false,
workspace: Some(root.clone()),
+ ..Default::default()
};
let validated = crate::agent::attachments::resolve_path(&config, "nested/file.png", &scope)
.await