FA-19386 / Protocols / Open access
Checkpoint transfer boundary controller: idle / chunk · case 01
While idle, event chunk produces receiving/write_staging instead of idle/reject_unoffered.
ROOT CAUSE
In idle, the chunk handler runs write staging and enters receiving; it must instead run reject unoffered and enter idle.
VERIFIED REPAIR
In phase idle, classify chunk as transition to idle and emit reject_unoffered.
Unsuccessful approach: The partial repair chooses idle/write_live, which still violates this phase-specific event contract.
Case contract
For the stipulated Checkpoint transfer boundary 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 = {'staging': [seed-1], 'live': [seed-2], 'allocated': phase in ('receiving','verifying'), 'verified': phase=='installed', 'activations': 0}
frames = []
observed = []
table = {('idle', 'offer'): ('manifest', 'request_manifest'), ('manifest', 'compatible'): ('receiving', 'allocate_staging'), ('manifest', 'incompatible'): ('idle', 'reject_offer'), ('receiving', 'chunk'): ('receiving', 'write_staging'), ('receiving', 'end'): ('verifying', 'verify_manifest'), ('verifying', 'valid'): ('installed', 'atomic_activate'), ('verifying', 'invalid'): ('idle', 'discard_staging'), ('receiving', 'cancel'): ('idle', 'remove_staging'), ('installed', 'duplicate_end'): ('installed', 'ack_installed'), ('idle', 'chunk'): ('receiving', 'write_staging')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'request_manifest':
frames.append(['MANIFEST_REQUEST',seed])
elif action == 'allocate_staging':
r['allocated']=True; r['staging']=[]
elif action == 'reject_offer':
frames.append(['INCOMPATIBLE',seed])
elif action == 'write_staging':
r['staging'].extend(payload)
elif action == 'verify_manifest':
r['verified']=True
elif action == 'atomic_activate':
r['live']=r['staging'][:]; r['activations']+=1; r['staging']=[]
elif action == 'discard_staging':
r['staging']=[]; r['allocated']=False
elif action == 'remove_staging':
r['staging']=[]; r['allocated']=False
elif action == 'ack_installed':
frames.append(['INSTALLED',seed])
elif action == 'reject_unoffered':
frames.append(['UNSOLICITED_CHUNK',seed])
elif action == 'write_chunks':
r['staging'].extend(payload)
elif action == 'accept_complete':
frames.append(['INSTALLED',seed])
elif action == 'activate':
r['live']=r['staging'][:]; r['activations']+=1
elif action == 'write_live':
r['live'].extend(payload)
elif action == 'ack_complete':
frames.append(['INSTALLED',seed])
elif action == 'copy_partial':
r['live']=r['staging'][:1]; r['activations']+=1
elif action == 'activate_again':
r['activations']+=1
elif action == 'pause':
pass
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: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 1]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [0], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 1]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 1]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}, {'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 2]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [1], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 2]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 2]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 3]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [2], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 3]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 3]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 4]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [3], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 4]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 4]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 5]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [4], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [4], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 5]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 5]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| idle/offer | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| manifest/compatible | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| manifest/incompatible | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| receiving/chunk | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | Passed |
| receiving/end | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| verifying/valid | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | Passed |
| verifying/invalid | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| receiving/cancel | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| installed/duplicate_end | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| idle/chunk | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | [{'frames': [['UNSOLICITED_CHUNK', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Failed |
| ordered trace 0 | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| ordered trace 3 | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
SHA-256 / ab79c322b02f74afec4ef8a99a9b47b9a60b271e273eb91a0bd68b33450c38fc
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 = {'staging': [seed-1], 'live': [seed-2], 'allocated': phase in ('receiving','verifying'), 'verified': phase=='installed', 'activations': 0}
frames = []
observed = []
table = {('idle', 'offer'): ('manifest', 'request_manifest'), ('manifest', 'compatible'): ('receiving', 'allocate_staging'), ('manifest', 'incompatible'): ('idle', 'reject_offer'), ('receiving', 'chunk'): ('receiving', 'write_staging'), ('receiving', 'end'): ('verifying', 'verify_manifest'), ('verifying', 'valid'): ('installed', 'atomic_activate'), ('verifying', 'invalid'): ('idle', 'discard_staging'), ('receiving', 'cancel'): ('idle', 'remove_staging'), ('installed', 'duplicate_end'): ('installed', 'ack_installed'), ('idle', 'chunk'): ('idle', 'write_live')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'request_manifest':
frames.append(['MANIFEST_REQUEST',seed])
elif action == 'allocate_staging':
r['allocated']=True; r['staging']=[]
elif action == 'reject_offer':
frames.append(['INCOMPATIBLE',seed])
elif action == 'write_staging':
r['staging'].extend(payload)
elif action == 'verify_manifest':
r['verified']=True
elif action == 'atomic_activate':
r['live']=r['staging'][:]; r['activations']+=1; r['staging']=[]
elif action == 'discard_staging':
r['staging']=[]; r['allocated']=False
elif action == 'remove_staging':
r['staging']=[]; r['allocated']=False
elif action == 'ack_installed':
frames.append(['INSTALLED',seed])
elif action == 'reject_unoffered':
frames.append(['UNSOLICITED_CHUNK',seed])
elif action == 'write_chunks':
r['staging'].extend(payload)
elif action == 'accept_complete':
frames.append(['INSTALLED',seed])
elif action == 'activate':
r['live']=r['staging'][:]; r['activations']+=1
elif action == 'write_live':
r['live'].extend(payload)
elif action == 'ack_complete':
frames.append(['INSTALLED',seed])
elif action == 'copy_partial':
r['live']=r['staging'][:1]; r['activations']+=1
elif action == 'activate_again':
r['activations']+=1
elif action == 'pause':
pass
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: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 1]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [0], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 1]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 1]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}, {'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 2]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [1], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 2]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 2]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 3]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [2], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 3]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 3]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 4]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [3], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 4]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 4]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 5]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [4], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [4], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 5]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 5]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| idle/offer | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| manifest/compatible | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| manifest/incompatible | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| receiving/chunk | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | Passed |
| receiving/end | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| verifying/valid | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | Passed |
| verifying/invalid | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| receiving/cancel | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| installed/duplicate_end | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| idle/chunk | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1, 1, 2, 3], 'staging': [0], 'verified': False}}] | [{'frames': [['UNSOLICITED_CHUNK', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Failed |
| ordered trace 0 | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| ordered trace 3 | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
SHA-256 / 0649288ace8f5ea9cb727f90a6f79dfa247dd5bf714b3e8cdf82ac5f22da7024
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 = {'staging': [seed-1], 'live': [seed-2], 'allocated': phase in ('receiving','verifying'), 'verified': phase=='installed', 'activations': 0}
frames = []
observed = []
table = {('idle', 'offer'): ('manifest', 'request_manifest'), ('manifest', 'compatible'): ('receiving', 'allocate_staging'), ('manifest', 'incompatible'): ('idle', 'reject_offer'), ('receiving', 'chunk'): ('receiving', 'write_staging'), ('receiving', 'end'): ('verifying', 'verify_manifest'), ('verifying', 'valid'): ('installed', 'atomic_activate'), ('verifying', 'invalid'): ('idle', 'discard_staging'), ('receiving', 'cancel'): ('idle', 'remove_staging'), ('installed', 'duplicate_end'): ('installed', 'ack_installed'), ('idle', 'chunk'): ('idle', 'reject_unoffered')}
for event in events:
phase, action = table.get((phase, event), (phase, "reject"))
if action == 'request_manifest':
frames.append(['MANIFEST_REQUEST',seed])
elif action == 'allocate_staging':
r['allocated']=True; r['staging']=[]
elif action == 'reject_offer':
frames.append(['INCOMPATIBLE',seed])
elif action == 'write_staging':
r['staging'].extend(payload)
elif action == 'verify_manifest':
r['verified']=True
elif action == 'atomic_activate':
r['live']=r['staging'][:]; r['activations']+=1; r['staging']=[]
elif action == 'discard_staging':
r['staging']=[]; r['allocated']=False
elif action == 'remove_staging':
r['staging']=[]; r['allocated']=False
elif action == 'ack_installed':
frames.append(['INSTALLED',seed])
elif action == 'reject_unoffered':
frames.append(['UNSOLICITED_CHUNK',seed])
elif action == 'write_chunks':
r['staging'].extend(payload)
elif action == 'accept_complete':
frames.append(['INSTALLED',seed])
elif action == 'activate':
r['live']=r['staging'][:]; r['activations']+=1
elif action == 'write_live':
r['live'].extend(payload)
elif action == 'ack_complete':
frames.append(['INSTALLED',seed])
elif action == 'copy_partial':
r['live']=r['staging'][:1]; r['activations']+=1
elif action == 'activate_again':
r['activations']+=1
elif action == 'pause':
pass
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: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 1]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [0], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 1]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 1]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}, {'phase': 'manifest', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]]}, {'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [0, 1, 2, 3], 'live': [-1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [-1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 1]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [0], 'live': [-1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 2]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [1], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 2]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 2]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}, {'phase': 'manifest', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2], ['MANIFEST_REQUEST', 2]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [1, 2, 3, 4, 5], 'live': [0], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [0], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 2], ['INCOMPATIBLE', 2]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [1], 'live': [0], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 3]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [2], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 3]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 3]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [2, 3, 4, 5, 6, 7], 'live': [1], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [1], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 3], ['INCOMPATIBLE', 3], ['MANIFEST_REQUEST', 3]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [2], 'live': [1], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 4]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [3], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 4]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 4]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'receiving', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [3, 4, 5, 6, 7, 8, 9], 'live': [2], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [2], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4], ['MANIFEST_REQUEST', 4], ['INCOMPATIBLE', 4]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [3], 'live': [2], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('idle/offer', 'idle', ['offer'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}]), ('manifest/compatible', 'manifest', ['compatible'], [{'phase': 'receiving', 'registers': {'staging': [], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('manifest/incompatible', 'manifest', ['incompatible'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['INCOMPATIBLE', 5]]}]), ('receiving/chunk', 'receiving', ['chunk'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/end', 'receiving', ['end'], [{'phase': 'verifying', 'registers': {'staging': [4], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}]), ('verifying/valid', 'verifying', ['valid'], [{'phase': 'installed', 'registers': {'staging': [], 'live': [4], 'allocated': True, 'verified': False, 'activations': 1}, 'frames': []}]), ('verifying/invalid', 'verifying', ['invalid'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('receiving/cancel', 'receiving', ['cancel'], [{'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': []}]), ('installed/duplicate_end', 'installed', ['duplicate_end'], [{'phase': 'installed', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['INSTALLED', 5]]}]), ('idle/chunk', 'idle', ['chunk'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['UNSOLICITED_CHUNK', 5]]}]), ('ordered trace 0', 'idle', ['offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible', 'offer', 'incompatible'], [{'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}]), ('ordered trace 3', 'receiving', ['chunk', 'end', 'invalid', 'offer', 'incompatible', 'offer', 'incompatible', 'offer'], [{'phase': 'receiving', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': False, 'activations': 0}, 'frames': []}, {'phase': 'verifying', 'registers': {'staging': [4, 5, 6, 7, 8, 9, 10, 11], 'live': [3], 'allocated': True, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': []}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}, {'phase': 'idle', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5]]}, {'phase': 'manifest', 'registers': {'staging': [], 'live': [3], 'allocated': False, 'verified': True, 'activations': 0}, 'frames': [['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5], ['INCOMPATIBLE', 5], ['MANIFEST_REQUEST', 5]]}]), ('empty input', 'idle', [], []), ('unknown event', 'idle', ['unsupported'], [{'phase': 'idle', 'registers': {'staging': [4], 'live': [3], 'allocated': False, 'verified': False, 'activations': 0}, 'frames': [['reject', [5, 6, 7, 8, 9, 10, 11]]]}])]}
for label, phase, events, expected in cases[N]:
check(label, solve(phase, events, N), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| idle/offer | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| manifest/compatible | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| manifest/incompatible | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| receiving/chunk | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}] | Passed |
| receiving/end | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| verifying/valid | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'installed', 'registers': {'activations': 1, 'allocated': True, 'live': [0], 'staging': [], 'verified': False}}] | Passed |
| verifying/invalid | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| receiving/cancel | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | [{'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': False}}] | Passed |
| installed/duplicate_end | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | [{'frames': [['INSTALLED', 1]], 'phase': 'installed', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': True}}] | Passed |
| idle/chunk | [{'frames': [['UNSOLICITED_CHUNK', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['UNSOLICITED_CHUNK', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| ordered trace 0 | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}, {'frames': [['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1], ['MANIFEST_REQUEST', 1], ['INCOMPATIBLE', 1]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
| ordered trace 3 | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | [{'frames': [], 'phase': 'receiving', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': False}}, {'frames': [], 'phase': 'verifying', 'registers': {'activations': 0, 'allocated': True, 'live': [-1], 'staging': [0, 1, 2, 3], 'verified': True}}, {'frames': [], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}, {'frames': [['MANIFEST_REQUEST', 1]], 'phase': 'manifest', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [], 'verified': True}}] | Passed |
| empty input | [] | [] | Passed |
| unknown event | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | [{'frames': [['reject', [1, 2, 3]]], 'phase': 'idle', 'registers': {'activations': 0, 'allocated': False, 'live': [-1], 'staging': [0], 'verified': False}}] | Passed |
SHA-256 / 45065f3f09ce99a24f513d4e0abee43e1b241a74565b6e1c713ea505e868a726
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:07.510912+00:00.
Case digest / a393df5bcad1da433960c69916c93cc96265bf8d4592615b697141fe72c66f19