From efed95d694202093c915dfbb1557195aea024578 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 2 Dec 2026 20:08:53 +0100 Subject: [PATCH] Connector renewal test: build the prepared invocation directly Co-Authored-By: Claude Sonnet 5.5 --- crates/ghostlight/src/controllers.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/ghostlight/src/controllers.rs b/crates/ghostlight/src/controllers.rs index d202d08..0d3f841 100644 --- a/crates/ghostlight/src/controllers.rs +++ b/crates/ghostlight/src/controllers.rs @@ -7561,11 +7561,8 @@ mod tests { #[test] fn a_stale_invocation_is_renewed_and_a_live_one_is_sent_as_it_is() { let skew = REQUEST_EXPIRY.as_millis() as u64; - let prepared = persona_request(CommandId::new(), "claude-haiku-5-5", "Speak.".into()) - .and_then(|request| { - PreparedInference::prepare("runtime", 1_000_000 + skew, request).map_err(|_| unreachable!()) - }) - .unwrap(); + let request = persona_request(CommandId::new(), "claude-haiku-5-5", "Speak.".into()).unwrap(); + let prepared = PreparedInference::prepare("runtime", 1_000_000 + skew, request).unwrap(); let live = prepared.invocation.clone(); let sent = renewed_invocation(live.clone(), 1_000_000).unwrap(); assert_eq!(sent, live, "a live invocation replays by its own id");