Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(tests): widen the PowerShell-hook connect deadline for slow Windows CI

AkitaOnRails94057581e1e1
diff --git a/crates/ai-memory-hooks/tests/suite/powershell_utf8.rs b/crates/ai-memory-hooks/tests/suite/powershell_utf8.rs
index ce50c629..73136650 100644
--- a/crates/ai-memory-hooks/tests/suite/powershell_utf8.rs
+++ b/crates/ai-memory-hooks/tests/suite/powershell_utf8.rs
@@ -23,7 +23,14 @@ fn header_end(bytes: &[u8]) -> Option<usize> {
fn receive_one_request(listener: TcpListener) -> (String, Vec<u8>) {
listener.set_nonblocking(true).unwrap();
- let deadline = Instant::now() + Duration::from_secs(10);
+ // A cold PowerShell start on a loaded windows-latest runner (process spawn +
+ // JIT + dot-sourcing the hook lib) can take well over ten seconds before the
+ // hook opens its connection; the 10s deadline was marginal and flaked. This
+ // window only bounds *failure detection* — a working hook connects in a few
+ // seconds regardless, and a genuinely broken hook is caught earlier by the
+ // `output.status.success()` assertion — so a generous deadline removes the
+ // false negative without masking a real break.
+ let deadline = Instant::now() + Duration::from_secs(60);
let (mut stream, _) = loop {
match listener.accept() {
Ok(connection) => break connection,