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(skills): agent install tools neither see nor accept an acknowledged digest (#7082)
oxoxDevf7d6957e2846
diff --git a/crates/openhuman-core/src/skills/catalog/tools_tests.rs b/crates/openhuman-core/src/skills/catalog/tools_tests.rsindex 7d4324c70d..bfae213500 100644--- a/crates/openhuman-core/src/skills/catalog/tools_tests.rs+++ b/crates/openhuman-core/src/skills/catalog/tools_tests.rs@@ -138,6 +138,7 @@ fn install_tool_schema_has_no_scan_acknowledgement() {let properties = schema["properties"].as_object().expect("properties");assert_eq!(properties.keys().collect::<Vec<_>>(), ["entry_id"]);assert!(!schema.to_string().contains("acknowledge"));+ assert!(!schema.to_string().contains("digest"));}#[tokio::test]@@ -159,10 +160,22 @@ async fn the_install_tool_cannot_acknowledge_scan_findings() {let workspace = tempfile::tempdir().unwrap();let mut config = Config::default();config.workspace_dir = workspace.path().to_path_buf();+ let seen = match ops::install_from_catalog(+ workspace.path(),+ "agent-poisoned",+ crate::skills::ops_install::ScanAcknowledgement::Absent,+ )+ .await+ .expect("install")+ {+ crate::skills::ops_install::SkillInstallOutcome::ScanBlocked(blocked) => blocked.digest,+ other => panic!("expected scan_blocked, got {other:?}"),+ };let tool = SkillRegistryInstallTool::new(Arc::new(config));let result = tool.execute(json!({"entry_id": "agent-poisoned",+ "acknowledged_digest": seen,"acknowledge_scan_findings": true,})).await@@ -177,6 +190,10 @@ async fn the_install_tool_cannot_acknowledge_scan_findings() {let body: serde_json::Value = serde_json::from_str(&result.output()).expect("json");assert_eq!(body["status"], "scan_blocked");assert_eq!(body["target"], "agent-poisoned");+ assert!(+ body.get("digest").is_none(),+ "the agent is never handed the digest"+ );assert_eq!(body["findings"][0]["check"], "invisible_code_points");assert!(body["instruction"].as_str()@@ -186,7 +203,8 @@ async fn the_install_tool_cannot_acknowledge_scan_findings() {fixture.document_hits.load(std::sync::atomic::Ordering::SeqCst),- 2+ 4,+ "two scans for the direct call, two for the tool call");assert!(!dirs::home_dir().unwrap()diff --git a/crates/openhuman-core/src/skills/tools_tests.rs b/crates/openhuman-core/src/skills/tools_tests.rsindex e962fa0f18..4da952e067 100644--- a/crates/openhuman-core/src/skills/tools_tests.rs+++ b/crates/openhuman-core/src/skills/tools_tests.rs@@ -84,6 +84,7 @@ async fn list_returns_envelope() {fn install_from_url_tool_schema_has_no_scan_acknowledgement() {let schema = WorkflowInstallFromUrlTool::new(cfg()).parameters_schema();assert!(!schema.to_string().contains("acknowledge"));+ assert!(!schema.to_string().contains("digest"));}#[tokio::test]@@ -107,6 +108,7 @@ async fn install_from_url_tool_cannot_acknowledge_scan_findings() {.execute(json!({"url": format!("{}/SKILL.md", server.uri()),"acknowledge_scan_findings": true,+ "acknowledged_digest": "any",})).await.expect("execute");@@ -115,6 +117,7 @@ async fn install_from_url_tool_cannot_acknowledge_scan_findings() {assert!(result.is_error);let body: serde_json::Value = serde_json::from_str(&result.output()).expect("json");assert_eq!(body["status"], "scan_blocked");+ assert!(body.get("digest").is_none());assert!(!dirs::home_dir().unwrap().join(".openhuman/skills/tool-url-poisoned")