Files
Strata/tests/tuning
Niko1221 70bfa88d66 tests: no test reaches the network (lane 15)
conftest.py checks every connect and every name lookup of the test process: loopback and local sockets pass, anything else is refused at once
(ConnectionRefusedError / gaierror, which the code under test reads as offline) and the test FAILS at its end, naming the host and the place in
the code the reach came from. A live test sets STRATA_TEST_ALLOW_NETWORK=1 itself (the live-download test class in tools/ does). Child
processes are not covered.

Three named allowances, counted per test and printed once at the end of the run ("network guard: allowances used": test id, allowance, address):
(a) a UDP connect() (it only names the peer and sends nothing), (b) a lookup of this computer's own host name, (c) the RFC 5737 documentation
addresses 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 (nothing answers them). tests/terminal/test_net_guard.py pins that an address outside
them, a real host name and a TCP connect outside those ranges still fail, and that each use is counted.
tests/terminal/test_owner_transport.py::TestLoopbackTransport::test_it_binds_loopback_only (a TCP connect to 203.0.113.1, on purpose) and
serve/test_security.py::ListenAddress::test_ipv6_loopback (a UDP connect to learn the outgoing address, and the computer's own name) pass through
allowances (c) and (a)/(b); those two tests are not changed.

Five tests of setup / launch / update looked up real host names and are fixed with a PC that has no name service (net_dead.no_name_resolution)
or, for setup.main's model-list read, STRATA_FEED_MODELS=0: tools/test_setup_unsloth.py::IQ4XS::test_family_default_and_menus,
tests/terminal/test_drafting_tuned.py::SetupOnAMac::test_offline_it_says_nothing, tests/terminal/test_update_notice.py::Offline (the DNS and the
proxy test), tests/tuning/test_components.py::TestInterruptedTransfer::test_a_partial_file_larger_than_the_declared_size_is_discarded.

Full check with the guard on (py-tools / py-tests / py-serve): p2006 (internet) 1713 / 3556 / 1495 passed, 0 failed; l620 (no internet)
1713 / 3556 / 1495 passed, 0 failed.
2026-11-10 20:16:02 +01:00
..