From 1261ba8e4de9e34d9b2ba9ea9018b480e676375b Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Mon, 26 Oct 2026 01:09:04 +0000 Subject: [PATCH 1/2] test(tinycomputer): cover browser egress config alongside executable Extend the browser configuration test to assert that an executable and an egress policy are both read from the same config, and add a case where browser args are rejected even when a valid egress block is present. Vendor submodule pointers are bumped to match. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- .../tinybus_module/tinybus_module_tests/config_tests.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs b/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs index ce57f7910..bd3631086 100644 --- a/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs @@ -181,6 +181,14 @@ fn the_browser_configuration_is_read_or_refused() { .unwrap(); assert_eq!(egress.egress.as_ref().unwrap().policy_id, "host-policy"); assert_eq!(egress.egress.as_ref().unwrap().generation, 7); + let egress_with_executable = BrowserDefaults::from_config(&json!({"browser": { + "executable": "/usr/bin/chromium", + "egress": {"policy_id": "host-policy", "generation": 7} + }})) + .unwrap(); + assert_eq!(egress_with_executable.executable.as_deref(), Some("/usr/bin/chromium")); + assert_eq!(egress_with_executable.egress.as_ref().unwrap().policy_id, "host-policy"); + assert_eq!(egress_with_executable.egress.as_ref().unwrap().generation, 7); // Settling promptly and opening the browser early are on unless turned // off. let unset = BrowserDefaults::default(); From f47fbce6a3b1a642ae21ed827f91712d739aa282 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Mon, 26 Oct 2026 01:13:41 +0000 Subject: [PATCH 2/2] fix(tinybus_module): allow executable key in browser egress config The browser egress validation rejected configs that set an executable path, even though the field is supported and read elsewhere. The check now only rejects the args key, and the test assertions were reformatted to match. Auto-committed-on: cuttlefish Co-authored-by: Medulla --- crates/tinycomputer/src/tinybus_module/config.rs | 5 +---- .../tinybus_module_tests/config_tests.rs | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/crates/tinycomputer/src/tinybus_module/config.rs b/crates/tinycomputer/src/tinybus_module/config.rs index 588c72d49..251f18e52 100644 --- a/crates/tinycomputer/src/tinybus_module/config.rs +++ b/crates/tinycomputer/src/tinybus_module/config.rs @@ -171,10 +171,7 @@ impl BrowserDefaults { let expected_egress_keys = 2 + usize::from( cfg!(feature = "test-connector") && egress.contains_key("test_connector_map"), ); - if egress.len() != expected_egress_keys - || browser.contains_key("args") - || browser.contains_key("executable") - { + if egress.len() != expected_egress_keys || browser.contains_key("args") { return Err(invalid()); } Some(BrowserEgressConfig { diff --git a/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs b/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs index bd3631086..6c1a540e1 100644 --- a/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs +++ b/crates/tinycomputer/src/tinybus_module/tinybus_module_tests/config_tests.rs @@ -186,9 +186,18 @@ fn the_browser_configuration_is_read_or_refused() { "egress": {"policy_id": "host-policy", "generation": 7} }})) .unwrap(); - assert_eq!(egress_with_executable.executable.as_deref(), Some("/usr/bin/chromium")); - assert_eq!(egress_with_executable.egress.as_ref().unwrap().policy_id, "host-policy"); - assert_eq!(egress_with_executable.egress.as_ref().unwrap().generation, 7); + assert_eq!( + egress_with_executable.executable.as_deref(), + Some("/usr/bin/chromium") + ); + assert_eq!( + egress_with_executable.egress.as_ref().unwrap().policy_id, + "host-policy" + ); + assert_eq!( + egress_with_executable.egress.as_ref().unwrap().generation, + 7 + ); // Settling promptly and opening the browser early are on unless turned // off. let unset = BrowserDefaults::default();