FA-41530 / Listener lifecycle / Member archive
Last unsubscribe leaves queued connection requests behind · case 05
Last unsubscribe leaves queued connection requests behind; the returned lifecycle plan violates the stated transition contract.
Case contract
A reference-counted observer connection transitions from before subscribers to after subscribers. Connect on zero-to-positive, disconnect on positive-to-zero unless keepalive; a failed connection is retried only when requested. A generation advances only on a fresh successful connection. Ownership controls upstream disposal, not subscriber accounting. 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: connect = s['after']>0 and not s['connected'] and (not s['failed'] or s['retry']); disconnect = s['before']>0 and s['after']==0 and s['connected'] and not s['keep']; delta = s['after']-s['before']; generation = s['generation']+int(not s['connected'] and s['after']>0 and s['successful']); dispose = s['owned'] and s['connected'] and s['after']==0 and not s['keep']; retry = s['retry'] and s['failed'] and s['after']>0 and not s['connected']; idle = s['after']==0 and s['connected'] and s['keep']; pending = s['pending'] if s['after']>0 else 0; first = s['before']==0 and s['after']>0; last = s['before']>0 and s['after']==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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| transition 0 | {"connect": false, "delta": -1, "disconnect": false, "dispose": false, "first": false, "generation": 10, "idle": true, "last": true, "pending": 10, "retry": false} | {"connect": false, "delta": -1, "disconnect": false, "dispose": false, "first": false, "generation": 10, "idle": true, "last": true, "pending": 0, "retry": 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 ↗