Repository navigation
test(browser): cover live egress authority denial - #17
Merged
senamakel merged 4 commits intoOct 23, 2026
Merged
Conversation
Add a live test that navigates to a loopback address while the module is configured with an egress policy id that has no authority, asserting the navigation is rejected and the destination never receives a connection. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a live Chromium test that navigates with a generation the host does not match, asserting the request is denied before any socket is dialed. The fixture host now accepts an optional grant generation so it can return a stale value, letting the test confirm the module asks for authorization but never reaches socket consumption. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live Chromium egress test's host handlers now yield to the runtime before touching shared state, so the broker can interleave calls the way it would in production. The doc comment was also updated to use code formatting for the module name, and the long test function is explicitly allowed to exceed the line-count lint. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the abort and await of the allowed server and broker task ahead of the observation lock so the tasks are torn down before the assertions read the recorded calls. This avoids holding the mutex across the awaits and keeps the teardown ordering consistent between the two live tests. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds live Chromium module coverage that proves browser egress denies a loopback connection when the host authority is missing and rejects a stale policy generation before socket consumption. The checks load the TinyComputer module over TinyBus and verify that the destination listener receives no connection.
Local gates:
cargo fmt --all -- --checkcargo check -p tinycomputer --features static-linkTINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo test -p tinycomputer --features static-link --lib live_chromium_module_ -- --nocapture(3 passed)TINYCOMPUTER_LIVE_BROWSER_EGRESS_TESTS=1 cargo clippy -p tinycomputer --features static-link --all-targets -- -D warningsRefs tinyhumansai#111
Part of tinyhumansai/openhuman#7328
The canonical issue stays open for the final upstream PR. The
senamakel/tinydesktopfork has no matching tinyhumansai#111 issue to close.