FA-41384 / Listener lifecycle / Member archive
Cancellation underflows an unattached hook reference · case 04
Cancellation underflows an unattached hook reference; the returned lifecycle plan violates the stated transition contract.
Case contract
Plan linking a subscription to a cancellation signal. Already-aborted signals reject attachment, immediately dispose existing work, and deliver the reason exactly once. A fresh signal attaches one hook only while the subscription is active. Preserve independent signal and subscription ownership; no callback invocation is modeled. 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: attach = s['active'] and not s['aborted'] and not s['hook']; dispose = s['aborted'] and not s['disposed']; detach = s['hook'] and (s['aborted'] or not s['active']); reason = s['reason'] if s['aborted'] else None; clear_pending = 0 if s['aborted'] else s['pending']; release = s['owns'] and not s['borrowed'] and s['aborted']; notify = s['aborted'] and not s['notified']; accept = s['active'] and not s['disposed'] and not s['aborted']; refcount = max(0,s['refs']-int(s['hook'] and s['aborted'])); terminal = s['disposed'] or s['aborted']
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 | {"accept": false, "attach": false, "clear_pending": 0, "detach": true, "dispose": true, "notify": true, "reason": "cancel", "refcount": -1, "release": false, "terminal": true} | {"accept": false, "attach": false, "clear_pending": 0, "detach": true, "dispose": true, "notify": true, "reason": "cancel", "refcount": 0, "release": false, "terminal": true} | 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 ↗