FAILURE MAP
← Case archive

FA-20236 / Protocols / Open access

Mirror baseline and delta cutover controller: live / delta · case 01

While live, event delta produces live/buffer_forever instead of live/apply_notify.

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

ROOT CAUSE

In live, the delta handler runs buffer forever and enters live; it must instead run apply notify and enter live.

VERIFIED REPAIR

In phase live, classify delta as transition to live and emit apply_notify.

Unsuccessful approach: The partial repair chooses live/apply_silent, which still violates this phase-specific event contract.

Case contract

For the stipulated Mirror baseline and delta cutover 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 = {'shadow': [seed] if phase in ('copying','replaying') else [], 'live': [seed-1] if phase in ('copying','replaying','live') else [], 'deltas': payload[:], 'published': phase=='live', 'notifications': []}
    frames = []
    observed = []
    table = {('empty', 'baseline_offer'): ('copying', 'create_shadow'), ('copying', 'baseline_item'): ('copying', 'write_shadow'), ('copying', 'concurrent_delta'): ('copying', 'buffer_after_cut'), ('copying', 'baseline_end'): ('replaying', 'seal_shadow'), ('replaying', 'delta'): ('replaying', 'apply_buffered_order'), ('replaying', 'buffer_empty'): ('live', 'atomic_publish'), ('live', 'source_reset'): ('empty', 'invalidate_baseline'), ('live', 'old_generation_delta'): ('live', 'reject_stale'), ('copying', 'copy_cancelled'): ('empty', 'discard_shadow'), ('live', 'delta'): ('live', 'buffer_forever')}
    for event in events:
        phase, action = table.get((phase, event), (phase, "reject"))
        if action == 'create_shadow':
            r['shadow']=[]
        elif action == 'write_shadow':
            r['shadow'].extend(payload)
        elif action == 'buffer_after_cut':
            r['deltas'].extend(payload)
        elif action == 'seal_shadow':
            frames.append(['BASELINE_SEALED',seed])
        elif action == 'apply_buffered_order':
            r['shadow'].extend(r['deltas']); r['deltas']=[]
        elif action == 'atomic_publish':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'invalidate_baseline':
            r['live']=[]; r['published']=False
        elif action == 'reject_stale':
            frames.append(['STALE_DELTA',seed-1])
        elif action == 'discard_shadow':
            r['shadow']=[]
        elif action == 'apply_notify':
            r['live'].extend(payload); r['notifications'].append(payload)
        elif action == 'accept_deltas':
            r['live'].extend(payload)
        elif action == 'write_live':
            r['live'].extend(payload)
        elif action == 'replace_shadow':
            r['shadow']=payload[:]
        elif action == 'drop_delta':
            r['deltas']=[]
        elif action == 'apply_before_baseline':
            r['shadow'].extend(payload)
        elif action == 'publish_shadow':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'discard_deltas':
            r['deltas']=[]
        elif action == 'apply_reverse':
            r['shadow'].extend(reversed(r['deltas'])); r['deltas']=[]
        elif action == 'publish_early':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'merge_with_old':
            r['live'].extend(r['shadow']); r['published']=True
        elif action == 'apply_delta':
            r['live'].extend(payload)
        elif action == 'restart_from_delta':
            r['shadow']=payload[:]
        elif action == 'buffer_forever':
            r['deltas'].extend(payload)
        elif action == 'apply_silent':
            r['live'].extend(payload)
        elif action == 'continue':
            r['live'].extend(payload)
        else:
            if action not in ("wait", "ignore", "keep", "retain", "keep_peer", "keep_offer", "keep_hold", "keep_batch", "retain_staging", "keep_staging", "keep_local_owner", "keep_old_session", "keep_address", "keep_old_expiry", "ignore_conflict", "keep_service", "keep_subscription", "retain_shadow", "keep_live", "keep_suspicion", "keep_roles", "keep_staged"):
                frames.append([action, payload[:]])
        observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
    return observed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [1], 'live': [1], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 0]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0, 1, 2, 3], 'deltas': [1, 2, 3], 'published': True, 'notifications': [[1, 2, 3]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [2], 'live': [2], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 1]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1, 2, 3, 4, 5], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': [[2, 3, 4, 5]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2], ['STALE_DELTA', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [3], 'live': [3], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 2]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2, 3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [4], 'live': [4], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 3]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [5], 'live': [5], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 4]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, '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 fixtureActualExpectedOutcome
empty/baseline_offer[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
copying/baseline_item[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
copying/concurrent_delta[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
copying/baseline_end[{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
replaying/delta[{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
replaying/buffer_empty[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}]Passed
live/source_reset[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/old_generation_delta[{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}]Passed
copying/copy_cancelled[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/delta[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0, 1, 2, 3], 'notifications': [[1, 2, 3]], 'published': True, 'shadow': []}}]Failed
ordered trace 0[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}]Passed
ordered trace 3[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
empty input[][]Passed
unknown event[{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed

SHA-256 / fb775669d1fe76d5536472539e359c73d73028ff8bb928356f3f3c3ae1adb7d4

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 = {'shadow': [seed] if phase in ('copying','replaying') else [], 'live': [seed-1] if phase in ('copying','replaying','live') else [], 'deltas': payload[:], 'published': phase=='live', 'notifications': []}
    frames = []
    observed = []
    table = {('empty', 'baseline_offer'): ('copying', 'create_shadow'), ('copying', 'baseline_item'): ('copying', 'write_shadow'), ('copying', 'concurrent_delta'): ('copying', 'buffer_after_cut'), ('copying', 'baseline_end'): ('replaying', 'seal_shadow'), ('replaying', 'delta'): ('replaying', 'apply_buffered_order'), ('replaying', 'buffer_empty'): ('live', 'atomic_publish'), ('live', 'source_reset'): ('empty', 'invalidate_baseline'), ('live', 'old_generation_delta'): ('live', 'reject_stale'), ('copying', 'copy_cancelled'): ('empty', 'discard_shadow'), ('live', 'delta'): ('live', 'apply_silent')}
    for event in events:
        phase, action = table.get((phase, event), (phase, "reject"))
        if action == 'create_shadow':
            r['shadow']=[]
        elif action == 'write_shadow':
            r['shadow'].extend(payload)
        elif action == 'buffer_after_cut':
            r['deltas'].extend(payload)
        elif action == 'seal_shadow':
            frames.append(['BASELINE_SEALED',seed])
        elif action == 'apply_buffered_order':
            r['shadow'].extend(r['deltas']); r['deltas']=[]
        elif action == 'atomic_publish':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'invalidate_baseline':
            r['live']=[]; r['published']=False
        elif action == 'reject_stale':
            frames.append(['STALE_DELTA',seed-1])
        elif action == 'discard_shadow':
            r['shadow']=[]
        elif action == 'apply_notify':
            r['live'].extend(payload); r['notifications'].append(payload)
        elif action == 'accept_deltas':
            r['live'].extend(payload)
        elif action == 'write_live':
            r['live'].extend(payload)
        elif action == 'replace_shadow':
            r['shadow']=payload[:]
        elif action == 'drop_delta':
            r['deltas']=[]
        elif action == 'apply_before_baseline':
            r['shadow'].extend(payload)
        elif action == 'publish_shadow':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'discard_deltas':
            r['deltas']=[]
        elif action == 'apply_reverse':
            r['shadow'].extend(reversed(r['deltas'])); r['deltas']=[]
        elif action == 'publish_early':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'merge_with_old':
            r['live'].extend(r['shadow']); r['published']=True
        elif action == 'apply_delta':
            r['live'].extend(payload)
        elif action == 'restart_from_delta':
            r['shadow']=payload[:]
        elif action == 'buffer_forever':
            r['deltas'].extend(payload)
        elif action == 'apply_silent':
            r['live'].extend(payload)
        elif action == 'continue':
            r['live'].extend(payload)
        else:
            if action not in ("wait", "ignore", "keep", "retain", "keep_peer", "keep_offer", "keep_hold", "keep_batch", "retain_staging", "keep_staging", "keep_local_owner", "keep_old_session", "keep_address", "keep_old_expiry", "ignore_conflict", "keep_service", "keep_subscription", "retain_shadow", "keep_live", "keep_suspicion", "keep_roles", "keep_staged"):
                frames.append([action, payload[:]])
        observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
    return observed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [1], 'live': [1], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 0]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0, 1, 2, 3], 'deltas': [1, 2, 3], 'published': True, 'notifications': [[1, 2, 3]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [2], 'live': [2], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 1]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1, 2, 3, 4, 5], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': [[2, 3, 4, 5]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2], ['STALE_DELTA', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [3], 'live': [3], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 2]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2, 3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [4], 'live': [4], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 3]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [5], 'live': [5], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 4]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, '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 fixtureActualExpectedOutcome
empty/baseline_offer[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
copying/baseline_item[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
copying/concurrent_delta[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
copying/baseline_end[{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
replaying/delta[{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
replaying/buffer_empty[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}]Passed
live/source_reset[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/old_generation_delta[{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}]Passed
copying/copy_cancelled[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/delta[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0, 1, 2, 3], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0, 1, 2, 3], 'notifications': [[1, 2, 3]], 'published': True, 'shadow': []}}]Failed
ordered trace 0[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}]Passed
ordered trace 3[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
empty input[][]Passed
unknown event[{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed

SHA-256 / 44afd7ea32ce0cf819f201ed4707ef34afd41ef2491bddd68397798ebff031d0

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 = {'shadow': [seed] if phase in ('copying','replaying') else [], 'live': [seed-1] if phase in ('copying','replaying','live') else [], 'deltas': payload[:], 'published': phase=='live', 'notifications': []}
    frames = []
    observed = []
    table = {('empty', 'baseline_offer'): ('copying', 'create_shadow'), ('copying', 'baseline_item'): ('copying', 'write_shadow'), ('copying', 'concurrent_delta'): ('copying', 'buffer_after_cut'), ('copying', 'baseline_end'): ('replaying', 'seal_shadow'), ('replaying', 'delta'): ('replaying', 'apply_buffered_order'), ('replaying', 'buffer_empty'): ('live', 'atomic_publish'), ('live', 'source_reset'): ('empty', 'invalidate_baseline'), ('live', 'old_generation_delta'): ('live', 'reject_stale'), ('copying', 'copy_cancelled'): ('empty', 'discard_shadow'), ('live', 'delta'): ('live', 'apply_notify')}
    for event in events:
        phase, action = table.get((phase, event), (phase, "reject"))
        if action == 'create_shadow':
            r['shadow']=[]
        elif action == 'write_shadow':
            r['shadow'].extend(payload)
        elif action == 'buffer_after_cut':
            r['deltas'].extend(payload)
        elif action == 'seal_shadow':
            frames.append(['BASELINE_SEALED',seed])
        elif action == 'apply_buffered_order':
            r['shadow'].extend(r['deltas']); r['deltas']=[]
        elif action == 'atomic_publish':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'invalidate_baseline':
            r['live']=[]; r['published']=False
        elif action == 'reject_stale':
            frames.append(['STALE_DELTA',seed-1])
        elif action == 'discard_shadow':
            r['shadow']=[]
        elif action == 'apply_notify':
            r['live'].extend(payload); r['notifications'].append(payload)
        elif action == 'accept_deltas':
            r['live'].extend(payload)
        elif action == 'write_live':
            r['live'].extend(payload)
        elif action == 'replace_shadow':
            r['shadow']=payload[:]
        elif action == 'drop_delta':
            r['deltas']=[]
        elif action == 'apply_before_baseline':
            r['shadow'].extend(payload)
        elif action == 'publish_shadow':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'discard_deltas':
            r['deltas']=[]
        elif action == 'apply_reverse':
            r['shadow'].extend(reversed(r['deltas'])); r['deltas']=[]
        elif action == 'publish_early':
            r['live']=r['shadow'][:]; r['published']=True
        elif action == 'merge_with_old':
            r['live'].extend(r['shadow']); r['published']=True
        elif action == 'apply_delta':
            r['live'].extend(payload)
        elif action == 'restart_from_delta':
            r['shadow']=payload[:]
        elif action == 'buffer_forever':
            r['deltas'].extend(payload)
        elif action == 'apply_silent':
            r['live'].extend(payload)
        elif action == 'continue':
            r['live'].extend(payload)
        else:
            if action not in ("wait", "ignore", "keep", "retain", "keep_peer", "keep_offer", "keep_hold", "keep_batch", "retain_staging", "keep_staging", "keep_local_owner", "keep_old_session", "keep_address", "keep_old_expiry", "ignore_conflict", "keep_service", "keep_subscription", "retain_shadow", "keep_live", "keep_suspicion", "keep_roles", "keep_staged"):
                frames.append([action, payload[:]])
        observed.append(json.loads(json.dumps({"phase": phase, "registers": r, "frames": frames})))
    return observed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [1], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [1, 1, 2, 3], 'live': [0], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [1], 'live': [1], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 0]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [0, 1, 2, 3], 'deltas': [1, 2, 3], 'published': True, 'notifications': [[1, 2, 3]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3, 1, 2, 3], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [0], 'deltas': [1, 2, 3, 1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 1]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [1, 2, 3], 'published': False, 'notifications': []}, 'frames': [['reject', [1, 2, 3]]]}])], 2: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [2], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [2, 2, 3, 4, 5], 'live': [1], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [2], 'live': [2], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 1]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [1, 2, 3, 4, 5], 'deltas': [2, 3, 4, 5], 'published': True, 'notifications': [[2, 3, 4, 5]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2], ['STALE_DELTA', 1]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [1], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5, 2, 3, 4, 5], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 2]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [2, 3, 4, 5], 'published': False, 'notifications': []}, 'frames': [['reject', [2, 3, 4, 5]]]}])], 3: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [3], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [3, 3, 4, 5, 6, 7], 'live': [2], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [3], 'live': [3], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 2]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [2, 3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3], ['STALE_DELTA', 2]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [2], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7], 'deltas': [3, 4, 5, 6, 7, 3, 4, 5, 6, 7], 'published': True, 'notifications': [[3, 4, 5, 6, 7]]}, 'frames': [['BASELINE_SEALED', 3]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [3, 4, 5, 6, 7], 'published': False, 'notifications': []}, 'frames': [['reject', [3, 4, 5, 6, 7]]]}])], 4: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [4], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [4, 4, 5, 6, 7, 8, 9], 'live': [3], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [4], 'live': [4], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 3]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [3, 4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4], ['STALE_DELTA', 3]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [3], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': True, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9, 4, 5, 6, 7, 8, 9], 'published': False, 'notifications': [[4, 5, 6, 7, 8, 9]]}, 'frames': [['BASELINE_SEALED', 4]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [4, 5, 6, 7, 8, 9], 'published': False, 'notifications': []}, 'frames': [['reject', [4, 5, 6, 7, 8, 9]]]}])], 5: [('empty/baseline_offer', 'empty', ['baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_item', 'copying', ['baseline_item'], [{'phase': 'copying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/concurrent_delta', 'copying', ['concurrent_delta'], [{'phase': 'copying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('copying/baseline_end', 'copying', ['baseline_end'], [{'phase': 'replaying', 'registers': {'shadow': [5], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}]), ('replaying/delta', 'replaying', ['delta'], [{'phase': 'replaying', 'registers': {'shadow': [5, 5, 6, 7, 8, 9, 10, 11], 'live': [4], 'deltas': [], 'published': False, 'notifications': []}, 'frames': []}]), ('replaying/buffer_empty', 'replaying', ['buffer_empty'], [{'phase': 'live', 'registers': {'shadow': [5], 'live': [5], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': []}]), ('live/source_reset', 'live', ['source_reset'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/old_generation_delta', 'live', ['old_generation_delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['STALE_DELTA', 4]]}]), ('copying/copy_cancelled', 'copying', ['copy_cancelled'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}]), ('live/delta', 'live', ['delta'], [{'phase': 'live', 'registers': {'shadow': [], 'live': [4, 5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': []}]), ('ordered trace 0', 'empty', ['baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'old_generation_delta', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5], ['STALE_DELTA', 4]]}]), ('ordered trace 3', 'copying', ['copy_cancelled', 'baseline_offer', 'concurrent_delta', 'baseline_end', 'buffer_empty', 'delta', 'source_reset', 'baseline_offer'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': []}, {'phase': 'replaying', 'registers': {'shadow': [], 'live': [4], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': []}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'live', 'registers': {'shadow': [], 'live': [5, 6, 7, 8, 9, 10, 11], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': True, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}, {'phase': 'copying', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': [[5, 6, 7, 8, 9, 10, 11]]}, 'frames': [['BASELINE_SEALED', 5]]}]), ('empty input', 'empty', [], []), ('unknown event', 'empty', ['unsupported'], [{'phase': 'empty', 'registers': {'shadow': [], 'live': [], 'deltas': [5, 6, 7, 8, 9, 10, 11], 'published': False, 'notifications': []}, '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 fixtureActualExpectedOutcome
empty/baseline_offer[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
copying/baseline_item[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
copying/concurrent_delta[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
copying/baseline_end[{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}][{'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1]}}]Passed
replaying/delta[{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}][{'frames': [], 'phase': 'replaying', 'registers': {'deltas': [], 'live': [0], 'notifications': [], 'published': False, 'shadow': [1, 1, 2, 3]}}]Passed
replaying/buffer_empty[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [1], 'notifications': [], 'published': True, 'shadow': [1]}}]Passed
live/source_reset[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/old_generation_delta[{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [['STALE_DELTA', 0]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': True, 'shadow': []}}]Passed
copying/copy_cancelled[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
live/delta[{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0, 1, 2, 3], 'notifications': [[1, 2, 3]], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'live', 'registers': {'deltas': [1, 2, 3], 'live': [0, 1, 2, 3], 'notifications': [[1, 2, 3]], 'published': True, 'shadow': []}}]Passed
ordered trace 0[{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}][{'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'live', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [], 'notifications': [], 'published': True, 'shadow': []}}]Passed
ordered trace 3[{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [], 'phase': 'copying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}, {'frames': [['BASELINE_SEALED', 1]], 'phase': 'replaying', 'registers': {'deltas': [1, 2, 3, 1, 2, 3], 'live': [0], 'notifications': [], 'published': False, 'shadow': []}}]Passed
empty input[][]Passed
unknown event[{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}][{'frames': [['reject', [1, 2, 3]]], 'phase': 'empty', 'registers': {'deltas': [1, 2, 3], 'live': [], 'notifications': [], 'published': False, 'shadow': []}}]Passed

SHA-256 / e62e839c3237bb6844708e80e79554437d68155f50d36639814da38a7b454959

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

Case digest / 60839af92d33ac6c88a3c988177033e3842db32e6f4ed343f6d1655297d17e4e