Skip to content

Add CLI test coverage and close remaining explore.py coverage gaps - #69

Merged
lorenzoliuzzo merged 1 commit into
mainfrom
fix/coverage-and-bugs
Jul 12, 2026
Merged

Add CLI test coverage and close remaining explore.py coverage gaps#69
lorenzoliuzzo merged 1 commit into
mainfrom
fix/coverage-and-bugs

Conversation

@lorenzoliuzzo

Copy link
Copy Markdown
Contributor

Summary

  • cli.py had 0% test coverage; add tests/test_cli.py covering new/list/explore subcommands, policy-deny, unknown-issue error handling, and --engine dispatch wiring.
  • Close remaining explore.py coverage gaps (deterministic-only render branches, unparsable-Engine-reply degrade).
  • Investigated the known markdown-fence JSON-parsing concern flagged for this file: fence-stripping already happens in ClaudeCLIEngine (mythings-core, commit 1cc97f8) before explore.py ever sees result.text, so there's no bug here. Added a regression test for the belt-and-suspenders JSONDecodeError degrade path in _propose_brief instead.
  • No real bugs found in cli.py or the remaining explore.py gaps — all were correct code, just untested. No GitHub issue filed.

Coverage: TOTAL 78% -> 99% (cli.py 0% -> 98%, explore.py 95% -> 99%).

Test plan

  • pytest --cov=src --cov-report=term-missing — 29 tests pass, 99% total coverage
  • ruff check src tests — clean

🤖 Generated with Claude Code

cli.py had zero test coverage (0%). Add tests/test_cli.py covering the
new/list/explore subcommands, policy-deny path, unknown-issue error
handling, and --engine dispatch wiring, faking the gh/Claude CLI
subprocess boundary rather than mocking internal modules.

Also close the remaining explore.py gaps: the deterministic-only render
branches (web prior art + similar ideas with no Engine attached) and the
unparsable-Engine-reply degrade path. Investigated the markdown-fence
JSON-parsing concern flagged for this file; fence-stripping already
happens in ClaudeCLIEngine (mythings-core) before explore.py ever sees
the text, so no bug there — just added a regression test for the
belt-and-suspenders JSONDecodeError degrade in _propose_brief.

Coverage: TOTAL 78% -> 99% (cli.py 0% -> 98%, explore.py 95% -> 99%).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@lorenzoliuzzo
lorenzoliuzzo merged commit 3abd02e into main Jul 12, 2026
2 checks passed
@lorenzoliuzzo
lorenzoliuzzo deleted the fix/coverage-and-bugs branch July 12, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant