Skip to content

Raise Phase 6 test coverage with JWT, HTTP lifecycle, and CI matrix. - #14

Open
aviabhijit55-ship-it wants to merge 1 commit into
nitrocloudofficial:developfrom
aviabhijit55-ship-it:phase-6-testing-coverage
Open

Raise Phase 6 test coverage with JWT, HTTP lifecycle, and CI matrix.#14
aviabhijit55-ship-it wants to merge 1 commit into
nitrocloudofficial:developfrom
aviabhijit55-ship-it:phase-6-testing-coverage

Conversation

@aviabhijit55-ship-it

Copy link
Copy Markdown

Summary
Closes the Phase 6 testing gap from dev-plan/PHASE-6-testing-coverage.md — raise coverage beyond the thin per-phase suites and add cross-cutting / integration tests before v1.0.0.
Adds dedicated coverage for DI edge cases (circular and missing deps, singletons), pipeline order (guards → middleware → pipes → interceptors → handler → filters, plus short-circuit and filter catch), MCP error shape, JWT/config/guards, nested modules, HTTP tools/call lifecycle, events, logger STDIO safety, CLI install, and the NitroTestingModule harness.
Wires measurement and the 3.10–3.12 matrix: pytest --cov=nitrostack, pytest.ini, tox.ini, and CI (.github/workflows/test.yml) now run coverage on Python 3.10, 3.11, and 3.12.
Small production fixes required so those tests are real, not mocked: circular-dep detection, OAuth token/audience errors, scope helpers, EventEmitter on/off/once, and pipeline closure binding.
Plan DoD: 34 test_*.py files (target was 25+). Branch: phase-6-testing-coverage.

Test plan:

  • 1. pytest tests --cov=nitrostack --cov-report=term-missing is green and line coverage is 50%+
  • 2. find tests -name 'test_*.py' | wc -l is 25+
  • 3. tox (or the CI matrix) passes on 3.10, 3.11, 3.12
  • 4. Run the full suite twice and confirm the same pass/fail (no flakes)
  • 5. Spot-check new files: test_di_edge_cases.py, test_pipeline_order.py, test_error_handling.py, test_lifecycle_http.py, test_transport_http.py
  • 6. Confirm existing Phase 1–5 tests (test_tasks, test_oauth, widgets, CLI, transports) still pass
  • 7. Confirm no raw traceback leaks on a failing HTTP/STDIO tool call (MCP error shape)

Close remaining SDK test gaps (JWT/config/guards, nested modules, HTTP JWT wiring) and add pytest-cov plus the 3.10–3.12 CI/tox matrix per dev-plan/PHASE-6-testing-coverage.md.
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.

2 participants