FA-34831 / Notification interfaces / Open access
Inbox notification pin persistence: notification-expires from pinned · case 01
The notification-expires event leaves a notification in unpinned instead of expired-pinned.
ROOT CAUSE
Expiration silently removes an explicit retained pin.
THE FAILURE
Expiration silently removes an explicit retained pin.
Unsuccessful approach: Deleting expired pinned content loses the promised retention marker.
Case contract
Inbox notification pin persistence is a bounded visual-notification workflow with mutable policy state {'pinned': ['other'], 'item': 'n', 'capacity': 3, 'expired': False, 'retained': True}. Its default transition relation is {('unpinned', 'pin-click'): 'pin-pending', ('pin-pending', 'pin-success'): 'pinned', ('pin-pending', 'pin-failure'): 'pin-error', ('pinned', 'unpin-click'): 'unpin-pending', ('unpin-pending', 'unpin-success'): 'unpinned', ('unpin-pending', 'unpin-failure'): 'unpin-error', ('pin-error', 'cancel-pin-intent'): 'unpinned', ('unpin-error', 'cancel-unpin-intent'): 'pinned', ('pinned', 'notification-expires'): 'expired-pinned', ('expired-pinned', 'unpin-expired'): 'gone'}; domain inputs can suppress or redirect transitions and update policy fields, as specified in solve. Different-generation events are inert. Batches apply in order. Optional observe returns the selected policy field alongside the phase.
Why this case matters
Visual notification lifecycle ordering can leave an inbox or toast showing the wrong actionable state even when transport succeeds.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(initial, events, generation, payload=None, observe=None):
table = {('unpinned', 'pin-click'): 'pin-pending', ('pin-pending', 'pin-success'): 'pinned', ('pin-pending', 'pin-failure'): 'pin-error', ('pinned', 'unpin-click'): 'unpin-pending', ('unpin-pending', 'unpin-success'): 'unpinned', ('unpin-pending', 'unpin-failure'): 'unpin-error', ('pin-error', 'cancel-pin-intent'): 'unpinned', ('unpin-error', 'cancel-unpin-intent'): 'pinned', ('pinned', 'notification-expires'): 'unpinned', ('expired-pinned', 'unpin-expired'): 'gone'}
data = json.loads(json.dumps({'pinned': ['other'], 'item': 'n', 'capacity': 3, 'expired': False, 'retained': True})) if payload is None else {**json.loads(json.dumps({'pinned': ['other'], 'item': 'n', 'capacity': 3, 'expired': False, 'retained': True})), **json.loads(json.dumps(payload))}
state = initial
for delivery in events:
event, event_generation = delivery[:2]
arg = delivery[2] if len(delivery) > 2 else {}
if event_generation == generation:
previous = state
if event == 'pin-click' and data['item'] not in data['pinned'] and len(data['pinned']) >= data['capacity']: event = 'unknown-event'
if event == 'notification-expires': data['expired'] = True
state = table.get((state, event), state)
if state in ('pinned','expired-pinned') and data['item'] not in data['pinned']: data['pinned'].append(data['item'])
if state in ('unpinned','gone'): data['pinned'] = [x for x in data['pinned'] if x != data['item']]
if state == 'gone': data['retained'] = False
return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unpinned / pin-click', solve('unpinned', [('pin-click', N)], N), 'pin-pending')
check('pin-pending / pin-success', solve('pin-pending', [('pin-success', N)], N), 'pinned')
check('pin-pending / pin-failure', solve('pin-pending', [('pin-failure', N)], N), 'pin-error')
check('pinned / unpin-click', solve('pinned', [('unpin-click', N)], N), 'unpin-pending')
check('unpin-pending / unpin-success', solve('unpin-pending', [('unpin-success', N)], N), 'unpinned')
check('unpin-pending / unpin-failure', solve('unpin-pending', [('unpin-failure', N)], N), 'unpin-error')
check('pin-error / cancel-pin-intent', solve('pin-error', [('cancel-pin-intent', N)], N), 'unpinned')
check('unpin-error / cancel-unpin-intent', solve('unpin-error', [('cancel-unpin-intent', N)], N), 'pinned')
check('pinned / notification-expires', solve('pinned', [('notification-expires', N)], N), 'expired-pinned')
check('expired-pinned / unpin-expired', solve('expired-pinned', [('unpin-expired', N)], N), 'gone')
check('older notification incarnation', solve('unpinned', [('pin-click', N - 1)], N), 'unpinned')
check('future notification incarnation', solve('unpinned', [('pin-click', N + 1)], N), 'unpinned')
check('unknown event is inert', solve('unpinned', [('unknown-event', N)], N), 'unpinned')
check('empty delivery batch', solve('unpinned', [], N), 'unpinned')
check('N stale deliveries before current delivery', solve('unpinned', [('pin-click', N - 1)] * N + [('pin-click', N)], N), 'pin-pending')
check('trace pin-click then pin-success', solve('unpinned', [('pin-click', N), ('pin-success', N)], N), 'pinned')
check('trace pin-click then pin-failure', solve('unpinned', [('pin-click', N), ('pin-failure', N)], N), 'pin-error')
check('trace pin-success then unpin-click', solve('pin-pending', [('pin-success', N), ('unpin-click', N)], N), 'unpin-pending')
check('trace pin-success then notification-expires', solve('pin-pending', [('pin-success', N), ('notification-expires', N)], N), 'expired-pinned')
check('trace pin-failure then cancel-pin-intent', solve('pin-pending', [('pin-failure', N), ('cancel-pin-intent', N)], N), 'unpinned')
check('trace unpin-click then unpin-success', solve('pinned', [('unpin-click', N), ('unpin-success', N)], N), 'unpinned')
check('trace unpin-click then unpin-failure', solve('pinned', [('unpin-click', N), ('unpin-failure', N)], N), 'unpin-error')
check('trace unpin-success then pin-click', solve('unpin-pending', [('unpin-success', N), ('pin-click', N)], N), 'pin-pending')
check('trace unpin-failure then cancel-unpin-intent', solve('unpin-pending', [('unpin-failure', N), ('cancel-unpin-intent', N)], N), 'pinned')
check('trace cancel-pin-intent then pin-click', solve('pin-error', [('cancel-pin-intent', N), ('pin-click', N)], N), 'pin-pending')
check('trace cancel-unpin-intent then unpin-click', solve('unpin-error', [('cancel-unpin-intent', N), ('unpin-click', N)], N), 'unpin-pending')
check('trace cancel-unpin-intent then notification-expires', solve('unpin-error', [('cancel-unpin-intent', N), ('notification-expires', N)], N), 'expired-pinned')
check('trace notification-expires then unpin-expired', solve('pinned', [('notification-expires', N), ('unpin-expired', N)], N), 'gone')
check('domain state regression 1: pinned', solve('unpinned', [('pin-click', N, {})], N, {'capacity': 1}, 'pinned'), {'phase': 'unpinned', 'value': ['other']})
check('domain state regression 2: pinned', solve('pin-pending', [('pin-success', N, {})], N, {}, 'pinned'), {'phase': 'pinned', 'value': ['other', 'n']})
check('domain state regression 3: pinned', solve('unpin-pending', [('unpin-success', N, {})], N, {'pinned': ['n', 'other']}, 'pinned'), {'phase': 'unpinned', 'value': ['other']})
check('domain state regression 4: retained', solve('pinned', [('notification-expires', N, {})], N, {'pinned': ['n']}, 'retained'), {'phase': 'expired-pinned', 'value': True})
check('domain state regression 5: pinned', solve('expired-pinned', [('unpin-expired', N, {})], N, {'pinned': ['n', 'other'], 'expired': True}, 'pinned'), {'phase': 'gone', 'value': ['other']})
check('domain state regression 6: retained', solve('expired-pinned', [('unpin-expired', N, {})], N, {'pinned': ['n'], 'expired': True}, 'retained'), {'phase': 'gone', 'value': False})
check('domain state regression 7: pinned', solve('unpinned', [('pin-click', N, {}), ('pin-success', N, {}), ('notification-expires', N, {}), ('unpin-expired', N, {})], N, {}, 'pinned'), {'phase': 'gone', 'value': ['other']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unpinned / pin-click | pin-pending | pin-pending | Passed |
| pin-pending / pin-success | pinned | pinned | Passed |
| pin-pending / pin-failure | pin-error | pin-error | Passed |
| pinned / unpin-click | unpin-pending | unpin-pending | Passed |
| unpin-pending / unpin-success | unpinned | unpinned | Passed |
| unpin-pending / unpin-failure | unpin-error | unpin-error | Passed |
| pin-error / cancel-pin-intent | unpinned | unpinned | Passed |
| unpin-error / cancel-unpin-intent | pinned | pinned | Passed |
| pinned / notification-expires | unpinned | expired-pinned | Failed |
| expired-pinned / unpin-expired | gone | gone | Passed |
| older notification incarnation | unpinned | unpinned | Passed |
| future notification incarnation | unpinned | unpinned | Passed |
| unknown event is inert | unpinned | unpinned | Passed |
| empty delivery batch | unpinned | unpinned | Passed |
| N stale deliveries before current delivery | pin-pending | pin-pending | Passed |
| trace pin-click then pin-success | pinned | pinned | Passed |
| trace pin-click then pin-failure | pin-error | pin-error | Passed |
| trace pin-success then unpin-click | unpin-pending | unpin-pending | Passed |
| trace pin-success then notification-expires | unpinned | expired-pinned | Failed |
| trace pin-failure then cancel-pin-intent | unpinned | unpinned | Passed |
| trace unpin-click then unpin-success | unpinned | unpinned | Passed |
| trace unpin-click then unpin-failure | unpin-error | unpin-error | Passed |
| trace unpin-success then pin-click | pin-pending | pin-pending | Passed |
| trace unpin-failure then cancel-unpin-intent | pinned | pinned | Passed |
| trace cancel-pin-intent then pin-click | pin-pending | pin-pending | Passed |
| trace cancel-unpin-intent then unpin-click | unpin-pending | unpin-pending | Passed |
| trace cancel-unpin-intent then notification-expires | unpinned | expired-pinned | Failed |
| trace notification-expires then unpin-expired | unpinned | gone | Failed |
| domain state regression 1: pinned | {'phase': 'unpinned', 'value': ['other']} | {'phase': 'unpinned', 'value': ['other']} | Passed |
| domain state regression 2: pinned | {'phase': 'pinned', 'value': ['other', 'n']} | {'phase': 'pinned', 'value': ['other', 'n']} | Passed |
| domain state regression 3: pinned | {'phase': 'unpinned', 'value': ['other']} | {'phase': 'unpinned', 'value': ['other']} | Passed |
| domain state regression 4: retained | {'phase': 'unpinned', 'value': True} | {'phase': 'expired-pinned', 'value': True} | Failed |
| domain state regression 5: pinned | {'phase': 'gone', 'value': ['other']} | {'phase': 'gone', 'value': ['other']} | Passed |
| domain state regression 6: retained | {'phase': 'gone', 'value': False} | {'phase': 'gone', 'value': False} | Passed |
| domain state regression 7: pinned | {'phase': 'unpinned', 'value': ['other']} | {'phase': 'gone', 'value': ['other']} | Failed |
SHA-256 / 8fc7af81e1f41b66c56eaf0b3ec54e0f1f918dd5d341d00da8ef8cbc8e1f2179
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(initial, events, generation, payload=None, observe=None):
table = {('unpinned', 'pin-click'): 'pin-pending', ('pin-pending', 'pin-success'): 'pinned', ('pin-pending', 'pin-failure'): 'pin-error', ('pinned', 'unpin-click'): 'unpin-pending', ('unpin-pending', 'unpin-success'): 'unpinned', ('unpin-pending', 'unpin-failure'): 'unpin-error', ('pin-error', 'cancel-pin-intent'): 'unpinned', ('unpin-error', 'cancel-unpin-intent'): 'pinned', ('pinned', 'notification-expires'): 'gone', ('expired-pinned', 'unpin-expired'): 'gone'}
data = json.loads(json.dumps({'pinned': ['other'], 'item': 'n', 'capacity': 3, 'expired': False, 'retained': True})) if payload is None else {**json.loads(json.dumps({'pinned': ['other'], 'item': 'n', 'capacity': 3, 'expired': False, 'retained': True})), **json.loads(json.dumps(payload))}
state = initial
for delivery in events:
event, event_generation = delivery[:2]
arg = delivery[2] if len(delivery) > 2 else {}
if event_generation == generation:
previous = state
if event == 'pin-click' and data['item'] not in data['pinned'] and len(data['pinned']) >= data['capacity']: event = 'unknown-event'
if event == 'notification-expires': data['expired'] = True
state = table.get((state, event), state)
if state in ('pinned','expired-pinned') and data['item'] not in data['pinned']: data['pinned'].append(data['item'])
if state in ('unpinned','gone'): data['pinned'] = [x for x in data['pinned'] if x != data['item']]
if state == 'gone': data['retained'] = False
return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unpinned / pin-click', solve('unpinned', [('pin-click', N)], N), 'pin-pending')
check('pin-pending / pin-success', solve('pin-pending', [('pin-success', N)], N), 'pinned')
check('pin-pending / pin-failure', solve('pin-pending', [('pin-failure', N)], N), 'pin-error')
check('pinned / unpin-click', solve('pinned', [('unpin-click', N)], N), 'unpin-pending')
check('unpin-pending / unpin-success', solve('unpin-pending', [('unpin-success', N)], N), 'unpinned')
check('unpin-pending / unpin-failure', solve('unpin-pending', [('unpin-failure', N)], N), 'unpin-error')
check('pin-error / cancel-pin-intent', solve('pin-error', [('cancel-pin-intent', N)], N), 'unpinned')
check('unpin-error / cancel-unpin-intent', solve('unpin-error', [('cancel-unpin-intent', N)], N), 'pinned')
check('pinned / notification-expires', solve('pinned', [('notification-expires', N)], N), 'expired-pinned')
check('expired-pinned / unpin-expired', solve('expired-pinned', [('unpin-expired', N)], N), 'gone')
check('older notification incarnation', solve('unpinned', [('pin-click', N - 1)], N), 'unpinned')
check('future notification incarnation', solve('unpinned', [('pin-click', N + 1)], N), 'unpinned')
check('unknown event is inert', solve('unpinned', [('unknown-event', N)], N), 'unpinned')
check('empty delivery batch', solve('unpinned', [], N), 'unpinned')
check('N stale deliveries before current delivery', solve('unpinned', [('pin-click', N - 1)] * N + [('pin-click', N)], N), 'pin-pending')
check('trace pin-click then pin-success', solve('unpinned', [('pin-click', N), ('pin-success', N)], N), 'pinned')
check('trace pin-click then pin-failure', solve('unpinned', [('pin-click', N), ('pin-failure', N)], N), 'pin-error')
check('trace pin-success then unpin-click', solve('pin-pending', [('pin-success', N), ('unpin-click', N)], N), 'unpin-pending')
check('trace pin-success then notification-expires', solve('pin-pending', [('pin-success', N), ('notification-expires', N)], N), 'expired-pinned')
check('trace pin-failure then cancel-pin-intent', solve('pin-pending', [('pin-failure', N), ('cancel-pin-intent', N)], N), 'unpinned')
check('trace unpin-click then unpin-success', solve('pinned', [('unpin-click', N), ('unpin-success', N)], N), 'unpinned')
check('trace unpin-click then unpin-failure', solve('pinned', [('unpin-click', N), ('unpin-failure', N)], N), 'unpin-error')
check('trace unpin-success then pin-click', solve('unpin-pending', [('unpin-success', N), ('pin-click', N)], N), 'pin-pending')
check('trace unpin-failure then cancel-unpin-intent', solve('unpin-pending', [('unpin-failure', N), ('cancel-unpin-intent', N)], N), 'pinned')
check('trace cancel-pin-intent then pin-click', solve('pin-error', [('cancel-pin-intent', N), ('pin-click', N)], N), 'pin-pending')
check('trace cancel-unpin-intent then unpin-click', solve('unpin-error', [('cancel-unpin-intent', N), ('unpin-click', N)], N), 'unpin-pending')
check('trace cancel-unpin-intent then notification-expires', solve('unpin-error', [('cancel-unpin-intent', N), ('notification-expires', N)], N), 'expired-pinned')
check('trace notification-expires then unpin-expired', solve('pinned', [('notification-expires', N), ('unpin-expired', N)], N), 'gone')
check('domain state regression 1: pinned', solve('unpinned', [('pin-click', N, {})], N, {'capacity': 1}, 'pinned'), {'phase': 'unpinned', 'value': ['other']})
check('domain state regression 2: pinned', solve('pin-pending', [('pin-success', N, {})], N, {}, 'pinned'), {'phase': 'pinned', 'value': ['other', 'n']})
check('domain state regression 3: pinned', solve('unpin-pending', [('unpin-success', N, {})], N, {'pinned': ['n', 'other']}, 'pinned'), {'phase': 'unpinned', 'value': ['other']})
check('domain state regression 4: retained', solve('pinned', [('notification-expires', N, {})], N, {'pinned': ['n']}, 'retained'), {'phase': 'expired-pinned', 'value': True})
check('domain state regression 5: pinned', solve('expired-pinned', [('unpin-expired', N, {})], N, {'pinned': ['n', 'other'], 'expired': True}, 'pinned'), {'phase': 'gone', 'value': ['other']})
check('domain state regression 6: retained', solve('expired-pinned', [('unpin-expired', N, {})], N, {'pinned': ['n'], 'expired': True}, 'retained'), {'phase': 'gone', 'value': False})
check('domain state regression 7: pinned', solve('unpinned', [('pin-click', N, {}), ('pin-success', N, {}), ('notification-expires', N, {}), ('unpin-expired', N, {})], N, {}, 'pinned'), {'phase': 'gone', 'value': ['other']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unpinned / pin-click | pin-pending | pin-pending | Passed |
| pin-pending / pin-success | pinned | pinned | Passed |
| pin-pending / pin-failure | pin-error | pin-error | Passed |
| pinned / unpin-click | unpin-pending | unpin-pending | Passed |
| unpin-pending / unpin-success | unpinned | unpinned | Passed |
| unpin-pending / unpin-failure | unpin-error | unpin-error | Passed |
| pin-error / cancel-pin-intent | unpinned | unpinned | Passed |
| unpin-error / cancel-unpin-intent | pinned | pinned | Passed |
| pinned / notification-expires | gone | expired-pinned | Failed |
| expired-pinned / unpin-expired | gone | gone | Passed |
| older notification incarnation | unpinned | unpinned | Passed |
| future notification incarnation | unpinned | unpinned | Passed |
| unknown event is inert | unpinned | unpinned | Passed |
| empty delivery batch | unpinned | unpinned | Passed |
| N stale deliveries before current delivery | pin-pending | pin-pending | Passed |
| trace pin-click then pin-success | pinned | pinned | Passed |
| trace pin-click then pin-failure | pin-error | pin-error | Passed |
| trace pin-success then unpin-click | unpin-pending | unpin-pending | Passed |
| trace pin-success then notification-expires | gone | expired-pinned | Failed |
| trace pin-failure then cancel-pin-intent | unpinned | unpinned | Passed |
| trace unpin-click then unpin-success | unpinned | unpinned | Passed |
| trace unpin-click then unpin-failure | unpin-error | unpin-error | Passed |
| trace unpin-success then pin-click | pin-pending | pin-pending | Passed |
| trace unpin-failure then cancel-unpin-intent | pinned | pinned | Passed |
| trace cancel-pin-intent then pin-click | pin-pending | pin-pending | Passed |
| trace cancel-unpin-intent then unpin-click | unpin-pending | unpin-pending | Passed |
| trace cancel-unpin-intent then notification-expires | gone | expired-pinned | Failed |
| trace notification-expires then unpin-expired | gone | gone | Passed |
| domain state regression 1: pinned | {'phase': 'unpinned', 'value': ['other']} | {'phase': 'unpinned', 'value': ['other']} | Passed |
| domain state regression 2: pinned | {'phase': 'pinned', 'value': ['other', 'n']} | {'phase': 'pinned', 'value': ['other', 'n']} | Passed |
| domain state regression 3: pinned | {'phase': 'unpinned', 'value': ['other']} | {'phase': 'unpinned', 'value': ['other']} | Passed |
| domain state regression 4: retained | {'phase': 'gone', 'value': False} | {'phase': 'expired-pinned', 'value': True} | Failed |
| domain state regression 5: pinned | {'phase': 'gone', 'value': ['other']} | {'phase': 'gone', 'value': ['other']} | Passed |
| domain state regression 6: retained | {'phase': 'gone', 'value': False} | {'phase': 'gone', 'value': False} | Passed |
| domain state regression 7: pinned | {'phase': 'gone', 'value': ['other']} | {'phase': 'gone', 'value': ['other']} | Passed |
SHA-256 / 2cdf1e8d3a40a4597e0a46d27bac6e283184dc1144669909df9c8e2fa3c6eace
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 35 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated single-notification state and policy model only. Event delivery and acknowledgements are explicit test inputs. No DOM, accessibility announcements, live timers, networking, actual rendering, or production-platform conformance is simulated. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:35.757403+00:00.
Case digest / 0a78a2a3768d1762eaea388ad9e730f4ecdd3fc1e0380de9e73fb0266725c1d4