FA-18946 / Protocols / Open access
Multiplexed logical-channel admission controller: pending / accepted · case 01
While pending, event accepted produces pending/wait instead of ready/notify_ready.
ROOT CAUSE
In pending, the accepted handler runs wait and enters pending; it must instead run notify ready and enter ready.
VERIFIED REPAIR
In phase pending, classify accepted as transition to ready and emit notify_ready.
Unsuccessful approach: The partial repair chooses ready/send_open, which still violates this phase-specific event contract.
Case contract
For the stipulated Multiplexed logical-channel admission 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.
Why this case matters
Incorrect event admission now changes concrete queued data, resource ownership, or emitted protocol frames and subsequent trace behavior.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(phase, events, seed):
payload = list(range(seed, seed * 2 + 2))
r = {'channel': seed, 'allocated': int(phase!='absent'), 'ready_notifications': int(phase=='ready'), 'delivered': [], 'producer_error': None, 'policy_checks': 0}
frames = []
observed = []
table = {('absent', 'open_local'): ('pending', 'send_open'), ('pending', 'accepted'): ('pending', 'wait'), ('pending', 'refused'): ('absent', 'notify_refused'), ('absent', 'open_remote'): ('checking', 'check_policy'), ('checking', 'allowed'): ('ready', 'accept'), ('checking', 'denied'): ('absent', 'refuse'), ('pending', 'data'): ('pending', 'reject'), ('ready', 'reset'): ('absent', 'notify_reset'), ('ready', 'duplicate_open'): ('ready', 'repeat_accept'), ('absent', 'accepted'): ('absent', 'reject')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'send_open':
frames.append(['OPEN',r['channel']])
elif action == 'notify_ready':
r['ready_notifications']+=1
elif action == 'notify_refused':
r['allocated']=0; r['producer_error']='refused'
elif action == 'check_policy':
r['policy_checks']+=1
elif action == 'accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'refuse':
r['allocated']=0; frames.append(['REFUSE',r['channel']])
elif action == 'reject':
frames.append(['REJECT',r['channel']])
elif action == 'notify_reset':
r['allocated']=0; r['producer_error']='reset'
elif action == 'repeat_accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'allocate_again':
r['allocated']+=1
elif action == 'send_data':
frames.append(['DATA',r['channel'],payload])
elif action == 'deliver':
r['delivered'].extend(payload)
elif action == 'buffer':
r['delivered'].extend(payload)
else:
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"):
frames.append([action, payload[:]])
observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
return observed
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 1]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}])], 2: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 2]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}])], 3: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 3]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}])], 4: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 4]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}])], 5: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 5]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| absent/open_local | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/accepted | [{'frames': [], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Failed |
| pending/refused | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| absent/open_remote | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/allowed | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/denied | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/data | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ready/reset | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | Passed |
| ready/duplicate_open | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Passed |
| absent/accepted | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ordered trace 0 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| ordered trace 3 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
SHA-256 / 7607320ac012e204f5c83af74658add88a9f6b3db335b9f1c56cc515d1c9188a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(phase, events, seed):
payload = list(range(seed, seed * 2 + 2))
r = {'channel': seed, 'allocated': int(phase!='absent'), 'ready_notifications': int(phase=='ready'), 'delivered': [], 'producer_error': None, 'policy_checks': 0}
frames = []
observed = []
table = {('absent', 'open_local'): ('pending', 'send_open'), ('pending', 'accepted'): ('ready', 'send_open'), ('pending', 'refused'): ('absent', 'notify_refused'), ('absent', 'open_remote'): ('checking', 'check_policy'), ('checking', 'allowed'): ('ready', 'accept'), ('checking', 'denied'): ('absent', 'refuse'), ('pending', 'data'): ('pending', 'reject'), ('ready', 'reset'): ('absent', 'notify_reset'), ('ready', 'duplicate_open'): ('ready', 'repeat_accept'), ('absent', 'accepted'): ('absent', 'reject')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'send_open':
frames.append(['OPEN',r['channel']])
elif action == 'notify_ready':
r['ready_notifications']+=1
elif action == 'notify_refused':
r['allocated']=0; r['producer_error']='refused'
elif action == 'check_policy':
r['policy_checks']+=1
elif action == 'accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'refuse':
r['allocated']=0; frames.append(['REFUSE',r['channel']])
elif action == 'reject':
frames.append(['REJECT',r['channel']])
elif action == 'notify_reset':
r['allocated']=0; r['producer_error']='reset'
elif action == 'repeat_accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'allocate_again':
r['allocated']+=1
elif action == 'send_data':
frames.append(['DATA',r['channel'],payload])
elif action == 'deliver':
r['delivered'].extend(payload)
elif action == 'buffer':
r['delivered'].extend(payload)
else:
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"):
frames.append([action, payload[:]])
observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
return observed
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 1]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}])], 2: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 2]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}])], 3: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 3]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}])], 4: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 4]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}])], 5: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 5]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| absent/open_local | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/accepted | [{'frames': [['OPEN', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Failed |
| pending/refused | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| absent/open_remote | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/allowed | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/denied | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/data | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ready/reset | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | Passed |
| ready/duplicate_open | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Passed |
| absent/accepted | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ordered trace 0 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| ordered trace 3 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
SHA-256 / d28d448b697a4d1a56c2cf4d353fe506641a79e905d67121ce6afe1a2211dd75
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(phase, events, seed):
payload = list(range(seed, seed * 2 + 2))
r = {'channel': seed, 'allocated': int(phase!='absent'), 'ready_notifications': int(phase=='ready'), 'delivered': [], 'producer_error': None, 'policy_checks': 0}
frames = []
observed = []
table = {('absent', 'open_local'): ('pending', 'send_open'), ('pending', 'accepted'): ('ready', 'notify_ready'), ('pending', 'refused'): ('absent', 'notify_refused'), ('absent', 'open_remote'): ('checking', 'check_policy'), ('checking', 'allowed'): ('ready', 'accept'), ('checking', 'denied'): ('absent', 'refuse'), ('pending', 'data'): ('pending', 'reject'), ('ready', 'reset'): ('absent', 'notify_reset'), ('ready', 'duplicate_open'): ('ready', 'repeat_accept'), ('absent', 'accepted'): ('absent', 'reject')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'send_open':
frames.append(['OPEN',r['channel']])
elif action == 'notify_ready':
r['ready_notifications']+=1
elif action == 'notify_refused':
r['allocated']=0; r['producer_error']='refused'
elif action == 'check_policy':
r['policy_checks']+=1
elif action == 'accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'refuse':
r['allocated']=0; frames.append(['REFUSE',r['channel']])
elif action == 'reject':
frames.append(['REJECT',r['channel']])
elif action == 'notify_reset':
r['allocated']=0; r['producer_error']='reset'
elif action == 'repeat_accept':
frames.append(['ACCEPT',r['channel']])
elif action == 'allocate_again':
r['allocated']+=1
elif action == 'send_data':
frames.append(['DATA',r['channel'],payload])
elif action == 'deliver':
r['delivered'].extend(payload)
elif action == 'buffer':
r['delivered'].extend(payload)
else:
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"):
frames.append([action, payload[:]])
observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
return observed
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 1]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 1, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 1]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1]]}, {'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1]]}, {'phase': 'pending', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 1, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 1]]}])], 2: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 2]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 2, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 2]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2]]}, {'phase': 'pending', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}, {'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 2], ['REJECT', 2], ['OPEN', 2]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 2, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 2]]}])], 3: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 3]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 3, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 3]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted'], [{'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3]]}, {'phase': 'pending', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3]]}, {'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 3], ['REJECT', 3], ['OPEN', 3], ['REJECT', 3]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 3, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 3]]}])], 4: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 4]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 4, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 4]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local'], [{'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}, {'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4]]}, {'phase': 'pending', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 4], ['REJECT', 4], ['OPEN', 4], ['REJECT', 4], ['OPEN', 4]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 4, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 4]]}])], 5: [('absent/open_local', 'absent', ['open_local'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}]), ('pending/accepted', 'pending', ['accepted'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': []}]), ('pending/refused', 'pending', ['refused'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': []}]), ('absent/open_remote', 'absent', ['open_remote'], [{'phase': 'checking', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 1}, 'frames': []}]), ('checking/allowed', 'checking', ['allowed'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('checking/denied', 'checking', ['denied'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REFUSE', 5]]}]), ('pending/data', 'pending', ['data'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ready/reset', 'ready', ['reset'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 1, 'delivered': [], 'producer_error': 'reset', 'policy_checks': 0}, 'frames': []}]), ('ready/duplicate_open', 'ready', ['duplicate_open'], [{'phase': 'ready', 'registers': {'channel': 5, 'allocated': 1, 'ready_notifications': 1, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['ACCEPT', 5]]}]), ('absent/accepted', 'absent', ['accepted'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}]), ('ordered trace 0', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('ordered trace 3', 'absent', ['open_local', 'refused', 'accepted', 'open_local', 'refused', 'accepted', 'open_local', 'refused'], [{'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5]]}, {'phase': 'pending', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}, {'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': 'refused', 'policy_checks': 0}, 'frames': [['OPEN', 5], ['REJECT', 5], ['OPEN', 5], ['REJECT', 5], ['OPEN', 5]]}]), ('empty input', 'absent', [], []), ('unknown event', 'absent', ['unsupported'], [{'phase': 'absent', 'registers': {'channel': 5, 'allocated': 0, 'ready_notifications': 0, 'delivered': [], 'producer_error': None, 'policy_checks': 0}, 'frames': [['REJECT', 5]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| absent/open_local | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/accepted | [{'frames': [], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | [{'frames': [], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Passed |
| pending/refused | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| absent/open_remote | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [], 'phase': 'checking', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 1, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/allowed | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| checking/denied | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REFUSE', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| pending/data | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'pending', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ready/reset | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | [{'frames': [], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'reset', 'ready_notifications': 1}}] | Passed |
| ready/duplicate_open | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | [{'frames': [['ACCEPT', 1]], 'phase': 'ready', 'registers': {'allocated': 1, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 1}}] | Passed |
| absent/accepted | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
| ordered trace 0 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| ordered trace 3 | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | [{'frames': [['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}, {'frames': [['OPEN', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}, {'frames': [['OPEN', 1], ['REJECT', 1], ['OPEN', 1]], 'phase': 'pending', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': 'refused', 'ready_notifications': 0}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | [{'frames': [['REJECT', 1]], 'phase': 'absent', 'registers': {'allocated': 0, 'channel': 1, 'delivered': [], 'policy_checks': 0, 'producer_error': None, 'ready_notifications': 0}}] | Passed |
SHA-256 / fd3a3a9d765af112b8c984a80175684fa497c27f60e604647a0bf366a266123c
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:40:02.740555+00:00.
Case digest / 2f86166f7e2cabd3a52f4e284c6ef0f20eb2de8fcb4327a128c6ea9184f6ace5