Skip to content

fix: unify HTTP factory and migrate tests to official MCP transport - #36

Open
jpsiddharth2008 wants to merge 7 commits into
nitrocloudofficial:developfrom
jpsiddharth2008:feature/issue-23-http-factory
Open

jpsiddharth2008 wants to merge 7 commits into
nitrocloudofficial:developfrom
jpsiddharth2008:feature/issue-23-http-factory

Conversation

@jpsiddharth2008

@jpsiddharth2008 jpsiddharth2008 commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Closes #23. Complete the HTTP factory migration after removal of the duplicate
JSON-RPC sidecar. Official MCP 2.x remains the sole owner of /mcp.

PR #34 is now merged. This branch has been rebased onto current develop
(63ecd92); the old dependency commits do not need to be merged again.

Changes

  • Migrate tests of deleted dispatch/replay classes and ping helpers to the real
    official MCP HTTP application, retaining parsing, protocol-contract, SSE,
    response-header and identity coverage.
  • Keep the test-module importability registry enabled and fix the four reported
    collection errors without compatibility shims or excluded modules.
  • Align discovery, capabilities and subscription handlers: legacy compatibility
    remains enabled; auto/modern advertise false and reject resource subscriptions.
  • Configure the resolved era on every server before startup, including additional
    instances and stdio. Apply protocol policy through public MCP middleware.
  • Retain one HTTP factory and one Starlette CORS layer, configured origin checks,
    dynamic browser parameter headers, health/slash handling and /json/version.
  • Retain public stdio runner APIs, with AST and behavioral regression coverage.

Post-rebase verification

MCP 2.2.0. Complete collection succeeds with 866 tests. Full suites use no
ignored files, deselections, skips or xfails:

Environment Result Coverage
Linux/WSL Python 3.10.21 866 passed 86.11%
Linux/WSL Python 3.11.16 866 passed 86.11%
Linux/WSL Python 3.12.14 866 passed 86.11%
Windows Python 3.12.14 866 passed 86.11%

git diff --check passes. The local results above use MCP 2.2.0.

Hosted CI: all checks passed

GitHub Actions run 40693461293
passed on the rebased head 90ddc61, using MCP 2.3.0:

Linux CI job Result Coverage
Python 3.10 866 passed 86.20%
Python 3.11 866 passed 86.18%
Python 3.12 866 passed 86.11%

Earlier hosted results for 71e47f1 are historical; the run linked above
validates the new published head.

python -m pytest tests --collect-only -o addopts= -q
python -m pytest tests --cov=nitrostack --cov-report=term-missing --timeout=60 --tb=short -o addopts= -q

See docs/pr36-review-verification.md for reproduction details and the rebase
record. PR #37 remains stacked on this PR and should land afterward.

@Shreyavemana Shreyavemana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested PR #36 locally.

  • The issue verification tests pass (46 passed).
  • However, the full test suite fails: four test files fail during collection because of removed modules/functions, and two additional tests fail after excluding them:
    • test_mcp20_blueprint.py — missing nitrostack.transports.dispatch
    • test_mcp20_deprecated.py — missing nitrostack.transports.dispatch
    • test_mcp20_jsonrpc_wire.py — missing nitrostack.transports.dispatch
    • test_mcp20_stateless_http.py — cannot import build_ping_response

(Additional failed test after removing the above ones)

  • test_mcp20_test_modules_importable
  • test_supported_versions_per_era

Please address the remaining test failures and rerun the full test suite.

@manish-wekan
manish-wekan changed the base branch from main to develop October 21, 2026 10:14
@jpsiddharth2008 jpsiddharth2008 changed the title Feature/issue 23 http factory fix: unify HTTP factory and migrate tests to official MCP transport Oct 27, 2026
@manish-wekan

manish-wekan commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Restore Access-Control-Expose-Headers, which is missing compared with develop.

Make the source-scanning tests independent of the directory pytest runs from.

Do the #22 request-context items or link a follow-up issue.

Finally Merge it ahead of #34, #35 and #91 , since it already includes #34's commit.

~sent from claude-code

@jpsiddharth2008
jpsiddharth2008 force-pushed the feature/issue-23-http-factory branch from 71e47f1 to 90ddc61 Compare October 28, 2026 13:06

This branch has not been deployed

No deployments
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.

3 participants