Raise Phase 6 test coverage with JWT, HTTP lifecycle, and CI matrix. - #14
Open
aviabhijit55-ship-it wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: