Skip to content

refactor(mcp): finish #27 cleanup (test-only registries, wire leftovers) - #108

Merged
manish-wekan merged 2 commits into
developfrom
fix/27-mcp2026-cleanup
Nov 4, 2026
Merged

manish-wekan merged 2 commits into
developfrom
fix/27-mcp2026-cleanup

Conversation

@manish-wekan

@manish-wekan manish-wekan commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Finishes #27 and the leftovers from #24/#78. Builds on @jpsiddharth2008's code commit from #37 (2bb5dfa, cherry-picked with his authorship; conflicts resolved the same way as his c5b0427), without #37's two review-log docs.

 nitrostack/
 ├── protocol/
-│   ├── layers.py              # RuntimeLayer enum, test-only
 │   ├── method_contract.py     # (#37) ping table gone; keeps rejects_deprecated_method
 │   └── discovery.py           # (#37) sessionless initialize builder gone
 └── runtime/
-    ├── acceptance.py          # deliverable/criteria registry, test-only
-    └── conformance.py         # blueprint layout registry, test-only
 McpApplication._call_tool
   if era in (auto, modern) and is_task: raise -32602
-  if is_task and not has_task_support: raise -32021   # unreachable: only False on auto/modern
-  if era in (auto, modern) and is_task: raise -32602   # duplicate
-_stamp_discover_meta()                                # unused

Tests: registry/layout/count tests removed from test_mcp20_acceptance.py, test_mcp20_blueprint.py, test_mcp20_foundation.py; their behavioural tests stay. test_mcp24_wire_alignment.py (from #37) added. InFlightRegistry is still wired in app.py, so test_mcp20_concurrency.py stays (#27 item 6 is conditional on its deletion).

Evidence

  • Before (develop @ 0d51ee4): server/discover without headers → -32022 (HTTP 200); rg "ACCEPTANCE_CRITERIA|PROTOCOL_DELIVERABLES|assert_blueprint_layout" nitrostack tests → hits; 1159 passed.
  • After: discover without headers → -32020 (400 on modern); ping → -32601; task-augmented call on modern/auto → -32602, legacy → task created (unchanged); [mcp-2026] Replace sidecar tests with a TestClient matrix; drop ping exports #27 probe rg → empty; tests/test_mcp20_*.py 4,438 lines; 1227 passed locally (Python 3.12).

Merge Danger

Door: two-way

Pure deletions plus #37's wire fix; revert restores everything.

Blast Radius: imports

nitrostack.protocol no longer exports RuntimeLayer, MODERN_METHOD_CONTRACTS, MethodContract, contract_for, mcp_method_is_required, mcp_name_field, mcp_name_is_required, INITIALIZE_METHOD, build_sessionless_initialize_result. None are used in production code or templates; external code importing them would break (0.3.x, pre-1.0).

Closes #27

🤖 Generated with Claude Code

jpsiddharth2008 and others added 2 commits November 4, 2026 15:09
Remove runtime/acceptance.py, runtime/conformance.py and protocol/layers.py.
Nothing in production imported them; they only backed layout/count tests,
which go with them. Behavioural tests in the same files stay.

In core/app.py, drop the second copy of the 2026 task-augmentation guard,
the -32021 branch between the two copies (has_task_support is only False
on auto/modern, which the first guard already rejects with -32602), the
unused _stamp_discover_meta() helper and the now-unused import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@manish-wekan manish-wekan changed the title refactor(mcp): finish #27 cleanup refactor(mcp): finish #27 cleanup (test-only registries, wire leftovers) Nov 4, 2026
@manish-wekan
manish-wekan marked this pull request as ready for review November 4, 2026 09:43
@manish-wekan
manish-wekan merged commit 902c759 into develop Nov 4, 2026
3 checks passed
@manish-wekan
manish-wekan deleted the fix/27-mcp2026-cleanup branch November 5, 2026 12:58
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