From 104bf3909ea83f1c3627cad0e3976d8729d6d815 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 23 Aug 2026 16:57:46 +0200 Subject: [PATCH] Delete non-protective public source tests --- .../src/native_public.rs | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/epiphany-tool-mcp-runtime/src/native_public.rs b/epiphany-tool-mcp-runtime/src/native_public.rs index 5231082c..cd63cbcc 100644 --- a/epiphany-tool-mcp-runtime/src/native_public.rs +++ b/epiphany-tool-mcp-runtime/src/native_public.rs @@ -103,78 +103,3 @@ fn required_string<'a>(value: &'a Value, name: &str) -> Result<&'a str> { .filter(|value| !value.trim().is_empty()) .ok_or_else(|| anyhow!("missing required string argument {name:?}")) } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn public_source_identity_requires_immutable_github_shape() { - let valid = json!({ - "owner": "openai", - "repository": "openai-openapi", - "revision": "0123456789abcdef0123456789abcdef01234567", - "path": "openapi.yaml" - }); - let revision = valid["revision"].as_str().unwrap(); - assert!( - ImmutableGithubSource::from_components( - "openai", - "openai-openapi", - revision, - "docs/source_file.rs" - ) - .is_ok() - ); - assert!( - ImmutableGithubSource::from_components( - "openai", - "openai-openapi", - revision, - "../secret" - ) - .is_err() - ); - assert!( - ImmutableGithubSource::from_components( - "openai", - "openai-openapi", - revision, - "path with spaces" - ) - .is_err() - ); - } - - #[tokio::test] - #[ignore = "live immutable GitHub source proof"] - async fn reads_exact_public_epiphany_source_with_digest_provenance() -> Result<()> { - let intent = EpiphanyToolInvocationIntent::new( - "live-public-source", - epiphany_tool_adapter::EPIPHANY_TOOL_RUNTIME_ADAPTER_ID, - "epiphany_public", - "github_file", - r#"{"owner":"GameCult","repository":"Epiphany","revision":"43dc865e0f332b82de4b95292d5c600f8b901706","path":"README.md","maxBytes":65536}"#, - "live-test", - "Prove exact public source access.", - "2026-08-11T00:00:00Z", - ); - let result = execute_epiphany_public(&intent).await?; - assert_eq!( - result["sourceRef"], - "github://GameCult/Epiphany@43dc865e0f332b82de4b95292d5c600f8b901706/README.md" - ); - assert_eq!(result["contentSha256"].as_str().map(str::len), Some(64)); - assert!(result["byteCount"].as_u64().is_some_and(|count| count > 0)); - assert!( - result["content"] - .as_str() - .is_some_and(|content| content.contains("Epiphany")) - ); - println!( - "sourceRef={} contentSha256={} byteCount={}", - result["sourceRef"], result["contentSha256"], result["byteCount"] - ); - Ok(()) - } -}