Repository navigation
Restore 100% test coverage #201
Description
Context
pyproject.toml historically set fail_under = 100 for the coverage
gate. The recent rewrite temporarily dropped coverage from 100% to 87%,
so the gate was relaxed to 85% to land that work.
The relaxation is documented but it's debt — the project's quality
bar said 100% and the goal is to get back there.
What this issue tracks
Bring test coverage back up to 100% so fail_under = 100 can be
restored.
Why it matters
The 100% rule is a discipline, not just a number. It catches dead
code, forces edge cases to be tested, and makes deletions safe (if
something's only covered by the test that imports it, deleting the
test catches the unused code). Letting it slide is a one-way ratchet.
Where the gaps are
Run uv run coverage report --skip-covered for the current view.
Headline gaps from the last run (~297 missed statements + 135
partial branches across 24 files):
src/openrange/core/episode.py(~70 missed) —advance()until /
timeout paths,checkpoint/restore/fork,_terminal_state
branches, NPC error swallowing,close(). Needs new tests after
the dashboard tests were dropped.src/openrange/dashboard/(~53 missed) — same root cause: old
dashboard tests were deleted during the rewrite; replacements not
yet written.src/openrange/packs/cyber_webapp_offense_v1/modules — error
branches inllm_generation(LLM call fail / bad JSON / bad
source),sampling(validation paths insample_int/
weighted_pool),codegen/handlers(each kind branch in
_default_handler_body, AST splice failure paths), NPC factory
bad-config paths.- Smaller gaps in
core/builder.py,core/snapshot.py,
core/runtime_backing.py(defensive paths).
Where to start
pyproject.toml— thefail_undersetting + the coverage section.tests/— the existing tests as model for what to mirror.- Run
uv run coverage report --show-missingafter a test run to
see exact missed lines.
Acceptance
fail_under = 100restored inpyproject.toml.- CI passes.
Notes
This is mechanical but real test-writing work — probably ~200 lines
of test code spread across several files. Good help wanted task
for someone who wants to learn the codebase by exercising every
branch.
Some of the older branches that lost coverage are honestly defensive
code that's never going to fire in practice. For those, a
# pragma: no cover is fine — but don't reach for it as the first
move; write the test if you can.
Activity
[-][roadmap] Restore 100% test coverage[/-][+]Restore test coverage to 100% (relaxed to 85% during v1 / v0-deletion work)[/+][-]Restore test coverage to 100% (relaxed to 85% during v1 / v0-deletion work)[/-][+]Restore test coverage to 100%[/+][-]Restore test coverage to 100%[/-][+]Restore 100% test coverage[/+]chore(coverage): lower fail_under to 80 to absorb the refactor's cove…
larstalian commentedon Jun 9, 2026
Current view from a local
coverage run -m pytest(640 passed, 2 skipped; total 84%, floor is 80%). The biggest gaps sit squarely on the surface the incoming sim-to-real work will extend, which is worth noting as prioritization:openrange_pack_sdk/_harness.pysrc/openrange/core/episode.pypacks/cyber_webapp/.../realize.pyCONTAINER/backing branches (#252)src/openrange/dashboard/runs.pycyber_webapp/families/pentest.pysrc/openrange/core/pack.pyepisode.pyandrealize.pyare called out inpyproject.toml's own coverage note (lost the oldtest_v1_episode.pyHTTP round-trip). Closing these two first is high-leverage: they're the modules the backing/fidelity work (#251, #252) and cost metering (#253) will modify, so coverage here makes those changes safe rather than scary.test(cyber): cover manifest-knob edge cases; trim _forced_oracle per …
larstalian commentedon Oct 12, 2026
No longer involved with this project, so closing my open issues. Feel free to reopen anything you still want to track.