Skip to content

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

test(session_host): reformat credential redaction tests

Steven Enamakelca3412f19c8e
diff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
index 7ee0b68c9d..c7e6c63594 100644
--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
@@ -257,7 +257,11 @@ async fn credential_redaction_survives_resume() {
// the screened row, without reintroducing the original input.
let session_ref = tinyagents_session::transcript::SessionRef::scoped(
"thread-credential-redaction",
- persisted.meta.agent_id.clone().expect("host agent identity"),
+ persisted
+ .meta
+ .agent_id
+ .clone()
+ .expect("host agent identity"),
);
let (successor, compacted) = locator
.begin_generation(&session_ref, persisted.meta.clone())
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs
index e94e3e828d..fca3e04eff 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs
@@ -220,8 +220,8 @@ async fn screen_input_redacts_credentials_without_changing_screening_policy() {
async fn screening_changes_only_the_new_user_row() {
let gate = gate(AutonomyLevel::Full);
let secret: String = [
- 's', 'k', '-', 'o', 'l', 'd', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 's', 'k', '-', 'o', 'l', 'd', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a',
+ 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
]
.into_iter()
.collect();
@@ -239,7 +239,9 @@ async fn screening_changes_only_the_new_user_row() {
assert!(!history[2].text().contains(&secret));
assert!(history[2]
.text()
- .contains(&tinyinference_core::sanitize::scrub_credentials(&current_user)));
+ .contains(&tinyinference_core::sanitize::scrub_credentials(
+ &current_user
+ )));
}
#[tokio::test]