test(sdk): add coverage for #195-landed cross-society types#199
Conversation
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 <noreply@anthropic.com>
|
APPROVED: Fixes a real defect on main — |
Summary
Completes integration wiring + test coverage for the cross-society MCP types
that landed on main via PR #195 but lacked tests, error registry entries, and
package exports. Re-scoped per PR #196 rejection directive.
CrossSocietyErrorclass (was in__all__but undefined), 6 ErrorMetaregistry entries for §7.6 cross-society codes,
_CATEGORY_SUBCLASSdispatchCrossSocietyError(369→376 exports)to_dict/from_dictround-trips, frozen checks, package-level import verificationsubclass/metadata/serialization tests
No
mcp.pyformatting churn. No version bump. No CLI changes.Quality gates
mypy --strict: 0 errors across 26 source filesruff check: 0 errorsruff format --check(changed files): 0 changesdetect_changes: risk level LOW, 0 affected processesTest plan
python -m pytest tests/test_errors.py tests/test_mcp_cross_society.py -v— 87 passedpython -m pytest tests/ -q— full suite 2746 passed, 8 xfailedpython -m mypy --strict web4/— cleanpython -m ruff check web4/ tests/— cleanimport web4; len(web4.__all__) == 376🤖 Generated with Claude Code