From 8ac02a1a0356035b515c5d3fff26694769303029 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:22:29 +0000 Subject: [PATCH 01/16] test(browser): cover worker egress authorization Add a live Chromium test that loads a page spawning a worker which fetches a denied private address, asserting the request reaches the host egress authorizer and never connects directly. The fixture server now takes an owned body so the generated page HTML can be passed in. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../browser_egress_live_tests.rs | 122 +++++++++++++++++- 1 file changed, 119 insertions(+), 3 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index e466eebbe..58601bf09 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -87,7 +87,7 @@ impl EgressHost { async fn serve_fixture( listener: tokio::net::TcpListener, - expected: &'static [u8], + expected: Vec, extra_connections: Arc, served: tokio::sync::oneshot::Sender<()>, ) { @@ -102,7 +102,7 @@ async fn serve_fixture( b"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nContent-Length: ".as_slice(), expected.len().to_string().as_bytes(), b"\r\nConnection: close\r\n\r\n".as_slice(), - expected, + expected.as_slice(), ] .concat(); let _ = tokio::io::AsyncWriteExt::write_all(&mut stream, &response).await; @@ -129,7 +129,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch let (served_tx, served_rx) = tokio::sync::oneshot::channel(); let allowed_server = tokio::spawn(serve_fixture( allowed_listener, - b"allowed fixture", + b"allowed fixture".to_vec(), extra_allowed_connections.clone(), served_tx, )); @@ -251,3 +251,119 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch allowed_server.abort(); Ok(()) } + +#[tokio::test] +async fn live_chromium_module_routes_worker_egress_through_host_authorization() -> tinybus::Result<()> { + let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; + let page_port = allowed_listener.local_addr()?.port(); + let denied_listener = tokio::net::TcpListener::bind("127.0.0.2:0").await?; + let denied_port = denied_listener.local_addr()?.port(); + let html = format!( + "" + ) + .into_bytes(); + let (served_tx, served_rx) = tokio::sync::oneshot::channel(); + let allowed_server = tokio::spawn(serve_fixture( + allowed_listener, + html, + Arc::new(AtomicUsize::new(0)), + served_tx, + )); + + let bus = MemoryBus::new(); + let broker = Broker::new(); + let broker_task = broker.spawn(bus.clone()); + let host_connection = Connection::connect(bus.connect().await?).await?; + let observations = Arc::new(Mutex::new(Vec::new())); + let allowed_address = format!("127.0.0.1:{page_port}"); + host_connection + .serve_at( + browser_egress::OBJECT_PATH.try_into()?, + EgressHost { + allowed: Arc::new(AtomicBool::new(true)), + allowed_address, + observations: observations.clone(), + }, + ) + .await?; + host_connection + .request_name(browser_egress::INTERFACE) + .await?; + + let module_host = ModuleHost::new(broker); + let module = crate::linked_module().expect("linked module manifest is valid"); + module_host + .attach_linked_with_config( + module, + serde_json::json!({ + "browser": {"egress": {"policy_id": "fixture-policy", "generation": 41}} + }), + ) + .expect("TinyComputer module loads through ModuleHost"); + let client = Connection::connect(bus.connect().await?).await?; + let proxy = client.proxy(names::INTERFACE, names::OBJECT_PATH, names::INTERFACE)?; + + let opened: DesktopResponse = proxy + .call( + browser_names::methods::OPEN_SESSION, + (serde_json::json!({}),), + ) + .await?; + let session = successful_data(&opened)["id"].clone(); + assert_eq!(successful_data(&opened)["launched"], true); + let url = format!("http://fixture.test:{page_port}/worker-fixture"); + let navigated: DesktopResponse = proxy + .call( + browser_names::methods::NAVIGATE, + (serde_json::json!({"session": session, "url": url}),), + ) + .await?; + assert!( + navigated.ok, + "authorized worker fixture navigation failed: {:?}", + navigated.error + ); + tokio::time::timeout(Duration::from_secs(10), served_rx) + .await + .expect("fixture page is served") + .expect("fixture server reports the response"); + + let worker_authorization = format!( + "authorize:fixture-policy:41:127.0.0.2:{denied_port}" + ); + tokio::time::timeout(Duration::from_secs(10), async { + loop { + if observations + .lock() + .unwrap() + .iter() + .any(|call| call == &worker_authorization) + { + break; + } + tokio::time::sleep(Duration::from_millis(10)).await; + } + }) + .await + .expect("worker request reaches the host egress authorizer"); + assert!( + tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) + .await + .is_err(), + "worker request connected directly to the denied private listener" + ); + + let closed: DesktopResponse = proxy + .call( + browser_names::methods::CLOSE_SESSION, + (serde_json::json!({"session": session}),), + ) + .await?; + assert!(closed.ok, "browser session did not close: {:?}", closed.error); + broker_task.abort(); + allowed_server.abort(); + Ok(()) +} From ed424f2aac08ebd856fb10616fe706fdb6498d15 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:23:06 +0000 Subject: [PATCH 02/16] style(tinycomputer): reformat browser egress live tests Reformatted the browser egress live tests to satisfy rustfmt, wrapping overlong lines and collapsing a multi-line format! call. No test behaviour changed. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../tinybus_module/browser_egress_live_tests.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 58601bf09..d78d0a431 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -129,7 +129,8 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch let (served_tx, served_rx) = tokio::sync::oneshot::channel(); let allowed_server = tokio::spawn(serve_fixture( allowed_listener, - b"allowed fixture".to_vec(), + b"allowed fixture" + .to_vec(), extra_allowed_connections.clone(), served_tx, )); @@ -253,7 +254,8 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch } #[tokio::test] -async fn live_chromium_module_routes_worker_egress_through_host_authorization() -> tinybus::Result<()> { +async fn live_chromium_module_routes_worker_egress_through_host_authorization() +-> tinybus::Result<()> { let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; let page_port = allowed_listener.local_addr()?.port(); let denied_listener = tokio::net::TcpListener::bind("127.0.0.2:0").await?; @@ -331,9 +333,7 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() .expect("fixture page is served") .expect("fixture server reports the response"); - let worker_authorization = format!( - "authorize:fixture-policy:41:127.0.0.2:{denied_port}" - ); + let worker_authorization = format!("authorize:fixture-policy:41:127.0.0.2:{denied_port}"); tokio::time::timeout(Duration::from_secs(10), async { loop { if observations @@ -362,7 +362,11 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() (serde_json::json!({"session": session}),), ) .await?; - assert!(closed.ok, "browser session did not close: {:?}", closed.error); + assert!( + closed.ok, + "browser session did not close: {:?}", + closed.error + ); broker_task.abort(); allowed_server.abort(); Ok(()) From 10473e3c5fbe6bf31cc7db6e2d223ad9101fef3e Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:24:13 +0000 Subject: [PATCH 03/16] test(browser_egress): allow extra clippy lints in live tests Expand the lint allowlist for the opt-in real-Chromium test module to cover too_many_lines and unused_async, and sort the existing entries. The module doc comment now wraps TinyComputer in backticks for consistency. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index d78d0a431..2209a73d9 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -1,5 +1,11 @@ -//! Opt-in real-Chromium coverage through the loaded TinyComputer module. -#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)] +//! Opt-in real-Chromium coverage through the loaded `TinyComputer` module. +#![allow( + clippy::expect_used, + clippy::panic, + clippy::too_many_lines, + clippy::unwrap_used, + clippy::unused_async +)] use std::sync::{ Arc, Mutex, From 80b0975c775308c34a75efbdef107d2b974f1a64 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:25:12 +0000 Subject: [PATCH 04/16] test(tinycomputer): scope clippy allows to the items that need them Replace the file-level clippy allow list with per-item attributes so the unused_async and too_many_lines suppressions only cover the specific functions and tests that require them. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 2209a73d9..4ccb453f4 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -1,11 +1,5 @@ //! Opt-in real-Chromium coverage through the loaded `TinyComputer` module. -#![allow( - clippy::expect_used, - clippy::panic, - clippy::too_many_lines, - clippy::unwrap_used, - clippy::unused_async -)] +#![allow(clippy::expect_used, clippy::panic, clippy::unwrap_used)] use std::sync::{ Arc, Mutex, @@ -33,6 +27,7 @@ struct EgressHost { #[tinybus::interface(name = "ai.tinyhumans.tinycomputer.BrowserEgressHost")] impl EgressHost { + #[allow(clippy::unused_async)] async fn authorize(&self, request: BrowserEgressTarget) -> tinybus::Result { let allow = self.allowed.load(Ordering::SeqCst) && request.hostname == "fixture.test" @@ -63,6 +58,7 @@ impl EgressHost { }) } + #[allow(clippy::unused_async)] async fn consume( &self, request: BrowserEgressConsumeRequest, @@ -76,6 +72,7 @@ impl EgressHost { }) } + #[allow(clippy::unused_async)] async fn validate( &self, request: BrowserEgressValidateRequest, @@ -125,6 +122,7 @@ fn successful_data(reply: &DesktopResponse) -> &serde_json::Value { } #[tokio::test] +#[allow(clippy::too_many_lines)] async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_changed_policy() -> tinybus::Result<()> { let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; @@ -260,6 +258,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch } #[tokio::test] +#[allow(clippy::too_many_lines)] async fn live_chromium_module_routes_worker_egress_through_host_authorization() -> tinybus::Result<()> { let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; From a9427051f3be40af755c383d6e74c847e4c6f75b Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:34:01 +0000 Subject: [PATCH 05/16] test(browser_egress): extract shared fixture host setup for live tests The live Chromium egress test now builds its browser session through a start_browser_with_fixture_host helper that returns a LiveBrowser handle, so additional live cases can reuse the same fixture wiring. The host methods also yield once before doing their work to keep the async signatures honest instead of suppressing the unused_async lint. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../browser_egress_live_tests.rs | 105 ++++++++++++------ 1 file changed, 73 insertions(+), 32 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 4ccb453f4..666c711cd 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -27,8 +27,8 @@ struct EgressHost { #[tinybus::interface(name = "ai.tinyhumans.tinycomputer.BrowserEgressHost")] impl EgressHost { - #[allow(clippy::unused_async)] async fn authorize(&self, request: BrowserEgressTarget) -> tinybus::Result { + tokio::task::yield_now().await; let allow = self.allowed.load(Ordering::SeqCst) && request.hostname == "fixture.test" && request.port @@ -58,11 +58,11 @@ impl EgressHost { }) } - #[allow(clippy::unused_async)] async fn consume( &self, request: BrowserEgressConsumeRequest, ) -> tinybus::Result { + tokio::task::yield_now().await; self.observations .lock() .unwrap() @@ -72,11 +72,11 @@ impl EgressHost { }) } - #[allow(clippy::unused_async)] async fn validate( &self, request: BrowserEgressValidateRequest, ) -> tinybus::Result { + tokio::task::yield_now().await; self.observations .lock() .unwrap() @@ -121,24 +121,20 @@ fn successful_data(reply: &DesktopResponse) -> &serde_json::Value { reply.data.as_ref().expect("successful response has data") } -#[tokio::test] -#[allow(clippy::too_many_lines)] -async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_changed_policy() --> tinybus::Result<()> { - let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; - let port = allowed_listener.local_addr()?.port(); - let denied_listener = tokio::net::TcpListener::bind(("127.0.0.2", port)).await?; - let allowed_address = allowed_listener.local_addr()?.to_string(); - let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); - let (served_tx, served_rx) = tokio::sync::oneshot::channel(); - let allowed_server = tokio::spawn(serve_fixture( - allowed_listener, - b"allowed fixture" - .to_vec(), - extra_allowed_connections.clone(), - served_tx, - )); +struct LiveBrowser { + proxy: tinybus::Proxy, + session: serde_json::Value, + allowed: Arc, + observations: Arc>>, + broker_task: tokio::task::JoinHandle<()>, +} +async fn start_browser_with_fixture_host( + allowed_address: String, + page_port: u16, + page_path: &str, + served: tokio::sync::oneshot::Receiver<()>, +) -> tinybus::Result { let bus = MemoryBus::new(); let broker = Broker::new(); let broker_task = broker.spawn(bus.clone()); @@ -150,7 +146,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch browser_egress::OBJECT_PATH.try_into()?, EgressHost { allowed: allowed.clone(), - allowed_address: allowed_address.clone(), + allowed_address, observations: observations.clone(), }, ) @@ -180,7 +176,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch .await?; let session = successful_data(&opened)["id"].clone(); assert_eq!(successful_data(&opened)["launched"], true); - let url = format!("http://fixture.test:{port}/allowed"); + let url = format!("http://fixture.test:{page_port}{page_path}"); let navigated: DesktopResponse = proxy .call( browser_names::methods::NAVIGATE, @@ -189,15 +185,51 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch .await?; assert!( navigated.ok, - "authorized navigation failed: {:?}", + "authorized fixture navigation failed: {:?}", navigated.error ); - tokio::time::timeout(Duration::from_secs(10), served_rx) + tokio::time::timeout(Duration::from_secs(10), served) .await - .expect("authorized Chromium request reaches the fixture within ten seconds") - .expect("authorized fixture reports its response"); + .expect("fixture page is served") + .expect("fixture server reports the response"); - let authorizations_before_policy_change = observations + Ok(LiveBrowser { + proxy, + session, + allowed, + observations, + broker_task, + }) +} + +#[tokio::test] +async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_changed_policy() +-> tinybus::Result<()> { + let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; + let port = allowed_listener.local_addr()?.port(); + let denied_listener = tokio::net::TcpListener::bind(("127.0.0.2", port)).await?; + let allowed_address = allowed_listener.local_addr()?.to_string(); + let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); + let (served_tx, served_rx) = tokio::sync::oneshot::channel(); + let allowed_server = tokio::spawn(serve_fixture( + allowed_listener, + b"allowed fixture" + .to_vec(), + extra_allowed_connections.clone(), + served_tx, + )); + + host_connection + let browser = start_browser_with_fixture_host( + allowed_address.clone(), + port, + "/allowed", + served_rx, + ) + .await?; + + let authorizations_before_policy_change = browser + .observations .lock() .unwrap() .iter() @@ -206,12 +238,13 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch let extra_connections_before_policy_change = extra_allowed_connections.load(Ordering::SeqCst); // Simulate a policy refresh: the host changes from granting the fixture // socket to denying requests for the same hostname. - allowed.store(false, Ordering::SeqCst); + browser.allowed.store(false, Ordering::SeqCst); let denied_url = format!("http://fixture.test:{port}/after-policy-change"); - let denied: DesktopResponse = proxy + let denied: DesktopResponse = browser + .proxy .call( browser_names::methods::NAVIGATE, - (serde_json::json!({"session": session, "url": denied_url}),), + (serde_json::json!({"session": browser.session, "url": denied_url}),), ) .await?; assert!( @@ -230,7 +263,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch "policy-denied navigation connected to the previously allowed socket" ); - let calls = observations.lock().unwrap(); + let calls = browser.observations.lock().unwrap(); assert!( calls .iter() @@ -252,7 +285,15 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch .any(|call| call == &format!("consume:{denied_address}")), "denied socket was consumed: {calls:?}" ); - broker_task.abort(); + let closed: DesktopResponse = browser + .proxy + .call( + browser_names::methods::CLOSE_SESSION, + (serde_json::json!({"session": browser.session}),), + ) + .await?; + assert!(closed.ok, "browser session did not close: {:?}", closed.error); + browser.broker_task.abort(); allowed_server.abort(); Ok(()) } From 4dee0d516d3dd5bfc02744909bb86cc7cbf47634 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:34:24 +0000 Subject: [PATCH 06/16] test(browser_egress): reuse fixture host helper in worker egress test The worker egress live test now starts its browser through the shared start_browser_with_fixture_host helper instead of duplicating the bus, broker, and session setup inline, and it drops the now-unneeded too_many_lines allow. A stray leftover line in the neighbouring test was also removed. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../browser_egress_live_tests.rs | 87 ++++--------------- 1 file changed, 17 insertions(+), 70 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 666c711cd..b4a9854bc 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -219,14 +219,9 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch served_tx, )); - host_connection - let browser = start_browser_with_fixture_host( - allowed_address.clone(), - port, - "/allowed", - served_rx, - ) - .await?; + let browser = + start_browser_with_fixture_host(allowed_address.clone(), port, "/allowed", served_rx) + .await?; let authorizations_before_policy_change = browser .observations @@ -292,14 +287,17 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch (serde_json::json!({"session": browser.session}),), ) .await?; - assert!(closed.ok, "browser session did not close: {:?}", closed.error); + assert!( + closed.ok, + "browser session did not close: {:?}", + closed.error + ); browser.broker_task.abort(); allowed_server.abort(); Ok(()) } #[tokio::test] -#[allow(clippy::too_many_lines)] async fn live_chromium_module_routes_worker_egress_through_host_authorization() -> tinybus::Result<()> { let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; @@ -321,68 +319,16 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() served_tx, )); - let bus = MemoryBus::new(); - let broker = Broker::new(); - let broker_task = broker.spawn(bus.clone()); - let host_connection = Connection::connect(bus.connect().await?).await?; - let observations = Arc::new(Mutex::new(Vec::new())); let allowed_address = format!("127.0.0.1:{page_port}"); - host_connection - .serve_at( - browser_egress::OBJECT_PATH.try_into()?, - EgressHost { - allowed: Arc::new(AtomicBool::new(true)), - allowed_address, - observations: observations.clone(), - }, - ) - .await?; - host_connection - .request_name(browser_egress::INTERFACE) - .await?; - - let module_host = ModuleHost::new(broker); - let module = crate::linked_module().expect("linked module manifest is valid"); - module_host - .attach_linked_with_config( - module, - serde_json::json!({ - "browser": {"egress": {"policy_id": "fixture-policy", "generation": 41}} - }), - ) - .expect("TinyComputer module loads through ModuleHost"); - let client = Connection::connect(bus.connect().await?).await?; - let proxy = client.proxy(names::INTERFACE, names::OBJECT_PATH, names::INTERFACE)?; - - let opened: DesktopResponse = proxy - .call( - browser_names::methods::OPEN_SESSION, - (serde_json::json!({}),), - ) - .await?; - let session = successful_data(&opened)["id"].clone(); - assert_eq!(successful_data(&opened)["launched"], true); - let url = format!("http://fixture.test:{page_port}/worker-fixture"); - let navigated: DesktopResponse = proxy - .call( - browser_names::methods::NAVIGATE, - (serde_json::json!({"session": session, "url": url}),), - ) - .await?; - assert!( - navigated.ok, - "authorized worker fixture navigation failed: {:?}", - navigated.error - ); - tokio::time::timeout(Duration::from_secs(10), served_rx) - .await - .expect("fixture page is served") - .expect("fixture server reports the response"); + let browser = + start_browser_with_fixture_host(allowed_address, page_port, "/worker-fixture", served_rx) + .await?; let worker_authorization = format!("authorize:fixture-policy:41:127.0.0.2:{denied_port}"); tokio::time::timeout(Duration::from_secs(10), async { loop { - if observations + if browser + .observations .lock() .unwrap() .iter() @@ -402,10 +348,11 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() "worker request connected directly to the denied private listener" ); - let closed: DesktopResponse = proxy + let closed: DesktopResponse = browser + .proxy .call( browser_names::methods::CLOSE_SESSION, - (serde_json::json!({"session": session}),), + (serde_json::json!({"session": browser.session}),), ) .await?; assert!( @@ -413,7 +360,7 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() "browser session did not close: {:?}", closed.error ); - broker_task.abort(); + browser.broker_task.abort(); allowed_server.abort(); Ok(()) } From 7060a52f0b3fef318f00add7550b90f8d6734ab3 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:34:56 +0000 Subject: [PATCH 07/16] test(browser_egress): align broker task handle type with tinybus result The live browser test fixture stored the broker task handle as a JoinHandle<()>, but the spawned task now returns a tinybus::Result<()>. Updating the field type keeps the fixture compiling against the current broker signature. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index b4a9854bc..3bd8dc6ff 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -126,7 +126,7 @@ struct LiveBrowser { session: serde_json::Value, allowed: Arc, observations: Arc>>, - broker_task: tokio::task::JoinHandle<()>, + broker_task: tokio::task::JoinHandle>, } async fn start_browser_with_fixture_host( From ba7663fee4a3752cb7e535d1524841ffd3fbab43 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:35:53 +0000 Subject: [PATCH 08/16] test(browser): report observations when worker egress times out The live Chromium egress test now captures the timeout result and asserts on it separately, including the collected browser observations in the failure message. This makes a timeout diagnosable instead of surfacing only a bare panic from expect. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 3bd8dc6ff..21a389c49 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -325,7 +325,7 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() .await?; let worker_authorization = format!("authorize:fixture-policy:41:127.0.0.2:{denied_port}"); - tokio::time::timeout(Duration::from_secs(10), async { + let worker_authorized = tokio::time::timeout(Duration::from_secs(10), async { loop { if browser .observations @@ -339,8 +339,12 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() tokio::time::sleep(Duration::from_millis(10)).await; } }) - .await - .expect("worker request reaches the host egress authorizer"); + .await; + assert!( + worker_authorized.is_ok(), + "worker request reaches the host egress authorizer: {:?}", + browser.observations.lock().unwrap() + ); assert!( tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) .await From a32341a0f6043098df32d578dd519c29ce7f719c Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:36:33 +0000 Subject: [PATCH 09/16] test(browser): distinguish bypass from unreached host authorization The live egress test previously failed with a single assertion when the worker request did not reach the host authorizer, which could not tell a direct connection bypass apart from the request simply never arriving. The failure path now first checks whether the denied listener accepted a connection and reports a bypass explicitly before panicking. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../tinybus_module/browser_egress_live_tests.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 21a389c49..7c24e29db 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -340,11 +340,18 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() } }) .await; - assert!( - worker_authorized.is_ok(), - "worker request reaches the host egress authorizer: {:?}", - browser.observations.lock().unwrap() - ); + if worker_authorized.is_err() { + assert!( + tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) + .await + .is_err(), + "worker request bypassed host authorization and connected directly" + ); + panic!( + "worker request did not reach host authorization: {:?}", + browser.observations.lock().unwrap() + ); + } assert!( tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) .await From b8fb10e086c22fcf3c80ea858f39852651b41624 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:37:11 +0000 Subject: [PATCH 10/16] test(browser_egress): keep host connection and module host alive in live fixture The live browser test fixture now stores the host connection and module host alongside the broker task so they are not dropped while the test runs. Without holding these handles the fixture could tear down its host before the browser finished exercising egress, making the live tests flaky. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 7c24e29db..da022a32a 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -127,6 +127,8 @@ struct LiveBrowser { allowed: Arc, observations: Arc>>, broker_task: tokio::task::JoinHandle>, + _host_connection: Connection, + _module_host: ModuleHost, } async fn start_browser_with_fixture_host( @@ -199,6 +201,8 @@ async fn start_browser_with_fixture_host( allowed, observations, broker_task, + _host_connection: host_connection, + _module_host: module_host, }) } From 9080d6cdb3e517ebbd78247df2c886d60d1fb4fa Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:37:49 +0000 Subject: [PATCH 11/16] test(browser_egress): scope observation lock to assertion block The observation mutex guard is now dropped before the subsequent proxy call, so the test no longer holds the lock across an await point. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../browser_egress_live_tests.rs | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index da022a32a..1dabed091 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -262,28 +262,30 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch "policy-denied navigation connected to the previously allowed socket" ); - let calls = browser.observations.lock().unwrap(); - assert!( - calls - .iter() - .any(|call| call == &format!("consume:{allowed_address}")), - "host did not consume the exact returned socket: {calls:?}" - ); - let authorizations_after_policy_change = calls - .iter() - .filter(|call| call.starts_with("authorize:fixture-policy:41:fixture.test:")) - .count(); - assert!( - authorizations_after_policy_change > authorizations_before_policy_change, - "the post-change request did not reach the host authorizer: {calls:?}" - ); - let denied_address = denied_listener.local_addr()?.to_string(); - assert!( - !calls + { + let calls = browser.observations.lock().unwrap(); + assert!( + calls + .iter() + .any(|call| call == &format!("consume:{allowed_address}")), + "host did not consume the exact returned socket: {calls:?}" + ); + let authorizations_after_policy_change = calls .iter() - .any(|call| call == &format!("consume:{denied_address}")), - "denied socket was consumed: {calls:?}" - ); + .filter(|call| call.starts_with("authorize:fixture-policy:41:fixture.test:")) + .count(); + assert!( + authorizations_after_policy_change > authorizations_before_policy_change, + "the post-change request did not reach the host authorizer: {calls:?}" + ); + let denied_address = denied_listener.local_addr()?.to_string(); + assert!( + !calls + .iter() + .any(|call| call == &format!("consume:{denied_address}")), + "denied socket was consumed: {calls:?}" + ); + } let closed: DesktopResponse = browser .proxy .call( From 960447afab55263ebe0647ff8f0ff1e10a76750f Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:41:55 +0000 Subject: [PATCH 12/16] test(browser): wait for worker completion before asserting egress The worker egress test now signals completion through a dedicated fixture request instead of relying on a fixed delay, so the assertion that the denied listener stays untouched runs after the worker has actually finished. The fixture also counts allowed connections to confirm only the completion request arrives after navigation. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../browser_egress_live_tests.rs | 45 ++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index 1dabed091..ae98f50ea 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -93,6 +93,7 @@ async fn serve_fixture( expected: Vec, extra_connections: Arc, served: tokio::sync::oneshot::Sender<()>, + worker_done: Option>, ) { let (mut stream, _) = listener .accept() @@ -110,9 +111,22 @@ async fn serve_fixture( .concat(); let _ = tokio::io::AsyncWriteExt::write_all(&mut stream, &response).await; let _ = served.send(()); - while let Ok((stream, _)) = listener.accept().await { + drop(stream); + let mut worker_done = worker_done; + while let Ok((mut stream, _)) = listener.accept().await { extra_connections.fetch_add(1, Ordering::SeqCst); - drop(stream); + let mut request = [0_u8; 4096]; + let _ = tokio::io::AsyncReadExt::read(&mut stream, &mut request).await; + if String::from_utf8_lossy(&request).contains("GET /worker-done ") { + let _ = tokio::io::AsyncWriteExt::write_all( + &mut stream, + b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\nConnection: close\r\n\r\n", + ) + .await; + if let Some(done) = worker_done.take() { + let _ = done.send(()); + } + } } } @@ -221,6 +235,7 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch .to_vec(), extra_allowed_connections.clone(), served_tx, + None, )); let browser = @@ -313,16 +328,19 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() let html = format!( "" ) .into_bytes(); let (served_tx, served_rx) = tokio::sync::oneshot::channel(); + let (worker_done_tx, worker_done_rx) = tokio::sync::oneshot::channel(); + let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); let allowed_server = tokio::spawn(serve_fixture( allowed_listener, html, - Arc::new(AtomicUsize::new(0)), + extra_allowed_connections.clone(), served_tx, + Some(worker_done_tx), )); let allowed_address = format!("127.0.0.1:{page_port}"); @@ -358,11 +376,28 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() browser.observations.lock().unwrap() ); } + let connections_before_completion = extra_allowed_connections.load(Ordering::SeqCst); + tokio::select! { + done = tokio::time::timeout(Duration::from_secs(10), worker_done_rx) => { + done.expect("worker request completes within ten seconds") + .expect("worker completion fixture receives the done request"); + } + accepted = denied_listener.accept() => { + let (stream, _) = accepted.expect("denied listener remains open"); + drop(stream); + panic!("worker request connected directly to the denied private listener"); + } + } + assert_eq!( + extra_allowed_connections.load(Ordering::SeqCst), + connections_before_completion + 1, + "only the worker completion request reached the allowed fixture after navigation" + ); assert!( tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) .await .is_err(), - "worker request connected directly to the denied private listener" + "worker request connected directly to the denied private listener after completion" ); let closed: DesktopResponse = browser From c3f56dc2612b078231c640fea1a9ec80078095c6 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:42:59 +0000 Subject: [PATCH 13/16] test(browser_egress): assert exact allowed connection count The live egress test now asserts that exactly one extra connection reached the allowed fixture after navigation, instead of comparing against a count captured before the worker completed. The captured baseline was redundant and made the assertion harder to read. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs index ae98f50ea..da6dd14f9 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs @@ -376,7 +376,6 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() browser.observations.lock().unwrap() ); } - let connections_before_completion = extra_allowed_connections.load(Ordering::SeqCst); tokio::select! { done = tokio::time::timeout(Duration::from_secs(10), worker_done_rx) => { done.expect("worker request completes within ten seconds") @@ -390,7 +389,7 @@ async fn live_chromium_module_routes_worker_egress_through_host_authorization() } assert_eq!( extra_allowed_connections.load(Ordering::SeqCst), - connections_before_completion + 1, + 1, "only the worker completion request reached the allowed fixture after navigation" ); assert!( From eab0940d5a39459d6d04fe933d617d291b9b97a6 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:47:16 +0000 Subject: [PATCH 14/16] test(browser_egress): split live tests into a module directory The opt-in real-Chromium egress tests were moved out of a single file into a browser_egress_live_tests module with a separate worker file, so the fixture host and worker helpers can be shared and the suite can grow without one oversized file. No test behaviour changes. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../mod.rs} | 99 +------------------ .../browser_egress_live_tests/worker.rs | 99 +++++++++++++++++++ crates/tinycomputer/src/tinybus_module/mod.rs | 1 - 3 files changed, 101 insertions(+), 98 deletions(-) rename crates/tinycomputer/src/tinybus_module/{browser_egress_live_tests.rs => browser_egress_live_tests/mod.rs} (75%) create mode 100644 crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/worker.rs diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs similarity index 75% rename from crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs rename to crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs index da6dd14f9..955c4ca44 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs @@ -1,6 +1,8 @@ //! Opt-in real-Chromium coverage through the loaded `TinyComputer` module. #![allow(clippy::expect_used, clippy::panic, clippy::unwrap_used)] +mod worker; + use std::sync::{ Arc, Mutex, atomic::{AtomicBool, AtomicUsize, Ordering}, @@ -318,100 +320,3 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch Ok(()) } -#[tokio::test] -async fn live_chromium_module_routes_worker_egress_through_host_authorization() --> tinybus::Result<()> { - let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; - let page_port = allowed_listener.local_addr()?.port(); - let denied_listener = tokio::net::TcpListener::bind("127.0.0.2:0").await?; - let denied_port = denied_listener.local_addr()?.port(); - let html = format!( - "" - ) - .into_bytes(); - let (served_tx, served_rx) = tokio::sync::oneshot::channel(); - let (worker_done_tx, worker_done_rx) = tokio::sync::oneshot::channel(); - let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); - let allowed_server = tokio::spawn(serve_fixture( - allowed_listener, - html, - extra_allowed_connections.clone(), - served_tx, - Some(worker_done_tx), - )); - - let allowed_address = format!("127.0.0.1:{page_port}"); - let browser = - start_browser_with_fixture_host(allowed_address, page_port, "/worker-fixture", served_rx) - .await?; - - let worker_authorization = format!("authorize:fixture-policy:41:127.0.0.2:{denied_port}"); - let worker_authorized = tokio::time::timeout(Duration::from_secs(10), async { - loop { - if browser - .observations - .lock() - .unwrap() - .iter() - .any(|call| call == &worker_authorization) - { - break; - } - tokio::time::sleep(Duration::from_millis(10)).await; - } - }) - .await; - if worker_authorized.is_err() { - assert!( - tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) - .await - .is_err(), - "worker request bypassed host authorization and connected directly" - ); - panic!( - "worker request did not reach host authorization: {:?}", - browser.observations.lock().unwrap() - ); - } - tokio::select! { - done = tokio::time::timeout(Duration::from_secs(10), worker_done_rx) => { - done.expect("worker request completes within ten seconds") - .expect("worker completion fixture receives the done request"); - } - accepted = denied_listener.accept() => { - let (stream, _) = accepted.expect("denied listener remains open"); - drop(stream); - panic!("worker request connected directly to the denied private listener"); - } - } - assert_eq!( - extra_allowed_connections.load(Ordering::SeqCst), - 1, - "only the worker completion request reached the allowed fixture after navigation" - ); - assert!( - tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) - .await - .is_err(), - "worker request connected directly to the denied private listener after completion" - ); - - let closed: DesktopResponse = browser - .proxy - .call( - browser_names::methods::CLOSE_SESSION, - (serde_json::json!({"session": browser.session}),), - ) - .await?; - assert!( - closed.ok, - "browser session did not close: {:?}", - closed.error - ); - browser.broker_task.abort(); - allowed_server.abort(); - Ok(()) -} diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/worker.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/worker.rs new file mode 100644 index 000000000..4d77c63e1 --- /dev/null +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/worker.rs @@ -0,0 +1,99 @@ +use super::*; + +#[tokio::test] +async fn live_chromium_module_routes_worker_egress_through_host_authorization() +-> tinybus::Result<()> { + let allowed_listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?; + let page_port = allowed_listener.local_addr()?.port(); + let denied_listener = tokio::net::TcpListener::bind("127.0.0.2:0").await?; + let denied_port = denied_listener.local_addr()?.port(); + let html = format!( + "" + ) + .into_bytes(); + let (served_tx, served_rx) = tokio::sync::oneshot::channel(); + let (worker_done_tx, worker_done_rx) = tokio::sync::oneshot::channel(); + let extra_allowed_connections = Arc::new(AtomicUsize::new(0)); + let allowed_server = tokio::spawn(serve_fixture( + allowed_listener, + html, + extra_allowed_connections.clone(), + served_tx, + Some(worker_done_tx), + )); + + let allowed_address = format!("127.0.0.1:{page_port}"); + let browser = + start_browser_with_fixture_host(allowed_address, page_port, "/worker-fixture", served_rx) + .await?; + + let worker_authorization = format!("authorize:fixture-policy:41:127.0.0.2:{denied_port}"); + let worker_authorized = tokio::time::timeout(Duration::from_secs(10), async { + loop { + if browser + .observations + .lock() + .unwrap() + .iter() + .any(|call| call == &worker_authorization) + { + break; + } + tokio::time::sleep(Duration::from_millis(10)).await; + } + }) + .await; + if worker_authorized.is_err() { + assert!( + tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) + .await + .is_err(), + "worker request bypassed host authorization and connected directly" + ); + panic!( + "worker request did not reach host authorization: {:?}", + browser.observations.lock().unwrap() + ); + } + tokio::select! { + done = tokio::time::timeout(Duration::from_secs(10), worker_done_rx) => { + done.expect("worker request completes within ten seconds") + .expect("worker completion fixture receives the done request"); + } + accepted = denied_listener.accept() => { + let (stream, _) = accepted.expect("denied listener remains open"); + drop(stream); + panic!("worker request connected directly to the denied private listener"); + } + } + assert_eq!( + extra_allowed_connections.load(Ordering::SeqCst), + 1, + "only the worker completion request reached the allowed fixture after navigation" + ); + assert!( + tokio::time::timeout(Duration::from_millis(500), denied_listener.accept()) + .await + .is_err(), + "worker request connected directly to the denied private listener after completion" + ); + + let closed: DesktopResponse = browser + .proxy + .call( + browser_names::methods::CLOSE_SESSION, + (serde_json::json!({"session": browser.session}),), + ) + .await?; + assert!( + closed.ok, + "browser session did not close: {:?}", + closed.error + ); + browser.broker_task.abort(); + allowed_server.abort(); + Ok(()) +} diff --git a/crates/tinycomputer/src/tinybus_module/mod.rs b/crates/tinycomputer/src/tinybus_module/mod.rs index e7e3c93f6..d38baacd2 100644 --- a/crates/tinycomputer/src/tinybus_module/mod.rs +++ b/crates/tinycomputer/src/tinybus_module/mod.rs @@ -111,7 +111,6 @@ tinybus_module::module_export_optional_static! { mod static_link_tests; #[cfg(all(test, feature = "static-link", live_module_browser_egress_tests))] -#[path = "browser_egress_live_tests.rs"] mod browser_egress_live_tests; #[cfg(test)] From b9aa8d6da2c2a72f456deffb8da3894f20747eea Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:47:48 +0000 Subject: [PATCH 15/16] test(browser_egress): remove trailing blank line Drop a stray blank line at the end of the live egress test module so the file ends cleanly after the last test. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../src/tinybus_module/browser_egress_live_tests/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs index 955c4ca44..f6732792e 100644 --- a/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs +++ b/crates/tinycomputer/src/tinybus_module/browser_egress_live_tests/mod.rs @@ -319,4 +319,3 @@ async fn live_chromium_module_dials_only_the_host_returned_socket_and_rejects_ch allowed_server.abort(); Ok(()) } - From 37cc9f4fbda57c93644f017f6f23549a9b1d6c29 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Thu, 22 Oct 2026 22:48:23 +0000 Subject: [PATCH 16/16] test(browser): document opt-in worker egress coverage Co-authored-by: Medulla --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index ae778e276..bb65b9c98 100644 --- a/.env.example +++ b/.env.example @@ -118,6 +118,6 @@ TINYCOMPUTER_LAB_SELF_EMAIL= # TINYCOMPUTER_LIVE_BROWSER=1 # Compile and run the linked browser egress tests against installed Chromium. # TINYCOMPUTER_LIVE_BROWSER_TESTS=1 -# Compile and run TinyComputer's module-path egress test against installed Chromium +# Compile and run TinyComputer's module-path egress tests against installed Chromium # using only local fixture listeners: -# TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test --manifest-path crates/tinycomputer/Cargo.toml -p tinycomputer --lib --features static-link tinybus_module::browser_egress_live_tests::live_chromium_module_dials_only_the_host_returned_socket_and_rejects_changed_policy -- --exact --nocapture +# TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test --manifest-path crates/tinycomputer/Cargo.toml -p tinycomputer --lib --features static-link tinybus_module::browser_egress_live_tests -- --nocapture