Repository navigation
Issue #1845: one opt-out for the tests that start the device-sync service - #1846
Merged
emmertex merged 1 commit intoDec 2, 2026
Merged
Conversation
…ervice lcc_testkit::lan_tests(discovery) skips, with a System skip that names CHROMAFORGE_SKIP_LAN_TESTS, every lcc-peer and lcc-engine test that binds sockets on all interfaces, so a developer's Mac isn't asked about incoming connections for each rebuilt test binary. The macOS CI-runner skip moves into the same function and still applies only to the two tests that need discovery. A source-scan test in each crate fails for a test that starts the service without the check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
|
Looks good — merging. Two small nits for a follow-up, not blocking: in |
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.
Fixes #1845
Problem
The tests that start the device-sync service (
lcc_peer::Service::startbinds a TCP listener on0.0.0.0and joins the mDNS group) make macOS ask "accept incoming network connections?" for every test binary, and a rebuild changes the binary's hash, so allowing it once never lasts and the run waits for an answer. About twenty tests do it: 15 inlcc-peer(service::tests::) and 2 inlcc-engine. The only existing skip wasmacOS && CI set, for the CI runner's multicast timeouts; it covered two of them and did nothing on a developer's Mac.docs/ci.mdsaid five tests skip there.Change
lcc_testkit::lan_tests(discovery: bool)(next toprobe) returns false and records aSystemskip whenCHROMAFORGE_SKIP_LAN_TESTSis set to a non-empty value other than0; the skip names the variable. Withdiscoverytrue it also skips on the macOS CI runner, which is the old check moved in. The 15lcc-peerand 2lcc-enginetests that start the service (directly, throughstart()/paired(), or throughsync.find) call it first. A source-scan test in each crate fails for a test that starts the service without it.lcc-peerandlcc-enginetest that starts the service skips naming the variable and returns before starting it, so no socket opens on a non-loopback address —cargo test -p lcc-peer --lib(51 pass) and-p lcc-engine --lib device_sync(14 pass) in 2–3 s with it set;lsofon a process showedsync.find {on:true}binds*:<udp>and*:<tcp>, andsync.find {on:false}binds nothing; no firewall prompt on a Mac.lan_skip_reasonreturnsNoneand the guards return at once; the same tests ran unset on this Mac and only the two already known to fail here (multicast doesn't loop back) failed.crates/peerandcrates/engineare gone. It takesdiscoveryso the skip stays on the two tests that had it (applying it to all 17 would skip 15 more on that runner).every_test_that_starts_the_service_checks_the_lan_opt_outincrates/peer/src/service/tests.rsandcrates/engine/src/device_sync/tests.rs; each seen failing with one guard removed, and for a throwaway test with a doc comment after#[test].docs/ci.mdnames the variable and the firewall prompt next to the macOS note and lists the two tests that skip there.recordlikeskip!, so it is reported as aSystemskip intarget/ci/report.json; CI doesn't set the variable andci/skip-allowlist.tomlis unchanged.Not in this PR: a guard for a test that starts the service through some other helper than the ones the scans name (
start(,paired(,session(,sync.find, …): the scan is a token scan.lcc-ui-egui's Sync-page tests (tests_settings_search.rs) open no socket without a settings folder and were left alone.Manual: none, no user-visible change.
How it was checked
cargo xtask ci --quickandcargo test -pfor the touched crates pass on this branch, up to date withstaging(merged in, not rebased);silisn't affected (no pipeline or develop change)The gate passed on this branch; it is behind
stagingby commits that touch other files and merges cleanly, so it hasn't been merged in.staging):lan_skip_reasontests withv != "0"flipped; the peer and engine scans with one guard removed (a_shared_device_name_is_reported,cancel_pairing_without_a_pairing_is_harmless), and with an unguarded throwaway test using#[ignore]and a doc comment, and one using onlysync.rename.Merging
unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.CHROMAFORGE_SKIP_LAN_TESTS, so the tests run as before there.Checklist
lcc_testkit::lan_tests, a dev-dependency that reads an environment variable and records a skiplan_testsis called by the 17 tests🤖 Generated with Claude Code