Exercise 1: Extending the Contract — Possible Solution ==================================================================== THE EXTENDED CONTRACT ------------------------------ USER_SERVICE_CONTRACT_V2 = { 'id': int, 'email': str, 'active': bool, 'created_at': str, } RESULTS ------------------------------ Contract test against UserServiceV1: ["missing field 'created_at'"] Contract test against UserServiceV2: ["missing field 'active'", "missing field 'created_at'"] Both existing providers now fail, for two different reasons: V1 is otherwise compliant and only lacks the newly-required field; V2 was already broken (missing 'active') and now fails for two reasons at once. class UserServiceV1Fixed: def get_user(self, user_id): return {'id': user_id, 'email': 'alice@example.com', 'active': True, 'created_at': '2026-01-01'} Contract test against UserServiceV1Fixed: PASS WHY THIS WORKS AS AN ANSWER ------------------------------ This demonstrates that a contract is a genuinely shared, versioned agreement, not a one-time check: extending it immediately reveals every provider implementation's own compliance status against the new requirement, without needing to inspect each provider's source code by hand. It also shows contract test output scales naturally to multiple simultaneous violations - UserServiceV2's own two separate defects (the pre-existing field rename and the newly-added missing field) are both reported together, rather than the test stopping at the first failure.