Skip to content

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

test(approval): use typed field access in redaction test

Steven Enamakel44884c46698e
diff --git a/crates/openhuman-core/src/security/approval/store_persistence_tests.rs b/crates/openhuman-core/src/security/approval/store_persistence_tests.rs
index 1ff59549ea..882a587ecb 100644
--- a/crates/openhuman-core/src/security/approval/store_persistence_tests.rs
+++ b/crates/openhuman-core/src/security/approval/store_persistence_tests.rs
@@ -21,7 +21,7 @@ fn approval_payload_home_path_is_redacted_before_persistence() {
insert_pending(&config, &pending, "sess-A").unwrap();
let stored = list_pending(&config).unwrap();
- let cwd = stored[0]["args_redacted"]["cwd"].as_str().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}");