feat(sdk): cross-society types — CrossSocietyContext, ReputationEnvelope, MCPContextResource#195
Merged
Merged
Conversation
…nvelope, MCPContextResource Implements §7.3–7.6 from mcp-protocol.md: OutcomeClass, PropagationScope, CrossSocietyInteractionType enums, CrossSocietyContext envelope, ReputationEnvelope for R7 actions, MCPContextResource for context resources. ErrorCategory extended with CROSS_SOCIETY (30 error codes, up from 24). Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced May 16, 2026
dp-web4
added a commit
that referenced
this pull request
May 17, 2026
Completes integration wiring for the cross-society MCP types (OutcomeClass, PropagationScope, CrossSocietyInteractionType, CrossSocietyContext, ReputationEnvelope, MCPContextResource) that landed on main via PR #195 but lacked tests, error registry entries, and package exports. errors.py: - Add CrossSocietyError subclass (was in __all__ but undefined) - Add 6 ErrorMeta registry entries for §7.6 cross-society codes - Add _CATEGORY_SUBCLASS dispatch for CROSS_SOCIETY __init__.py: - Export 6 cross-society MCP types + CrossSocietyError (369→376 exports) test_mcp_cross_society.py (NEW): - 37 tests: enum values, construction, defaults, to_dict/from_dict round-trips, frozen checks, package-level import verification test_errors.py: - Update assertions: 24→30 codes, 6→7 categories, per-category counts - Add CrossSocietyError subclass/metadata/serialization tests Re-scoped per PR #196 rejection directive: tests + integration wiring only, no mcp.py formatting churn. 2746 passed, 8 xfailed. mypy --strict clean. ruff lint/format clean. Co-authored-by: Claude Opus 4.6 <[email protected]>
6 tasks
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
OutcomeClass,PropagationScope,CrossSocietyInteractionTypeenumsCrossSocietyContextenvelope for cross-society MCP calls (§7.4)ReputationEnvelopefor signed R7 action outcomes (§7.3)MCPContextResourcefor context resource definitions (§6.3)ErrorCategorywithCROSS_SOCIETY(30 error codes, up from 24)All types include
to_dict()/from_dict()round-trip serialization.Test plan
python -m pytest web4-standard/implementation/sdk/tests/passesweb4.mcpandweb4.errors🤖 Generated with Claude Code