{"abstract":"While have_origin, event delay_sent produces complete/publish_offset instead of awaiting_delay/record_departure_time.","category":"Protocols","checks":14,"contract":"For the stipulated Four-event clock measurement exchange controller, initialize the explicitly shown resource registers from seed (1..5), then consume classified events sequentially. After each event return a deep snapshot of phase, resource registers, and cumulative emitted control frames. The explicit ten phase/event rules and their resource effects define admission and response semantics. Unlisted events preserve phase and emit rejection. Payload is the consecutive integers seed through 2*seed+1. Empty event input returns no observations.","evaluation_group":"s3-protocols-clock_exchange","failed_approach":"The partial repair chooses awaiting_delay/record_origin_as_departure, which still violates this phase-specific event contract.","family":"s3-protocols-clock_exchange-have_origin-delay_sent","id":"FA-19951","implementations":{"attempt":{"sha256":"bfc3c46062870a7e2156c6682a195f14536aa8e00a4478312dbce4d218d2ba88","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(phase, events, seed):\n    payload = list(range(seed, seed * 2 + 2))\n    r = {'receive': seed+3, 'origin': seed, 'departure': seed+5, 'response': seed+7, 'offset_twice': None, 'clock': seed*10, 'owned': True}\n    frames = []\n    observed = []\n    table = {('idle', 'sync_received'): ('have_sync', 'record_receive_time'), ('have_sync', 'followup_received'): ('have_origin', 'record_origin_time'), ('have_origin', 'delay_sent'): ('awaiting_delay', 'record_origin_as_departure'), ('awaiting_delay', 'delay_response'): ('complete', 'compute_exchange'), ('have_sync', 'wrong_followup'): ('have_sync', 'reject_sequence'), ('awaiting_delay', 'wrong_response'): ('awaiting_delay', 'reject_sequence'), ('complete', 'consume'): ('idle', 'release_measurement'), ('have_origin', 'new_sync'): ('have_sync', 'restart_exchange'), ('idle', 'delay_response'): ('idle', 'reject_orphan'), ('awaiting_delay', 'exchange_expired'): ('idle', 'discard_measurement')}\n    for event in events:\n        phase, action = table.get((phase, event), (phase, \"reject\"))\n        if action == 'record_receive_time':\n            r['receive']=seed+3\n        elif action == 'record_origin_time':\n            r['origin']=seed\n        elif action == 'record_departure_time':\n            r['departure']=seed+5\n        elif action == 'compute_exchange':\n            r['offset_twice']=(r['receive']-r['origin'])-(r['response']-r['departure'])\n        elif action == 'reject_sequence':\n            frames.append(['WRONG_EXCHANGE',seed+1])\n        elif action == 'release_measurement':\n            r['owned']=False\n        elif action == 'restart_exchange':\n            r['receive']=seed+3; r['origin']=None; r['offset_twice']=None\n        elif action == 'reject_orphan':\n            frames.append(['ORPHAN_RESPONSE',seed])\n        elif action == 'discard_measurement':\n            r['owned']=False; r['offset_twice']=None\n        elif action == 'publish_offset':\n            frames.append(['OFFSET',r['offset_twice']])\n        elif action == 'record_receive_as_origin':\n            r['origin']=r['receive']\n        elif action == 'record_origin_as_departure':\n            r['departure']=r['origin']\n        elif action == 'ignore_return_leg':\n            r['offset_twice']=r['receive']-r['origin'] if r['origin'] is not None else None\n        elif action == 'clear_exchange':\n            r['origin']=None; r['offset_twice']=None\n        elif action == 'use_previous_response':\n            r['response']=seed-1\n        elif action == 'clear_clock':\n            r['owned']=False; r['clock']=0\n        elif action == 'keep_old_origin':\n            r['receive']=seed+3\n        elif action == 'record_response':\n            r['response']=seed+7\n        elif action == 'publish_partial':\n            frames.append(['OFFSET',r['receive']-r['departure']])\n        else:\n            if action not in (\"wait\", \"ignore\", \"keep\", \"retain\", \"keep_peer\", \"keep_offer\", \"keep_hold\", \"keep_batch\", \"retain_staging\", \"keep_staging\", \"keep_local_owner\", \"keep_old_session\", \"keep_address\", \"keep_old_expiry\", \"ignore_conflict\", \"keep_service\", \"keep_subscription\", \"retain_shadow\", \"keep_live\", \"keep_suspicion\", \"keep_roles\", \"keep_staged\"):\n                frames.append([action, payload[:]])\n        observed.append(json.loads(json.dumps({\"phase\": phase, \"registers\": r, \"frames\": frames})))\n    return observed\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 2]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2], ['WRONG_EXCHANGE', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 3]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 4]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 5]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}\nfor label, phase, events, expected in cases[N]:\n    check(label, solve(phase, events, N), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"c8e1f26eacb613f2720db35d0aaf8b573d4095ab27e11a50d8c0ca68a1451c24","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(phase, events, seed):\n    payload = list(range(seed, seed * 2 + 2))\n    r = {'receive': seed+3, 'origin': seed, 'departure': seed+5, 'response': seed+7, 'offset_twice': None, 'clock': seed*10, 'owned': True}\n    frames = []\n    observed = []\n    table = {('idle', 'sync_received'): ('have_sync', 'record_receive_time'), ('have_sync', 'followup_received'): ('have_origin', 'record_origin_time'), ('have_origin', 'delay_sent'): ('complete', 'publish_offset'), ('awaiting_delay', 'delay_response'): ('complete', 'compute_exchange'), ('have_sync', 'wrong_followup'): ('have_sync', 'reject_sequence'), ('awaiting_delay', 'wrong_response'): ('awaiting_delay', 'reject_sequence'), ('complete', 'consume'): ('idle', 'release_measurement'), ('have_origin', 'new_sync'): ('have_sync', 'restart_exchange'), ('idle', 'delay_response'): ('idle', 'reject_orphan'), ('awaiting_delay', 'exchange_expired'): ('idle', 'discard_measurement')}\n    for event in events:\n        phase, action = table.get((phase, event), (phase, \"reject\"))\n        if action == 'record_receive_time':\n            r['receive']=seed+3\n        elif action == 'record_origin_time':\n            r['origin']=seed\n        elif action == 'record_departure_time':\n            r['departure']=seed+5\n        elif action == 'compute_exchange':\n            r['offset_twice']=(r['receive']-r['origin'])-(r['response']-r['departure'])\n        elif action == 'reject_sequence':\n            frames.append(['WRONG_EXCHANGE',seed+1])\n        elif action == 'release_measurement':\n            r['owned']=False\n        elif action == 'restart_exchange':\n            r['receive']=seed+3; r['origin']=None; r['offset_twice']=None\n        elif action == 'reject_orphan':\n            frames.append(['ORPHAN_RESPONSE',seed])\n        elif action == 'discard_measurement':\n            r['owned']=False; r['offset_twice']=None\n        elif action == 'publish_offset':\n            frames.append(['OFFSET',r['offset_twice']])\n        elif action == 'record_receive_as_origin':\n            r['origin']=r['receive']\n        elif action == 'record_origin_as_departure':\n            r['departure']=r['origin']\n        elif action == 'ignore_return_leg':\n            r['offset_twice']=r['receive']-r['origin'] if r['origin'] is not None else None\n        elif action == 'clear_exchange':\n            r['origin']=None; r['offset_twice']=None\n        elif action == 'use_previous_response':\n            r['response']=seed-1\n        elif action == 'clear_clock':\n            r['owned']=False; r['clock']=0\n        elif action == 'keep_old_origin':\n            r['receive']=seed+3\n        elif action == 'record_response':\n            r['response']=seed+7\n        elif action == 'publish_partial':\n            frames.append(['OFFSET',r['receive']-r['departure']])\n        else:\n            if action not in (\"wait\", \"ignore\", \"keep\", \"retain\", \"keep_peer\", \"keep_offer\", \"keep_hold\", \"keep_batch\", \"retain_staging\", \"keep_staging\", \"keep_local_owner\", \"keep_old_session\", \"keep_address\", \"keep_old_expiry\", \"ignore_conflict\", \"keep_service\", \"keep_subscription\", \"retain_shadow\", \"keep_live\", \"keep_suspicion\", \"keep_roles\", \"keep_staged\"):\n                frames.append([action, payload[:]])\n        observed.append(json.loads(json.dumps({\"phase\": phase, \"registers\": r, \"frames\": frames})))\n    return observed\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 2]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2], ['WRONG_EXCHANGE', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 3]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 4]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 5]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}\nfor label, phase, events, expected in cases[N]:\n    check(label, solve(phase, events, N), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"43ade4522d1d84828ab9c45a41c340bbb34760c01e4cf7b16d102f70e82c3145","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(phase, events, seed):\n    payload = list(range(seed, seed * 2 + 2))\n    r = {'receive': seed+3, 'origin': seed, 'departure': seed+5, 'response': seed+7, 'offset_twice': None, 'clock': seed*10, 'owned': True}\n    frames = []\n    observed = []\n    table = {('idle', 'sync_received'): ('have_sync', 'record_receive_time'), ('have_sync', 'followup_received'): ('have_origin', 'record_origin_time'), ('have_origin', 'delay_sent'): ('awaiting_delay', 'record_departure_time'), ('awaiting_delay', 'delay_response'): ('complete', 'compute_exchange'), ('have_sync', 'wrong_followup'): ('have_sync', 'reject_sequence'), ('awaiting_delay', 'wrong_response'): ('awaiting_delay', 'reject_sequence'), ('complete', 'consume'): ('idle', 'release_measurement'), ('have_origin', 'new_sync'): ('have_sync', 'restart_exchange'), ('idle', 'delay_response'): ('idle', 'reject_orphan'), ('awaiting_delay', 'exchange_expired'): ('idle', 'discard_measurement')}\n    for event in events:\n        phase, action = table.get((phase, event), (phase, \"reject\"))\n        if action == 'record_receive_time':\n            r['receive']=seed+3\n        elif action == 'record_origin_time':\n            r['origin']=seed\n        elif action == 'record_departure_time':\n            r['departure']=seed+5\n        elif action == 'compute_exchange':\n            r['offset_twice']=(r['receive']-r['origin'])-(r['response']-r['departure'])\n        elif action == 'reject_sequence':\n            frames.append(['WRONG_EXCHANGE',seed+1])\n        elif action == 'release_measurement':\n            r['owned']=False\n        elif action == 'restart_exchange':\n            r['receive']=seed+3; r['origin']=None; r['offset_twice']=None\n        elif action == 'reject_orphan':\n            frames.append(['ORPHAN_RESPONSE',seed])\n        elif action == 'discard_measurement':\n            r['owned']=False; r['offset_twice']=None\n        elif action == 'publish_offset':\n            frames.append(['OFFSET',r['offset_twice']])\n        elif action == 'record_receive_as_origin':\n            r['origin']=r['receive']\n        elif action == 'record_origin_as_departure':\n            r['departure']=r['origin']\n        elif action == 'ignore_return_leg':\n            r['offset_twice']=r['receive']-r['origin'] if r['origin'] is not None else None\n        elif action == 'clear_exchange':\n            r['origin']=None; r['offset_twice']=None\n        elif action == 'use_previous_response':\n            r['response']=seed-1\n        elif action == 'clear_clock':\n            r['owned']=False; r['clock']=0\n        elif action == 'keep_old_origin':\n            r['receive']=seed+3\n        elif action == 'record_response':\n            r['response']=seed+7\n        elif action == 'publish_partial':\n            frames.append(['OFFSET',r['receive']-r['departure']])\n        else:\n            if action not in (\"wait\", \"ignore\", \"keep\", \"retain\", \"keep_peer\", \"keep_offer\", \"keep_hold\", \"keep_batch\", \"retain_staging\", \"keep_staging\", \"keep_local_owner\", \"keep_old_session\", \"keep_address\", \"keep_old_expiry\", \"ignore_conflict\", \"keep_service\", \"keep_subscription\", \"retain_shadow\", \"keep_live\", \"keep_suspicion\", \"keep_roles\", \"keep_staged\"):\n                frames.append([action, payload[:]])\n        observed.append(json.loads(json.dumps({\"phase\": phase, \"registers\": r, \"frames\": frames})))\n    return observed\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_origin', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': None, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 2]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received'], [{'phase': 'complete', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}, {'phase': 'have_sync', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': 1, 'clock': 10, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 4, 'origin': 1, 'departure': 6, 'response': 8, 'offset_twice': None, 'clock': 10, 'owned': True}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 2]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': None, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}, {'phase': 'have_origin', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 3]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup'], [{'phase': 'complete', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2]]}, {'phase': 'have_sync', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': 1, 'clock': 20, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 2], ['WRONG_EXCHANGE', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 5, 'origin': 2, 'departure': 7, 'response': 9, 'offset_twice': None, 'clock': 20, 'owned': True}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 3]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': None, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 4]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3]]}, {'phase': 'have_sync', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}, {'phase': 'have_origin', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': 1, 'clock': 30, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 3], ['WRONG_EXCHANGE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 6, 'origin': 3, 'departure': 8, 'response': 10, 'offset_twice': None, 'clock': 30, 'owned': True}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 4]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 5]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync'], [{'phase': 'complete', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_origin', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': 1, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 7, 'origin': None, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 4], ['WRONG_EXCHANGE', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 7, 'origin': 4, 'departure': 9, 'response': 11, 'offset_twice': None, 'clock': 40, 'owned': True}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/sync_received', 'idle', ['sync_received'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/followup_received', 'have_sync', ['followup_received'], [{'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_origin/delay_sent', 'have_origin', ['delay_sent'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('awaiting_delay/delay_response', 'awaiting_delay', ['delay_response'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}]), ('have_sync/wrong_followup', 'have_sync', ['wrong_followup'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('awaiting_delay/wrong_response', 'awaiting_delay', ['wrong_response'], [{'phase': 'awaiting_delay', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('complete/consume', 'complete', ['consume'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('have_origin/new_sync', 'have_origin', ['new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}]), ('idle/delay_response', 'idle', ['delay_response'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['ORPHAN_RESPONSE', 5]]}]), ('awaiting_delay/exchange_expired', 'awaiting_delay', ['exchange_expired'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': []}]), ('ordered trace 0', 'idle', ['sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received', 'new_sync', 'followup_received', 'new_sync'], [{'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['WRONG_EXCHANGE', 6]]}]), ('ordered trace 3', 'awaiting_delay', ['delay_response', 'consume', 'delay_response', 'sync_received', 'wrong_followup', 'followup_received', 'new_sync', 'followup_received'], [{'phase': 'complete', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': True}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': []}, {'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': 1, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_sync', 'registers': {'receive': 8, 'origin': None, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}, {'phase': 'have_origin', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': False}, 'frames': [['ORPHAN_RESPONSE', 5], ['WRONG_EXCHANGE', 6]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'receive': 8, 'origin': 5, 'departure': 10, 'response': 12, 'offset_twice': None, 'clock': 50, 'owned': True}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}\nfor label, phase, events, expected in cases[N]:\n    check(label, solve(phase, events, N), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Bounded offline control-plane abstraction with prescribed initial registers and classified events. Not a named protocol implementation or conformance test; excludes wire parsing, transport retries, physical execution, authentication, crash persistence, and timing. Related event faults share the full corrected controller and evaluation group. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-protocols-clock_exchange-have_origin-delay_sent","generated_at":"2026-09-29T14:40:13.726623+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Incorrect event admission now changes concrete queued data, resource ownership, or emitted protocol frames and subsequent trace behavior.","repair":"In phase have_origin, classify delay_sent as transition to awaiting_delay and emit record_departure_time.","root_cause":"In have origin, the delay sent handler runs publish offset and enters complete; it must instead run record departure time and enter awaiting delay.","sha256":"4c765233700deb24babe9b7f1309b975eb41bdad640e79cddee88fdd874765b9","title":"Four-event clock measurement exchange controller: have origin / delay sent · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":48.12,"exit_code":1,"observations":[{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/sync_received","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/followup_received","expected":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"awaiting_delay","registers":{"clock":10,"departure":1,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_origin/delay_sent","expected":[{"frames":[],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":false},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/delay_response","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/wrong_followup","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/wrong_response","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"complete/consume","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"have_origin/new_sync","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/delay_response","expected":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"awaiting_delay/exchange_expired","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"ordered trace 0","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"ordered trace 3","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"unknown event","expected":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"idle/sync_received\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/followup_received\", \"actual\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/delay_sent\", \"actual\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 1, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": false}, {\"check\": \"awaiting_delay/delay_response\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/wrong_followup\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"awaiting_delay/wrong_response\", \"actual\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"complete/consume\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/new_sync\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"idle/delay_response\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"awaiting_delay/exchange_expired\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"ordered trace 0\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"ordered trace 3\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unknown event\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.491,"exit_code":1,"observations":[{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/sync_received","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/followup_received","expected":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["OFFSET",null]],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_origin/delay_sent","expected":[{"frames":[],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":false},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/delay_response","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/wrong_followup","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/wrong_response","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"complete/consume","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"have_origin/new_sync","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/delay_response","expected":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"awaiting_delay/exchange_expired","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"ordered trace 0","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"ordered trace 3","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"unknown event","expected":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"idle/sync_received\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/followup_received\", \"actual\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/delay_sent\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"OFFSET\", null]]}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": false}, {\"check\": \"awaiting_delay/delay_response\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/wrong_followup\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"awaiting_delay/wrong_response\", \"actual\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"complete/consume\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/new_sync\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"idle/delay_response\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"awaiting_delay/exchange_expired\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"ordered trace 0\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"ordered trace 3\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unknown event\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.539,"exit_code":0,"observations":[{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/sync_received","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/followup_received","expected":[{"frames":[],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_origin/delay_sent","expected":[{"frames":[],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/delay_response","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"have_sync/wrong_followup","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"awaiting_delay/wrong_response","expected":[{"frames":[["WRONG_EXCHANGE",2]],"phase":"awaiting_delay","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"complete/consume","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"have_origin/new_sync","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"idle/delay_response","expected":[{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"awaiting_delay/exchange_expired","expected":[{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"check":"ordered trace 0","expected":[{"frames":[],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_origin","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[["WRONG_EXCHANGE",2]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":null,"owned":true,"receive":4,"response":8}}],"passed":true},{"actual":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"check":"ordered trace 3","expected":[{"frames":[],"phase":"complete","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":true,"receive":4,"response":8}},{"frames":[],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}},{"frames":[["ORPHAN_RESPONSE",1]],"phase":"have_sync","registers":{"clock":10,"departure":6,"offset_twice":1,"origin":1,"owned":false,"receive":4,"response":8}}],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"check":"unknown event","expected":[{"frames":[["reject",[1,2,3]]],"phase":"idle","registers":{"clock":10,"departure":6,"offset_twice":null,"origin":1,"owned":true,"receive":4,"response":8}}],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"idle/sync_received\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/followup_received\", \"actual\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/delay_sent\", \"actual\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"awaiting_delay/delay_response\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_sync/wrong_followup\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"awaiting_delay/wrong_response\", \"actual\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"awaiting_delay\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"complete/consume\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"have_origin/new_sync\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}], \"passed\": true}, {\"check\": \"idle/delay_response\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"awaiting_delay/exchange_expired\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": false}, \"frames\": []}], \"passed\": true}, {\"check\": \"ordered trace 0\", \"actual\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"expected\": [{\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_origin\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": null, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"WRONG_EXCHANGE\", 2]]}], \"passed\": true}, {\"check\": \"ordered trace 3\", \"actual\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"expected\": [{\"phase\": \"complete\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": true}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": []}, {\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}, {\"phase\": \"have_sync\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": 1, \"clock\": 10, \"owned\": false}, \"frames\": [[\"ORPHAN_RESPONSE\", 1]]}], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unknown event\", \"actual\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"expected\": [{\"phase\": \"idle\", \"registers\": {\"receive\": 4, \"origin\": 1, \"departure\": 6, \"response\": 8, \"offset_twice\": null, \"clock\": 10, \"owned\": true}, \"frames\": [[\"reject\", [1, 2, 3]]]}], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}