Context
sonarcloud was wired up in #206. current overall coverage is ~32% (1131 statements, 768 uncovered). target is >90%.
only one test file exists today: tests/test_token_refresh.py. everything else is untested.
Per-module breakdown
| module |
stmts |
miss |
cover |
_cli/_runtime/_runtime.py |
414 |
299 |
27.78% |
_cli/_runtime/_session.py |
213 |
172 |
19.25% |
_cli/_runtime/_tracer.py |
126 |
110 |
12.70% |
_cli/_runtime/_factory.py |
65 |
44 |
32.31% |
_cli/_runtime/_token_refresh.py |
152 |
48 |
68.42% |
_cli/_runtime/_context.py |
16 |
6 |
62.50% |
_cli/_runtime/__init__.py |
8 |
3 |
62.50% |
_cli/_utils/_config.py |
73 |
49 |
32.88% |
_cli/cli_new.py |
47 |
36 |
23.40% |
middlewares.py |
4 |
1 |
75.00% |
Suggested follow-up PRs
Notes
- sonarcloud's new-code gate (default 80%) already blocks regressions on incoming PRs, so this can land incrementally without a big-bang test PR.
- tracer + runtime tests will likely need an
anyio/mcp.shared.memory based in-process MCP server fixture.
Context
sonarcloud was wired up in #206. current overall coverage is ~32% (1131 statements, 768 uncovered). target is >90%.
only one test file exists today:
tests/test_token_refresh.py. everything else is untested.Per-module breakdown
_cli/_runtime/_runtime.py_cli/_runtime/_session.py_cli/_runtime/_tracer.py_cli/_runtime/_factory.py_cli/_runtime/_token_refresh.py_cli/_runtime/_context.py_cli/_runtime/__init__.py_cli/_utils/_config.py_cli/cli_new.pymiddlewares.pySuggested follow-up PRs
cli_new.pyand_utils/_config.py— smallest surface, mostly file IO and templating, easy wins_runtime/_factory.py— pure wiring ofregister_runtime_factoryand the factory class_runtime/_context.py+_runtime/__init__.py— small helpers, finish them off_runtime/_token_refresh.py— already 68%, push remaining branches_runtime/_session.py— needs an in-memory MCP session double; biggest mocking effort_runtime/_runtime.py— the bulk; depends on session test infrastructure_runtime/_tracer.py— OTEL span assertionsNotes
anyio/mcp.shared.memorybased in-process MCP server fixture.