Delete non-protective public source tests

This commit is contained in:
Meta Vens 2026-08-23 16:57:46 +02:00
commit 104bf3909e

View file

@ -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(())
}
}