FAILURE MAP
← Case archive

FA-18961 / Protocols / Open access

Multiplexed logical-channel admission controller: checking / allowed · case 01

While checking, event allowed produces checking/wait instead of ready/accept.

Verified by executionVariant 1 · 14 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

In checking, the allowed handler runs wait and enters checking; it must instead run accept and enter ready.

VERIFIED REPAIR

In phase checking, classify allowed as transition to ready and emit accept.

Unsuccessful approach: The partial repair chooses ready/notify_ready, 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'): ('ready', 'notify_ready'), ('pending', 'refused'): ('absent', 'notify_refused'), ('absent', 'open_remote'): ('checking', 'check_policy'), ('checking', 'allowed'): ('checking', 'wait'), ('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 fixtureActualExpectedOutcome
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': [], 'phase': 'checking', '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}}]Failed
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 / f4f5a6b6155ed156c705fafa1c3f281d75048d9475ae498e8c90f631184dbe24

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', 'notify_ready'), ('pending', 'refused'): ('absent', 'notify_refused'), ('absent', 'open_remote'): ('checking', 'check_policy'), ('checking', 'allowed'): ('ready', 'notify_ready'), ('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 fixtureActualExpectedOutcome
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': [], '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': 0}}]Failed
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 / 164867f72f04031f2b728c15321a9a4dffb3dc036776df2c4d39c66b72717df3

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 fixtureActualExpectedOutcome
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:03.012233+00:00.

Case digest / 28ac9d5a0e733b0c47ddd8a234ca3d78f1f424792c9cfa18ba81cc791583a35a