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
Commit 27989d6
Browse filesBrowse the repository at this point in the historyBrowse files
PR #35 (release/0.7.6) failed all four CI jobs (test 3.10/3.11/3.12,
coverage, codecov/patch) on the same root cause + one latent bug
masked by it. This commit lands the fixes plus the last-mile tests
that bring coverage above the 82% threshold.
CI failure root
---------------
* tests/test_integrations_fastapi.py does from fastapi import ...
at module top-level. CI installs only pip install -e '.[dev]',
and fastapi was declared as an *optional* [fastapi] extra,
NOT in [dev]. Pytest collection aborted with
ModuleNotFoundError: No module named 'fastapi' → all 4 jobs red.
* Fix: add fastapi>=0.100,<1.0 to [dev]. Same precedent as
langchain-core (already in [dev] for the same import-time
contract: nullrun.instrumentation.langgraph is eager-imported
from nullrun.decorators at collection time, so the test extras
must cover the import chain).
Latent bug surfaced by the first fix
------------------------------------
The same PR refactored Transport._send_batch_with_retry_info to
route the /track/batch body through _signed_request_body for
canonical-JSON serialization (matching /gate and /execute). The two
sibling call sites use the module-level helper _signed_request_body
(no self.); this one used self._signed_request_body by typo.
Result: AttributeError on every batch flush, breaking 15 existing
tests across test_transport.py / test_track_batch_retry.py /
test_integration_contract.py / test_signal_safety.py. As long as
the fastapi collection error aborted pytest, this was hidden. Fixed
to _signed_request_body(...) with a docstring noting why it is
module-level and what the bug looked like.
Coverage padding (codecov/patch was failing on this too)
--------------------------------------------------------
Total coverage on the failing CI run was 81.98% — 0.02pp under the
fail-under=82 gate. After the two fixes above it would have
recovered to ~82.0% on the dot, so I added minimal tests for the
cheapest-to-cover gaps:
* tests/test_breaker_main.py (new) — covers the 5 statements in
nullrun.breaker.__main__.main() (0% → 100%). The module
exists so python -m nullrun.breaker exits cleanly instead of
failing with No module named nullrun.breaker.__main__; the
previous fix-mechanism was return 0 after a print, but no
test was exercising it.
* tests/test_status.py — extends TestSummary with seven
scenarios covering each conditional branch of NullRunStatus.summary()
(organization_id, workflow_id, workflow_state != Normal,
backend_reachable=False, ws_connected=False, recent_errors).
status.py jumps 84.52% → 98.81%.
* tests/test_integrations_fastapi.py — four tests on
_build_headers covering non-numeric, zero, negative, and
resume_after (the WorkflowPausedException code path).
integrations/fastapi.py jumps 90.22% → 94.57%.
After all three: TOTAL 81.98% → 82.46%, comfortably above the gate.
Verification
------------
* Local pytest: 997 passed, 13 skipped, 0 failed
(Windows / Python 3.14.2, 8m47s — same env the original commit
was validated in).
* python -m coverage report — 82.46%, no fail-under complaint.
0 commit comments