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
test(approval): cover file-uri home path redaction
Steven Enamakelf7321529371d
diff --git a/crates/openhuman-core/src/security/approval/store_persistence_tests.rs b/crates/openhuman-core/src/security/approval/store_persistence_tests.rsindex 882a587ecb..0ba20a283d 100644--- a/crates/openhuman-core/src/security/approval/store_persistence_tests.rs+++ b/crates/openhuman-core/src/security/approval/store_persistence_tests.rs@@ -11,20 +11,19 @@ fn insert_then_list_returns_pending_row() {}#[test]-fn approval_payload_home_path_is_redacted_before_persistence() {+fn approval_payload_file_uri_home_path_is_redacted_before_persistence() {let (config, _dir) = test_config();- let mut pending = sample("home-path", "sess-A");+ let mut pending = sample("file-uri-home-path", "sess-A");pending.args_redacted = crate::security::approval::redact_args(&json!({"action": "list",- "cwd": "/Users/approval-user/work/openhuman",+ "file": "file:///home/approval-profile/work/openhuman/report.txt",}));insert_pending(&config, &pending, "sess-A").unwrap();let stored = list_pending(&config).unwrap();- let cwd = stored[0].args_redacted["cwd"].as_str().unwrap();- assert!(!cwd.contains("approval-user"), "stored {cwd}");- assert!(cwd.contains("<HOME>"), "stored {cwd}");- assert!(cwd.ends_with("/work/openhuman"), "stored {cwd}");+ let file = stored[0].args_redacted["file"].as_str().unwrap();+ assert!(!file.contains("approval-profile"), "stored {file}");+ assert_eq!(file, "file:///<HOME>/work/openhuman/report.txt");}#[test]diff --git a/vendor/tinymemory b/vendor/tinymemoryindex d4eb7c976c..6f05b0b991 160000--- a/vendor/tinymemory+++ b/vendor/tinymemory@@ -1 +1 @@-Subproject commit d4eb7c976c60657161303f6bff329186bee900af+Subproject commit 6f05b0b991d9481c85c745b26676178aae78a67b