Problem
The only test that drives System.insert_self() against a real server is tests/test_node_to_node_sync.py:83, inside a @pytest.mark.network module. CI runs pytest -m "not network", so that path is never exercised there.
That matters more after #42: insert_self() now raises on a rejected POST, and the cross-node sync flow calls it in a helper (_ensure_target_system) whose failure behavior nobody checks automatically. A regression in the raise/no-raise contract would only be caught by whoever remembers to run the network suite locally against a live OSH on :8282 / :8382.
This isn't a defect in shipped code — it's a coverage gap that lets one back in unnoticed.
Reproduce
uv run pytest -m "not network" --cov=oshconnect.resources.system
insert_self()'s server-facing path shows only the mocked-unit coverage added in #42; the sync helper that calls it shows none.
Possible fix
Either is reasonable:
- Add a mocked (non-network) test for the cross-node sync insert path, so the contract is guarded in CI and the network test stays a genuine live-server smoke test.
- Stand up an OSH container in CI and run the network suite on a schedule (nightly) rather than per-PR — heavier, but covers the whole
-m network set, not just this path.
(1) is the cheap one and covers the specific regression risk from #42.
Related: #42.
Problem
The only test that drives
System.insert_self()against a real server istests/test_node_to_node_sync.py:83, inside a@pytest.mark.networkmodule. CI runspytest -m "not network", so that path is never exercised there.That matters more after #42:
insert_self()now raises on a rejected POST, and the cross-node sync flow calls it in a helper (_ensure_target_system) whose failure behavior nobody checks automatically. A regression in the raise/no-raise contract would only be caught by whoever remembers to run the network suite locally against a live OSH on:8282/:8382.This isn't a defect in shipped code — it's a coverage gap that lets one back in unnoticed.
Reproduce
uv run pytest -m "not network" --cov=oshconnect.resources.systeminsert_self()'s server-facing path shows only the mocked-unit coverage added in #42; the sync helper that calls it shows none.Possible fix
Either is reasonable:
-m networkset, not just this path.(1) is the cheap one and covers the specific regression risk from #42.
Related: #42.