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
refactor(storage): drop v1 collection and stream grants for tinyconnectors
Steven Enamakelc752b36c9142
diff --git a/crates/openhuman-core/src/modules/storage_grant_schemas.rs b/crates/openhuman-core/src/modules/storage_grant_schemas.rsindex f04de74a54..918e081191 100644--- a/crates/openhuman-core/src/modules/storage_grant_schemas.rs+++ b/crates/openhuman-core/src/modules/storage_grant_schemas.rs@@ -20,7 +20,6 @@use super::storage_grants::StorageGrant;use crate::storage::schema::module_items;-use tinystoragedrivers::CollectionSpec;/// One module's row: its registry id, the schema owner that declares its/// storage, and secret prefixes the schema cannot name.@@ -98,19 +97,9 @@ pub(super) fn grant_for(module_id: &str) -> Option<StorageGrant> {let items = module_items(row.owner);let mut secret_prefixes: Vec<String> = row.secrets.iter().map(|s| (*s).to_owned()).collect();secret_prefixes.extend(items.secrets);- let mut collections = items.collections;- let mut stream_prefixes = items.streams;- if module_id == tinyconnectors::MODULE_ID {- // The registry pins a released module that predates the v2 names, so- // it still writes its v1 collection and stream family. Grant those- // beside the schema's v2 names until the pin moves to a release that- // carries the v2 schema; a v2 module never touches them.- collections.push(CollectionSpec::new(tinyconnectors::PREFS_COLLECTION));- stream_prefixes.push(tinyconnectors::TRIGGER_STREAM_PREFIX.to_owned());- }Some(StorageGrant {- collections,- stream_prefixes,+ collections: items.collections,+ stream_prefixes: items.streams,blob_prefixes: items.blobs,secret_prefixes,writable: true,diff --git a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rsindex f3c65b4a4f..f640a2ba94 100644--- a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs+++ b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs@@ -24,11 +24,9 @@ fn every_row_has_a_valid_generated_grant() {.unwrap_or_else(|why| panic!("{}: {why}", row.module));assert!(grant.writable);let items = module_items(row.owner);- // tinyconnectors also carries its one v1 collection (see `grant_for`).- let v1_extra = usize::from(row.module == tinyconnectors::MODULE_ID);assert_eq!(grant.collections.len(),- items.collections.len() + v1_extra,+ items.collections.len(),"{}",row.module);@@ -101,28 +99,3 @@ fn tinyjuice_reaches_only_its_blob_prefix() {json!({"key": "other/abc"})));}--#[test]-fn tinyconnectors_grant_covers_the_names_the_pinned_release_writes() {- let grant = declared("tinyconnectors").unwrap();- // v1 names, written by the released module the registry pins.- assert!(allowed(- &grant,- Object::Documents,- "Get",- json!({"collection": "composio-user-scopes", "id": "gmail"})- ));- assert!(allowed(- &grant,- Object::Streams,- "Append",- json!({"stream": "triggers/2026-10-12", "entries": []})- ));- // v2 names, from the gitlink schema.- assert!(allowed(- &grant,- Object::Documents,- "Get",- json!({"collection": "connectors.user_scopes", "id": "gmail"})- ));-}