Skip to content

Expand and stabilize test coverage for adapters and proxies#138

Merged
scottscott merged 2 commits intonomoticai:mainfrom
scottscott:feat/test-coverage
Mar 19, 2026
Merged

Expand and stabilize test coverage for adapters and proxies#138
scottscott merged 2 commits intonomoticai:mainfrom
scottscott:feat/test-coverage

Conversation

@scottscott
Copy link
Collaborator

Summary

Expand and harden test coverage for Nomotic's web adapters, proxy layers, and simulation scenarios, while eliminating test flakiness from module-import side effects and RNG-dependent assertions.

Key Changes

  • Added substantial new coverage for:
    • tests/test_web_adapters.py (new file)
    • tests/test_proxy.py
    • tests/test_mcp_proxy.py
    • tests/test_framework_adapters.py
    • tests/test_adversarial.py
  • Added deterministic import-failure coverage test for FastAPI adapter:
    • tests/test_adapters.py
  • Stabilized flaky/new tests:
    • Removed sys.modules leakage from web adapter tests (cleanup after import stubbing)
    • Made equal-weight scenario sampling deterministic (patched random.choices)
  • Closed final targeted branch gaps:
    • Added proxy shutdown signal-handler test path
    • Added .coverage to .gitignore

Validation

  • pytest -q tests/test_framework_adapters.py tests/test_mcp_proxy.py tests/test_proxy.py tests/test_web_adapters.py
    • 194 passed
  • pytest -q tests/test_framework_adapters.py tests/test_mcp_proxy.py tests/test_proxy.py tests/test_web_adapters.py tests/test_adversarial.py
    • 236 passed
  • Targeted module coverage:
    • fastapi_adapter: 95%
    • flask_adapter: 100%
    • autogen_adapter: 100%
    • proxy: 99%
    • mcp_proxy: 89%
    • scenarios: 100%

Commits

  • 9f0c0bc test: expand and stabilize coverage for adapters and proxies

Add broad coverage for web adapters, proxy/mcp proxy flows, AutoGen integration, and simulation scenarios.

Harden reliability by eliminating sys.modules leakage and RNG flakiness, plus close remaining adapter/proxy branch gaps and ignore .coverage.

assisted-by: GitHub Copilot
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scottscott scottscott changed the title test: expand and stabilize coverage for adapters and proxies Expand and stabilize test coverage for adapters and proxies Mar 19, 2026
@scottscott scottscott self-assigned this Mar 19, 2026
@scottscott scottscott added the maintenance Upkeep, refactoring, and code quality improvements label Mar 19, 2026
@scottscott scottscott merged commit 4d51912 into nomoticai:main Mar 19, 2026
9 checks passed
@scottscott scottscott deleted the feat/test-coverage branch March 19, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Upkeep, refactoring, and code quality improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant