You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test coverage: the runtime probe is at 43% while the project is at 90%; add probe tests and a coverage floor in CI #115
Problem:coverage run -m pytest tests (1265 tests) gives 90% line coverage over src/secfoo, but two modules are far below it and nothing in CI would notice a regression:
Module
Statements
Missed
Coverage
src/secfoo/sensor/probe.py
355
203
43%
src/secfoo/sensor/__init__.py
21
10
52%
The probe is the piece that runs inside users' applications (secfoo instrument, python -m secfoo.sensor), where a bug is most expensive, and it is the module with the only platform-specific test failure we know of (see the macOS CI issue).
Build:
Bring sensor/probe.py to at least 85%: the sys.monitoring callbacks, event batching and backpressure, reconnect after the sensor dies, the no-sensor fallback, shutdown ordering, and the frame/filename filters. Drive it through the conformance kit (secfoo sensor conformance, Probe ↔ sensor protocol and conformance kit (one contract for every runtime) #73) where possible so the tests double as protocol checks.
Add pytest-cov to the dev extra, run tests with --cov=secfoo --cov-report=xml --cov-fail-under=88 in CI (a floor just under today's number; raise it in the PR that lifts the probe), and upload the XML as an artifact. Print the per-file table in the job summary so a drop is visible on the PR.
Spot-check the next lowest modules after the probe (coverage report --sort=cover) and list them in the PR as follow-ups if they are under 75%.
Where to look:src/secfoo/sensor/probe.py, src/secfoo/sensor/__init__.py, tests/test_sensor/, src/secfoo/runtime/conformance/, .github/workflows/ci.yml, pyproject.toml.
Done when: probe coverage is at or above 85% with tests that assert behaviour (not just execute lines); CI fails when total coverage drops below the floor; the coverage table appears in the job summary.
Activity
test(sensor): cover the Python probe in-process and gate CI on coverage
fix(sensor): bound close, serialise stop, release profiler; test reco…
test(sensor): cover the Python probe in-process and gate CI on covera…