FA-42511 / Listener lifecycle / Open access
Zip waits for both upstreams after one empty input completes · case 01
Zip waits for both upstreams after one empty input completes; the returned lifecycle plan violates the stated transition contract.
ROOT CAUSE
The complete decision in the zip-observer listener model is computed as s['left_done'] and s['right_done'], losing a required lifecycle condition.
THE FAILURE
The complete decision in the zip-observer listener model is computed as s['left_done'] and s['right_done'], losing a required lifecycle condition.
Unsuccessful approach: The partial repair uses s['left_done'] or s['right_done']; a retained regression distinguishes it from the full transition.
Case contract
Plan a two-source zip observer with arrival-order input buffers. Emit one pair only when both buffers are nonempty and downstream credit is positive. Consume one head from each. Complete as soon as a completed source has an empty buffer, since no future pair is possible. Error disposes both input subscriptions, and cancellation releases both buffered tails. Consume the paired left head before invoking the output callback, then append left values produced reentrantly by that callback to the remaining tail. 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: ready = bool(s['left']) and bool(s['right']) and s['credit']>0; pair = [s['left'][0],s['right'][0]] if s['left'] and s['right'] else None; left_tail = s['left'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['left']); right_tail = s['right'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['right']); complete = (s['left_done'] and not s['left']) or (s['right_done'] and not s['right']); credit = max(0,s['credit']-int(bool(s['left']) and bool(s['right']))); left_dispose = s['left_owned'] and (s['error'] is not None or s['cancel']); right_dispose = s['right_owned'] and (s['error'] is not None or s['cancel']); clear_left = s['left'][1:]+list(s['reentrant_left']) if s['left'] and s['right'] else list(s['left'])+list(s['reentrant_left']); clear_right = [] if s['error'] is not None else list(s['right'])
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 {
'ready': bool(s['left']) and bool(s['right']) and s['credit']>0,
'pair': [s['left'][0],s['right'][0]] if s['left'] and s['right'] else None,
'left_tail': s['left'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['left']),
'right_tail': s['right'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['right']),
'complete': s['left_done'] and s['right_done'],
'credit': max(0,s['credit']-int(bool(s['left']) and bool(s['right']))),
'left_dispose': s['left_owned'] and (s['error'] is not None or s['cancel']),
'right_dispose': s['right_owned'] and (s['error'] is not None or s['cancel']),
'clear_left': s['left'][1:]+list(s['reentrant_left']) if s['left'] and s['right'] else list(s['left'])+list(s['reentrant_left']),
'clear_right': [] if s['error'] is not None else list(s['right']),
}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 3, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 3, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 1, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': []}), ({'left': ['a'], 'right': ['x'], 'credit': 1, 'left_done': False, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x'], 'credit': 3, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': [], 'complete': False, 'credit': 2, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c'], 'clear_right': ['x']}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 3, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 2, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 2: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 6, 'left_done': False, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 6, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 6, 'left_done': True, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 6, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 6, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 6, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 6, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 6, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 5, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 3: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 1, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 1, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 1, 'left_done': True, 'right_done': True, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': ['x', 'y']}), ({'left': [], 'right': ['x', 'y'], 'credit': 1, 'left_done': False, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 1, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 9, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 8, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 4: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': ['a'], 'right': [], 'credit': 12, 'left_done': False, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a'], 'right_tail': [], 'complete': True, 'credit': 12, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['a'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 12, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 12, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 12, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 11, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': ['x'], 'credit': 1, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 12, 'left_done': False, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 12, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 12, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 11, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 5: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': ['a'], 'right': [], 'credit': 1, 'left_done': True, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a'], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['a', 'new', 'newer'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 15, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 15, 'left_dispose': True, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 1, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': [], 'right': ['x'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new'], 'clear_right': ['x']}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 15, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 14, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| transition 0 | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': False, 'right_tail': ['x', 'y']} | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': False, 'right_tail': ['x', 'y']} | Passed |
| transition 1 | {'clear_left': [], 'clear_right': ['x', 'y'], 'complete': False, 'credit': 3, 'left_dispose': True, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | {'clear_left': [], 'clear_right': ['x', 'y'], 'complete': True, 'credit': 3, 'left_dispose': True, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | Failed |
| transition 2 | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | Passed |
| transition 3 | {'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': []} | {'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': []} | Passed |
| transition 4 | {'clear_left': ['new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | {'clear_left': ['new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | Passed |
| transition 5 | {'clear_left': ['b', 'c'], 'clear_right': ['x'], 'complete': False, 'credit': 2, 'left_dispose': False, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | {'clear_left': ['b', 'c'], 'clear_right': ['x'], 'complete': False, 'credit': 2, 'left_dispose': False, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | Passed |
| transition 6 | {'clear_left': [], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': False, 'right_tail': []} | {'clear_left': [], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': False, 'right_tail': []} | Passed |
| transition 7 | {'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': [], 'complete': True, 'credit': 2, 'left_dispose': True, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': True, 'right_tail': ['y']} | {'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': [], 'complete': False, 'credit': 2, 'left_dispose': True, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': True, 'right_tail': ['y']} | Failed |
SHA-256 / 5001ee7622349148a6ccac8f58bf18995522a2b555a00080cd88099a1777017c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
return {
'ready': bool(s['left']) and bool(s['right']) and s['credit']>0,
'pair': [s['left'][0],s['right'][0]] if s['left'] and s['right'] else None,
'left_tail': s['left'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['left']),
'right_tail': s['right'][1:] if s['left'] and s['right'] and s['credit']>0 else list(s['right']),
'complete': s['left_done'] or s['right_done'],
'credit': max(0,s['credit']-int(bool(s['left']) and bool(s['right']))),
'left_dispose': s['left_owned'] and (s['error'] is not None or s['cancel']),
'right_dispose': s['right_owned'] and (s['error'] is not None or s['cancel']),
'clear_left': s['left'][1:]+list(s['reentrant_left']) if s['left'] and s['right'] else list(s['left'])+list(s['reentrant_left']),
'clear_right': [] if s['error'] is not None else list(s['right']),
}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 3, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 3, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 1, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': []}), ({'left': ['a'], 'right': ['x'], 'credit': 1, 'left_done': False, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x'], 'credit': 3, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': [], 'complete': False, 'credit': 2, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c'], 'clear_right': ['x']}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 3, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 2, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 2: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 6, 'left_done': False, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 6, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 6, 'left_done': True, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 6, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 6, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 6, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 6, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 6, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 6, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 5, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 3: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 1, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 1, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 1, 'left_done': True, 'right_done': True, 'error': None, 'cancel': False, 'left_owned': True, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': ['x', 'y']}), ({'left': [], 'right': ['x', 'y'], 'credit': 1, 'left_done': False, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 1, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 9, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 8, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 4: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': ['a'], 'right': [], 'credit': 12, 'left_done': False, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': ['a'], 'right_tail': [], 'complete': True, 'credit': 12, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['a'], 'clear_right': []}), ({'left': [], 'right': ['x', 'y'], 'credit': 12, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x', 'y'], 'complete': True, 'credit': 12, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 12, 'left_done': False, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 11, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': ['x', 'y']}), ({'left': ['a', 'b', 'c'], 'right': ['x'], 'credit': 1, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 12, 'left_done': False, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': True, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 12, 'left_dispose': True, 'right_dispose': True, 'clear_left': [], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 12, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 11, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})], 5: [({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': ['a'], 'right': [], 'credit': 1, 'left_done': True, 'right_done': True, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a'], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['a', 'new', 'newer'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 0, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': True, 'left_owned': False, 'right_owned': True, 'reentrant_left': []}, {'ready': False, 'pair': ['a', 'x'], 'left_tail': ['a', 'b', 'c'], 'right_tail': ['x', 'y'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['b', 'c'], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': [], 'credit': 15, 'left_done': True, 'right_done': False, 'error': None, 'cancel': True, 'left_owned': True, 'right_owned': False, 'reentrant_left': ['new', 'newer']}, {'ready': False, 'pair': None, 'left_tail': ['a', 'b', 'c'], 'right_tail': [], 'complete': False, 'credit': 15, 'left_dispose': True, 'right_dispose': False, 'clear_left': ['a', 'b', 'c', 'new', 'newer'], 'clear_right': []}), ({'left': [], 'right': [], 'credit': 1, 'left_done': True, 'right_done': False, 'error': 'bad', 'cancel': False, 'left_owned': False, 'right_owned': True, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': True, 'credit': 1, 'left_dispose': False, 'right_dispose': True, 'clear_left': ['new'], 'clear_right': []}), ({'left': [], 'right': ['x'], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': ['new']}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': ['x'], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': ['new'], 'clear_right': ['x']}), ({'left': [], 'right': [], 'credit': 0, 'left_done': False, 'right_done': False, 'error': None, 'cancel': False, 'left_owned': False, 'right_owned': False, 'reentrant_left': []}, {'ready': False, 'pair': None, 'left_tail': [], 'right_tail': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'right_dispose': False, 'clear_left': [], 'clear_right': []}), ({'left': ['a', 'b', 'c'], 'right': ['x', 'y'], 'credit': 15, 'left_done': True, 'right_done': True, 'error': 'bad', 'cancel': True, 'left_owned': True, 'right_owned': True, 'reentrant_left': ['new', 'newer']}, {'ready': True, 'pair': ['a', 'x'], 'left_tail': ['b', 'c'], 'right_tail': ['y'], 'complete': False, 'credit': 14, 'left_dispose': True, 'right_dispose': True, 'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': []})]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| transition 0 | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': True, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': False, 'right_tail': ['x', 'y']} | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': False, 'right_tail': ['x', 'y']} | Failed |
| transition 1 | {'clear_left': [], 'clear_right': ['x', 'y'], 'complete': True, 'credit': 3, 'left_dispose': True, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | {'clear_left': [], 'clear_right': ['x', 'y'], 'complete': True, 'credit': 3, 'left_dispose': True, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | Passed |
| transition 2 | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | {'clear_left': ['b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': ['a', 'x'], 'ready': False, 'right_dispose': True, 'right_tail': ['x', 'y']} | Passed |
| transition 3 | {'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': []} | {'clear_left': ['a', 'b', 'c', 'new'], 'clear_right': [], 'complete': False, 'credit': 1, 'left_dispose': False, 'left_tail': ['a', 'b', 'c'], 'pair': None, 'ready': False, 'right_dispose': True, 'right_tail': []} | Passed |
| transition 4 | {'clear_left': ['new'], 'clear_right': [], 'complete': True, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | {'clear_left': ['new'], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | Failed |
| transition 5 | {'clear_left': ['b', 'c'], 'clear_right': ['x'], 'complete': False, 'credit': 2, 'left_dispose': False, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | {'clear_left': ['b', 'c'], 'clear_right': ['x'], 'complete': False, 'credit': 2, 'left_dispose': False, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': False, 'right_tail': []} | Passed |
| transition 6 | {'clear_left': [], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': False, 'right_tail': []} | {'clear_left': [], 'clear_right': [], 'complete': False, 'credit': 0, 'left_dispose': False, 'left_tail': [], 'pair': None, 'ready': False, 'right_dispose': False, 'right_tail': []} | Passed |
| transition 7 | {'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': [], 'complete': True, 'credit': 2, 'left_dispose': True, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': True, 'right_tail': ['y']} | {'clear_left': ['b', 'c', 'new', 'newer'], 'clear_right': [], 'complete': False, 'credit': 2, 'left_dispose': True, 'left_tail': ['b', 'c'], 'pair': ['a', 'x'], 'ready': True, 'right_dispose': True, 'right_tail': ['y']} | Failed |
SHA-256 / 38737d47817ee25a6d3de4129637967ac3d1049094f5b37d8c99e83c1bca9983
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:52.697889+00:00.
Case digest / 52405653e8187db19aa2f457a49cd8f8d87d8e93e8d0e53d289d4d373c2194b3