FAILURE MAP
← Case archive

FA-42276 / Listener lifecycle / Open access

Committed observer error reporting follows arrival order instead of observer order · case 01

Committed observer error reporting follows arrival order instead of observer order; the returned lifecycle plan violates the stated transition contract.

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

ROOT CAUSE

The notify_error decision in the transaction-publish listener model is computed as list(s['observer_failures']), losing a required lifecycle condition.

VERIFIED REPAIR

Compute the notify_error decision from the complete contract: sorted(s['observer_failures'],key=lambda r:r[0]).

Unsuccessful approach: The partial repair uses sorted(s['observer_failures'],key=lambda r:r[1]); a retained regression distinguishes it from the full transition.

Case contract

Plan observer notifications around a local state transaction. Pending changes become visible only after successful outermost commit. Rollback restores the prior published revision. Change records [field,old,new] with equal endpoints are suppressed; repeated fields keep the earliest old and latest new in input order. Observer errors do not roll back an already committed state. An inner savepoint contributes child changes only on commit without rollback; parent changes survive every child outcome. Committed observer failures are [registration_position,error] records and report in stable registration order, retaining arrival order for a tied position. Inputs are finite state snapshots, including transitional and stale states; output fields are the exact independent actions/metadata defined by the corrected expression table. Numeric fixture capacities and counts vary with N. Field definitions, each independently computed from the input snapshot: visible = s['committed'] and not s['rollback'] and s['depth']==0; changed = [r for r in s['changes'] if r[1]!=r[2]]; first_old = {k:next(r[1] for r in s['changes'] if r[0]==k) for k in dict.fromkeys(r[0] for r in s['changes'])}; last_new = {r[0]:r[2] for r in s['changes']}; order = list(dict.fromkeys(r[0] for r in s['changes'])); revision = s['published'] if s['rollback'] else s['revision']; state_rollback = s['rollback'] and not s['committed']; notify_error = sorted(s['observer_failures'],key=lambda r:r[0]); publish_durable = s['committed'] and s['durable'] and not s['rollback']; deferred = list(s['parent_changes'])+(list(s['child_changes']) if s['child_commit'] and not s['child_rollback'] else [])

Why this case matters

Observer implementations need to preserve this state while subscriptions enter, execute, and leave their lifecycle.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s):
    return {
        'visible': s['committed'] and not s['rollback'] and s['depth']==0,
        'changed': [r for r in s['changes'] if r[1]!=r[2]],
        'first_old': {k:next(r[1] for r in s['changes'] if r[0]==k) for k in dict.fromkeys(r[0] for r in s['changes'])},
        'last_new': {r[0]:r[2] for r in s['changes']},
        'order': list(dict.fromkeys(r[0] for r in s['changes'])),
        'revision': s['published'] if s['rollback'] else s['revision'],
        'state_rollback': s['rollback'] and not s['committed'],
        'notify_error': list(s['observer_failures']),
        'publish_durable': s['committed'] and s['durable'] and not s['rollback'],
        'deferred': list(s['parent_changes'])+(list(s['child_changes']) if s['child_commit'] and not s['child_rollback'] else []),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': False, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': True, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 3, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 2, 'revision': 3, 'published': 0, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 3, 'published': 2, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': True, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 2: [({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 6, 'published': 4, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 6, 'published': 0, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 6, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': []}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 6, 'state_rollback': False, 'notify_error': [], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': False, 'rollback': False, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 6, 'published': 4, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 3: [({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 9, 'published': 0, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 9, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6]], 'committed': False, 'rollback': False, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 1, 'revision': 0, 'published': 6, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 4: [({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 12, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': True, 'depth': 8, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 8, 'revision': 12, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 8, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 5: [({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 0, 'published': 10, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 10, 'revision': 15, 'published': 0, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 15, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 10, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})]}
for i,(state,expected) in enumerate(fixtures[N]):
    check("transition "+str(i), solve(state), 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
transition 0{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [0, 'z'], [1, 'm']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Failed
transition 1{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}Passed
transition 2{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [0, 'z'], [1, 'm']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}Failed
transition 3{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[2, 'a'], [0, 'z'], [1, 'm']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}Failed
transition 4{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[2, 'a'], [0, 'z'], [1, 'm']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}Failed
transition 5{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [0, 'z'], [1, 'm']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}Failed
transition 6{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}Passed
transition 7{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Passed

SHA-256 / cfe0dc8406ac175d66176a1e00012a2ea217a06e01f12fad4071cad255710a78

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s):
    return {
        'visible': s['committed'] and not s['rollback'] and s['depth']==0,
        'changed': [r for r in s['changes'] if r[1]!=r[2]],
        'first_old': {k:next(r[1] for r in s['changes'] if r[0]==k) for k in dict.fromkeys(r[0] for r in s['changes'])},
        'last_new': {r[0]:r[2] for r in s['changes']},
        'order': list(dict.fromkeys(r[0] for r in s['changes'])),
        'revision': s['published'] if s['rollback'] else s['revision'],
        'state_rollback': s['rollback'] and not s['committed'],
        'notify_error': sorted(s['observer_failures'],key=lambda r:r[1]),
        'publish_durable': s['committed'] and s['durable'] and not s['rollback'],
        'deferred': list(s['parent_changes'])+(list(s['child_changes']) if s['child_commit'] and not s['child_rollback'] else []),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': False, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': True, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 3, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 2, 'revision': 3, 'published': 0, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 3, 'published': 2, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': True, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 2: [({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 6, 'published': 4, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 6, 'published': 0, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 6, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': []}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 6, 'state_rollback': False, 'notify_error': [], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': False, 'rollback': False, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 6, 'published': 4, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 3: [({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 9, 'published': 0, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 9, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6]], 'committed': False, 'rollback': False, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 1, 'revision': 0, 'published': 6, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 4: [({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 12, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': True, 'depth': 8, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 8, 'revision': 12, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 8, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 5: [({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 0, 'published': 10, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 10, 'revision': 15, 'published': 0, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 15, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 10, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})]}
for i,(state,expected) in enumerate(fixtures[N]):
    check("transition "+str(i), solve(state), 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
transition 0{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [1, 'm'], [0, 'z']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Failed
transition 1{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'a'], [1, 'b']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}Failed
transition 2{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [1, 'm'], [0, 'z']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}Failed
transition 3{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[2, 'a'], [1, 'm'], [0, 'z']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}Failed
transition 4{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[2, 'a'], [1, 'm'], [0, 'z']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}Failed
transition 5{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[2, 'a'], [1, 'm'], [0, 'z']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}Failed
transition 6{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}Passed
transition 7{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'a'], [1, 'b']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Failed

SHA-256 / 6acb5993c97598d451af0d36fc7bf68c8e1832f82f62bf87c6de9a5c14a9363d

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s):
    return {
        'visible': s['committed'] and not s['rollback'] and s['depth']==0,
        'changed': [r for r in s['changes'] if r[1]!=r[2]],
        'first_old': {k:next(r[1] for r in s['changes'] if r[0]==k) for k in dict.fromkeys(r[0] for r in s['changes'])},
        'last_new': {r[0]:r[2] for r in s['changes']},
        'order': list(dict.fromkeys(r[0] for r in s['changes'])),
        'revision': s['published'] if s['rollback'] else s['revision'],
        'state_rollback': s['rollback'] and not s['committed'],
        'notify_error': sorted(s['observer_failures'],key=lambda r:r[0]),
        'publish_durable': s['committed'] and s['durable'] and not s['rollback'],
        'deferred': list(s['parent_changes'])+(list(s['child_changes']) if s['child_commit'] and not s['child_rollback'] else []),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': False, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': True, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 3, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 2, 'revision': 3, 'published': 0, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 3, 'published': 2, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 3, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': True, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': False, 'rollback': True, 'depth': 2, 'revision': 0, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[2, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 2], ['x', 2, 3], ['y', 4, 4]], 'committed': True, 'rollback': True, 'depth': 2, 'revision': 3, 'published': 2, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 2], ['x', 2, 3]], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'order': ['x', 'y'], 'revision': 2, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 2: [({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 6, 'published': 4, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 6, 'published': 0, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 6, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': True, 'observer_failures': []}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 6, 'state_rollback': False, 'notify_error': [], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': False, 'rollback': False, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 6, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4]], 'first_old': {'x': 1}, 'last_new': {'x': 4}, 'order': ['x'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[4, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [4, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 4], ['x', 4, 6], ['y', 8, 8]], 'committed': True, 'rollback': True, 'depth': 4, 'revision': 6, 'published': 4, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 4], ['x', 4, 6]], 'first_old': {'x': 1, 'y': 8}, 'last_new': {'x': 6, 'y': 8}, 'order': ['x', 'y'], 'revision': 4, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 3: [({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 9, 'published': 0, 'observer_error': False, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 6, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 0, 'revision': 9, 'published': 0, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': True, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6]], 'committed': False, 'rollback': False, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6]], 'first_old': {'x': 1}, 'last_new': {'x': 6}, 'order': ['x'], 'revision': 9, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': False, 'rollback': True, 'depth': 1, 'revision': 0, 'published': 6, 'observer_error': False, 'active': False, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[6, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [6, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 6], ['x', 6, 9], ['y', 12, 12]], 'committed': True, 'rollback': True, 'depth': 6, 'revision': 9, 'published': 6, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 6], ['x', 6, 9]], 'first_old': {'x': 1, 'y': 12}, 'last_new': {'x': 9, 'y': 12}, 'order': ['x', 'y'], 'revision': 6, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 4: [({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 12, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['child']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': True, 'depth': 8, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 0, 'state_rollback': True, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 8, 'revision': 12, 'published': 0, 'observer_error': False, 'active': True, 'durable': False, 'deferred': ['late'], 'parent_changes': [], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': True, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': False, 'active': True, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[8, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 8, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [8, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 8]], 'committed': False, 'rollback': False, 'depth': 1, 'revision': 12, 'published': 8, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8]], 'first_old': {'x': 1}, 'last_new': {'x': 8}, 'order': ['x'], 'revision': 12, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 8], ['x', 8, 12], ['y', 16, 16]], 'committed': True, 'rollback': True, 'depth': 8, 'revision': 12, 'published': 8, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 8], ['x', 8, 12]], 'first_old': {'x': 1, 'y': 16}, 'last_new': {'x': 12, 'y': 16}, 'order': ['x', 'y'], 'revision': 8, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})], 5: [({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 0, 'published': 10, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 0, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': False, 'deferred': ['parent', 'child']}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': False, 'depth': 10, 'revision': 15, 'published': 0, 'observer_error': True, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': False, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': False, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': [[10, 'a'], [0, 'z'], [1, 'm']]}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [[0, 'z'], [1, 'm'], [10, 'a']], 'publish_durable': True, 'deferred': ['parent']}), ({'changes': [['x', 1, 10]], 'committed': True, 'rollback': False, 'depth': 0, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': True, 'child_rollback': False, 'observer_failures': []}, {'visible': True, 'changed': [['x', 1, 10]], 'first_old': {'x': 1}, 'last_new': {'x': 10}, 'order': ['x'], 'revision': 15, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [], 'committed': True, 'rollback': False, 'depth': 1, 'revision': 15, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 15, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']}), ({'changes': [], 'committed': False, 'rollback': False, 'depth': 0, 'revision': 0, 'published': 0, 'observer_error': False, 'active': False, 'durable': False, 'deferred': [], 'parent_changes': [], 'child_changes': [], 'child_commit': False, 'child_rollback': False, 'observer_failures': []}, {'visible': False, 'changed': [], 'first_old': {}, 'last_new': {}, 'order': [], 'revision': 0, 'state_rollback': False, 'notify_error': [], 'publish_durable': False, 'deferred': []}), ({'changes': [['x', 1, 10], ['x', 10, 15], ['y', 20, 20]], 'committed': True, 'rollback': True, 'depth': 10, 'revision': 15, 'published': 10, 'observer_error': True, 'active': True, 'durable': True, 'deferred': ['late'], 'parent_changes': ['parent'], 'child_changes': ['child'], 'child_commit': True, 'child_rollback': True, 'observer_failures': [[1, 'b'], [1, 'a']]}, {'visible': False, 'changed': [['x', 1, 10], ['x', 10, 15]], 'first_old': {'x': 1, 'y': 20}, 'last_new': {'x': 15, 'y': 20}, 'order': ['x', 'y'], 'revision': 10, 'state_rollback': False, 'notify_error': [[1, 'b'], [1, 'a']], 'publish_durable': False, 'deferred': ['parent']})]}
for i,(state,expected) in enumerate(fixtures[N]):
    check("transition "+str(i), solve(state), 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
transition 0{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Passed
transition 1{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent', 'child'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': True, 'revision': 0, 'state_rollback': False, 'visible': False}Passed
transition 2{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 0, 'state_rollback': True, 'visible': False}Passed
transition 3{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': ['parent'], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': False, 'revision': 3, 'state_rollback': False, 'visible': False}Passed
transition 4{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': [], 'publish_durable': True, 'revision': 3, 'state_rollback': False, 'visible': True}Passed
transition 5{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': [], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[0, 'z'], [1, 'm'], [2, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': True, 'visible': False}Passed
transition 6{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}{'changed': [], 'deferred': [], 'first_old': {}, 'last_new': {}, 'notify_error': [], 'order': [], 'publish_durable': False, 'revision': 0, 'state_rollback': False, 'visible': False}Passed
transition 7{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}{'changed': [['x', 1, 2], ['x', 2, 3]], 'deferred': ['parent'], 'first_old': {'x': 1, 'y': 4}, 'last_new': {'x': 3, 'y': 4}, 'notify_error': [[1, 'b'], [1, 'a']], 'order': ['x', 'y'], 'publish_durable': False, 'revision': 2, 'state_rollback': False, 'visible': False}Passed

SHA-256 / 9dfdf7fbb9a28bae7bd9f23e416d556360461bf6b0934dc86ce9b9dc3257881f

Verification & scope

A deterministic, bounded, single-threaded transition planner. Returned plans model state changes; they do not implement a production event framework. 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:43:50.123124+00:00.

Case digest / 7ffa28f0e986b35cf05bbc9f6d217ce877c2b3e7ec7e9c10c6ee3a9491254ba8