FAILURE MAP
← Case archive

FA-42523 / Listener lifecycle / Member archive

Zip error disposes a borrowed left subscription · case 03

Zip error disposes a borrowed left subscription; the returned lifecycle plan violates the stated transition contract.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

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.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
transition 0{"clear_left": ["b", "c", "new", "newer"], "clear_right": [], "complete": false, "credit": 0, "left_dispose": true, "left_tail": ["a", "b", "c"], "pair": ["a", "x"], "ready": false, "right_dispose": false, "right_tail": ["x", "y"]}{"clear_left": ["b", "c", "new", "newer"], "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

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗