FAILURE MAP
← Case archive

FA-41918 / Listener lifecycle / Member archive

Replay loses live events received while replay is active · case 03

Replay loses live events received while replay is active; the returned lifecycle plan violates the stated transition contract.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Plan a subscription to a bounded replay observer. History entries are [sequence,value]; deliver entries strictly after cursor, in stored order, capped by demand. Subscriber replay is suppressed after cancellation. A terminal marker follows replay only when requested. A gap exists if the cursor precedes the oldest retained predecessor. Live events stay deferred until replay completes. 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: eligible = [r for r in s['history'] if r[0]>s['cursor']]; values = [r[1] for r in s['history'] if r[0]>s['cursor']][:s['demand']] if not s['cancel'] else []; gap = bool(s['history']) and s['cursor']<s['history'][0][0]-1; terminal = s['terminal'] if s['want_terminal'] and not s['cancel'] and not s['replaying'] else None; live = list(s['live']) if not s['replaying'] and not s['cancel'] else []; deferred = list(s['live']) if s['replaying'] and not s['cancel'] else []; cursor = max([s['cursor']]+[r[0] for r in s['history'] if r[0]>s['cursor']][:s['demand']]); remaining = max(0,s['demand']-len([r for r in s['history'] if r[0]>s['cursor']])); attach_live = not s['subscribed'] and s['terminal'] is None and not s['cancel']; history_order = [r[0] for r in s['history']]

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{"attach_live": false, "cursor": 0, "deferred": [], "eligible": [[1, "a"], [9, "b"], [12, "c"]], "gap": false, "history_order": [1, 9, 12], "live": [], "remaining": 0, "terminal": null, "values": []}{"attach_live": false, "cursor": 0, "deferred": ["live"], "eligible": [[1, "a"], [9, "b"], [12, "c"]], "gap": false, "history_order": [1, 9, 12], "live": [], "remaining": 0, "terminal": null, "values": []}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 ↗