aKode fase 1: niente sync plugin OpenAI, CDN pets, CIMD chatgpt.com, npm registry; pulizia codice morto

This commit is contained in:
Andrea
2026-11-09 12:06:16 +01:00
parent 5b5b83964d
commit 39a103d16f
34 changed files with 136 additions and 4668 deletions

View File

@@ -122,13 +122,14 @@ async fn runtime_delivery_signs_each_batch_and_strips_cross_origin_auth() {
}
}
// aKode: the analytics client never creates a delivery queue, so nothing is sent.
#[tokio::test]
async fn custom_analytics_destination_does_not_initialize_runtime_auth() {
async fn analytics_client_never_sends_events() {
for mode in [RuntimeAuthMode::DualHeader, RuntimeAuthMode::AssertionOnly] {
let server = MockServer::start().await;
Mock::given(path("/codex/analytics-events/events"))
.respond_with(ResponseTemplate::new(200))
.expect(1)
.expect(0)
.mount(&server)
.await;
let client = AnalyticsEventsClient::new_with_runtime(
@@ -139,10 +140,7 @@ async fn custom_analytics_destination_does_not_initialize_runtime_auth() {
/*api_key_headers*/ Default::default(),
);
emit(&client, "custom").await;
let requests = server.received_requests().await.unwrap();
assert_eq!(requests.len(), 1);
assert_eq!(requests[0].headers["authorization"], "Bearer key-a");
assert!(!requests[0].headers.contains_key("x-openai-agent-assertion"));
assert!(server.received_requests().await.unwrap().is_empty());
server.verify().await;
}
}