From 2e83483f00d80bc121c04ecc0049e6f1fd97fc26 Mon Sep 17 00:00:00 2001 From: Aleksandr Bogomiakov Date: Wed, 25 Nov 2026 00:00:16 +0200 Subject: [PATCH] Restore Windows native test compilation The real Wintun check exposed three Windows-only test calls that predated the access argument to ControlSocket::bind. Pass Private for these isolated named pipes, matching the Unix fixtures. Run native subnet checks for edits to the underlying TUN implementation as well. Confirmed the first hosted Windows compilation failed on exactly these calls. The revised Windows checks run on the hosted runner. Production IPC behavior is unchanged. --- .github/workflows/subnet-source.yml | 1 + crates/tsunagi-core/src/ipc/windows.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/subnet-source.yml b/.github/workflows/subnet-source.yml index d1b484b..7f551e0 100644 --- a/.github/workflows/subnet-source.yml +++ b/.github/workflows/subnet-source.yml @@ -9,6 +9,7 @@ on: - 'crates/tsunagi-core/src/overlay/provision/windows.rs' - 'crates/tsunagi-core/src/overlay/provision/mod.rs' - 'crates/tsunagi-core/src/overlay/provision/factory.rs' + - 'crates/tsunagi-core/src/overlay/tun.rs' - 'crates/tsunagi-core/src/net.rs' workflow_dispatch: diff --git a/crates/tsunagi-core/src/ipc/windows.rs b/crates/tsunagi-core/src/ipc/windows.rs index ee25fb9..b8531a5 100644 --- a/crates/tsunagi-core/src/ipc/windows.rs +++ b/crates/tsunagi-core/src/ipc/windows.rs @@ -364,7 +364,9 @@ mod tests { }); assert!(!is_serving(&path).await, "nothing serves the pipe yet"); - let control = ControlSocket::bind(&path, source).await.unwrap(); + let control = ControlSocket::bind(&path, source, ControlSocketAccess::Private) + .await + .unwrap(); assert!(is_serving(&path).await, "the agent serves it now"); let answer = exchange(&path, &Request::Status, EXCHANGE_TIMEOUT) @@ -439,10 +441,10 @@ mod tests { Box::pin(async { StatusReport::default() }) }); - let first = ControlSocket::bind(&path, Arc::clone(&source)) + let first = ControlSocket::bind(&path, Arc::clone(&source), ControlSocketAccess::Private) .await .unwrap(); - let second = ControlSocket::bind(&path, source).await; + let second = ControlSocket::bind(&path, source, ControlSocketAccess::Private).await; assert!( matches!(second, Err(Error::StateLocked { .. })), "{second:?}"