FAILURE MAP
← Case archive

FA-41472 / Listener lifecycle / Member archive

Error termination leaves asynchronous callbacks active · case 02

Error termination leaves asynchronous callbacks active; the returned lifecycle plan violates the stated transition contract.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Plan an observer terminal notification. First completion or error closes the observer. Cancellation is silent; an error has precedence over completion. An already closed observer never receives another terminal callback. Queued values are discarded on error or cancellation but drain before normal completion. Release owned resources on first closure. 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: kind = None if s['closed'] or s['cancel'] else ('error' if s['error'] is not None else ('complete' if s['complete'] else None)); closed = s['closed'] or s['complete'] or s['error'] is not None or s['cancel']; drain = list(s['values']) if not s['closed'] and not s['cancel'] and s['error'] is None else []; error_payload = s['error'] if not s['closed'] and not s['cancel'] else None; release = s['owned'] and not s['closed'] and (s['complete'] or s['error'] is not None or s['cancel']); teardown = not s['teardown'] and not s['closed'] and (s['complete'] or s['error'] is not None or s['cancel']); inflight = 0 if s['error'] is not None or s['cancel'] else s['inflight']; late_error = s['closed'] and s['error'] is not None and not s['reported']; cancel_reason = s['reason'] if s['cancel'] else None; completion_wait = s['complete'] and s['error'] is None and not s['cancel'] and not s['closed'] and s['inflight']>0

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{"cancel_reason": "stop", "closed": true, "completion_wait": false, "drain": [], "error_payload": null, "inflight": 4, "kind": null, "late_error": false, "release": true, "teardown": false}{"cancel_reason": "stop", "closed": true, "completion_wait": false, "drain": [], "error_payload": null, "inflight": 0, "kind": null, "late_error": false, "release": true, "teardown": false}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 ↗