FAILURE MAP
← Case archive

FA-34016 / Notification interfaces / Open access

Inbox read receipt rendering: retry-receipt from read-error · case 01

The retry-receipt event leaves a notification in read-confirmed instead of read-pending.

Verified by executionVariant 1 · 36 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Retry is displayed as confirmed before acceptance.

THE FAILURE

Retry is displayed as confirmed before acceptance.

Unsuccessful approach: Opening the preview fails to retry the stored intent.

Case contract

Inbox read receipt rendering is a bounded visual-notification workflow with mutable policy state {'revision': 2, 'ack_revision': 0, 'unread_ids': ['n', 'other'], 'item': 'n'}. Its default transition relation is {('unread', 'open-preview'): 'previewing', ('previewing', 'close-preview'): 'unread', ('previewing', 'mark-read'): 'read-pending', ('read-pending', 'receipt-accepted'): 'read-confirmed', ('read-pending', 'receipt-rejected'): 'read-error', ('read-error', 'retry-receipt'): 'read-pending', ('read-confirmed', 'mark-unread'): 'unread-pending', ('unread-pending', 'unread-accepted'): 'unread', ('unread-pending', 'unread-rejected'): 'unread-error', ('unread-error', 'dismiss-error'): 'read-confirmed'}; 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 = {('unread', 'open-preview'): 'previewing', ('previewing', 'close-preview'): 'unread', ('previewing', 'mark-read'): 'read-pending', ('read-pending', 'receipt-accepted'): 'read-confirmed', ('read-pending', 'receipt-rejected'): 'read-error', ('read-error', 'retry-receipt'): 'read-confirmed', ('read-confirmed', 'mark-unread'): 'unread-pending', ('unread-pending', 'unread-accepted'): 'unread', ('unread-pending', 'unread-rejected'): 'unread-error', ('unread-error', 'dismiss-error'): 'read-confirmed'}
    data = json.loads(json.dumps({'revision': 2, 'ack_revision': 0, 'unread_ids': ['n', 'other'], 'item': 'n'})) if payload is None else {**json.loads(json.dumps({'revision': 2, 'ack_revision': 0, 'unread_ids': ['n', 'other'], 'item': 'n'})), **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 in ('receipt-accepted','receipt-rejected','unread-accepted','unread-rejected') and arg.get('revision',data['revision']) != data['revision']: event = 'unknown-event'
            state = table.get((state, event), state)
            if state == 'read-confirmed':
                data['ack_revision'] = data['revision']
                data['unread_ids'] = [x for x in data['unread_ids'] if x != data['item']]
            if state == 'unread' and data['item'] not in data['unread_ids']: data['unread_ids'].append(data['item'])
    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('unread / open-preview', solve('unread', [('open-preview', N)], N), 'previewing')
check('previewing / close-preview', solve('previewing', [('close-preview', N)], N), 'unread')
check('previewing / mark-read', solve('previewing', [('mark-read', N)], N), 'read-pending')
check('read-pending / receipt-accepted', solve('read-pending', [('receipt-accepted', N)], N), 'read-confirmed')
check('read-pending / receipt-rejected', solve('read-pending', [('receipt-rejected', N)], N), 'read-error')
check('read-error / retry-receipt', solve('read-error', [('retry-receipt', N)], N), 'read-pending')
check('read-confirmed / mark-unread', solve('read-confirmed', [('mark-unread', N)], N), 'unread-pending')
check('unread-pending / unread-accepted', solve('unread-pending', [('unread-accepted', N)], N), 'unread')
check('unread-pending / unread-rejected', solve('unread-pending', [('unread-rejected', N)], N), 'unread-error')
check('unread-error / dismiss-error', solve('unread-error', [('dismiss-error', N)], N), 'read-confirmed')
check('older notification incarnation', solve('unread', [('open-preview', N - 1)], N), 'unread')
check('future notification incarnation', solve('unread', [('open-preview', N + 1)], N), 'unread')
check('unknown event is inert', solve('unread', [('unknown-event', N)], N), 'unread')
check('empty delivery batch', solve('unread', [], N), 'unread')
check('N stale deliveries before current delivery', solve('unread', [('open-preview', N - 1)] * N + [('open-preview', N)], N), 'previewing')
check('trace open-preview then close-preview', solve('unread', [('open-preview', N), ('close-preview', N)], N), 'unread')
check('trace open-preview then mark-read', solve('unread', [('open-preview', N), ('mark-read', N)], N), 'read-pending')
check('trace close-preview then open-preview', solve('previewing', [('close-preview', N), ('open-preview', N)], N), 'previewing')
check('trace mark-read then receipt-accepted', solve('previewing', [('mark-read', N), ('receipt-accepted', N)], N), 'read-confirmed')
check('trace mark-read then receipt-rejected', solve('previewing', [('mark-read', N), ('receipt-rejected', N)], N), 'read-error')
check('trace receipt-accepted then mark-unread', solve('read-pending', [('receipt-accepted', N), ('mark-unread', N)], N), 'unread-pending')
check('trace receipt-rejected then retry-receipt', solve('read-pending', [('receipt-rejected', N), ('retry-receipt', N)], N), 'read-pending')
check('trace retry-receipt then receipt-accepted', solve('read-error', [('retry-receipt', N), ('receipt-accepted', N)], N), 'read-confirmed')
check('trace retry-receipt then receipt-rejected', solve('read-error', [('retry-receipt', N), ('receipt-rejected', N)], N), 'read-error')
check('trace mark-unread then unread-accepted', solve('read-confirmed', [('mark-unread', N), ('unread-accepted', N)], N), 'unread')
check('trace mark-unread then unread-rejected', solve('read-confirmed', [('mark-unread', N), ('unread-rejected', N)], N), 'unread-error')
check('trace unread-accepted then open-preview', solve('unread-pending', [('unread-accepted', N), ('open-preview', N)], N), 'previewing')
check('trace unread-rejected then dismiss-error', solve('unread-pending', [('unread-rejected', N), ('dismiss-error', N)], N), 'read-confirmed')
check('trace dismiss-error then mark-unread', solve('unread-error', [('dismiss-error', N), ('mark-unread', N)], N), 'unread-pending')
check('domain state regression 1: ack_revision', solve('read-pending', [('receipt-accepted', N, {'revision': 1})], N, {}, 'ack_revision'), {'phase': 'read-pending', 'value': 0})
check('domain state regression 2: ack_revision', solve('read-pending', [('receipt-accepted', N, {'revision': 2})], N, {}, 'ack_revision'), {'phase': 'read-confirmed', 'value': 2})
check('domain state regression 3: unread_ids', solve('read-pending', [('receipt-accepted', N, {})], N, {}, 'unread_ids'), {'phase': 'read-confirmed', 'value': ['other']})
check('domain state regression 4: unread_ids', solve('unread-pending', [('unread-accepted', N, {})], N, {'unread_ids': ['other']}, 'unread_ids'), {'phase': 'unread', 'value': ['other', 'n']})
check('domain state regression 5: unread_ids', solve('unread', [('open-preview', N, {})], N, {}, 'unread_ids'), {'phase': 'previewing', 'value': ['n', 'other']})
check('domain state regression 6: unread_ids', solve('unread-pending', [('unread-accepted', N, {'revision': 1})], N, {'unread_ids': ['other']}, 'unread_ids'), {'phase': 'unread-pending', 'value': ['other']})
check('domain state regression 7: unread_ids', solve('unread', [('open-preview', N, {}), ('mark-read', N, {}), ('receipt-accepted', N, {'revision': 1}), ('receipt-accepted', N, {'revision': 2})], N, {}, 'unread_ids'), {'phase': 'read-confirmed', '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 fixtureActualExpectedOutcome
unread / open-previewpreviewingpreviewingPassed
previewing / close-previewunreadunreadPassed
previewing / mark-readread-pendingread-pendingPassed
read-pending / receipt-acceptedread-confirmedread-confirmedPassed
read-pending / receipt-rejectedread-errorread-errorPassed
read-error / retry-receiptread-confirmedread-pendingFailed
read-confirmed / mark-unreadunread-pendingunread-pendingPassed
unread-pending / unread-acceptedunreadunreadPassed
unread-pending / unread-rejectedunread-errorunread-errorPassed
unread-error / dismiss-errorread-confirmedread-confirmedPassed
older notification incarnationunreadunreadPassed
future notification incarnationunreadunreadPassed
unknown event is inertunreadunreadPassed
empty delivery batchunreadunreadPassed
N stale deliveries before current deliverypreviewingpreviewingPassed
trace open-preview then close-previewunreadunreadPassed
trace open-preview then mark-readread-pendingread-pendingPassed
trace close-preview then open-previewpreviewingpreviewingPassed
trace mark-read then receipt-acceptedread-confirmedread-confirmedPassed
trace mark-read then receipt-rejectedread-errorread-errorPassed
trace receipt-accepted then mark-unreadunread-pendingunread-pendingPassed
trace receipt-rejected then retry-receiptread-confirmedread-pendingFailed
trace retry-receipt then receipt-acceptedread-confirmedread-confirmedPassed
trace retry-receipt then receipt-rejectedread-confirmedread-errorFailed
trace mark-unread then unread-acceptedunreadunreadPassed
trace mark-unread then unread-rejectedunread-errorunread-errorPassed
trace unread-accepted then open-previewpreviewingpreviewingPassed
trace unread-rejected then dismiss-errorread-confirmedread-confirmedPassed
trace dismiss-error then mark-unreadunread-pendingunread-pendingPassed
domain state regression 1: ack_revision{'phase': 'read-pending', 'value': 0}{'phase': 'read-pending', 'value': 0}Passed
domain state regression 2: ack_revision{'phase': 'read-confirmed', 'value': 2}{'phase': 'read-confirmed', 'value': 2}Passed
domain state regression 3: unread_ids{'phase': 'read-confirmed', 'value': ['other']}{'phase': 'read-confirmed', 'value': ['other']}Passed
domain state regression 4: unread_ids{'phase': 'unread', 'value': ['other', 'n']}{'phase': 'unread', 'value': ['other', 'n']}Passed
domain state regression 5: unread_ids{'phase': 'previewing', 'value': ['n', 'other']}{'phase': 'previewing', 'value': ['n', 'other']}Passed
domain state regression 6: unread_ids{'phase': 'unread-pending', 'value': ['other']}{'phase': 'unread-pending', 'value': ['other']}Passed
domain state regression 7: unread_ids{'phase': 'read-confirmed', 'value': ['other']}{'phase': 'read-confirmed', 'value': ['other']}Passed

SHA-256 / 7d6c3f46f9246ccb85e6cf866a3e2b3e044d9cc3af666d66856203d4c916a1b3

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 = {('unread', 'open-preview'): 'previewing', ('previewing', 'close-preview'): 'unread', ('previewing', 'mark-read'): 'read-pending', ('read-pending', 'receipt-accepted'): 'read-confirmed', ('read-pending', 'receipt-rejected'): 'read-error', ('read-error', 'retry-receipt'): 'previewing', ('read-confirmed', 'mark-unread'): 'unread-pending', ('unread-pending', 'unread-accepted'): 'unread', ('unread-pending', 'unread-rejected'): 'unread-error', ('unread-error', 'dismiss-error'): 'read-confirmed'}
    data = json.loads(json.dumps({'revision': 2, 'ack_revision': 0, 'unread_ids': ['n', 'other'], 'item': 'n'})) if payload is None else {**json.loads(json.dumps({'revision': 2, 'ack_revision': 0, 'unread_ids': ['n', 'other'], 'item': 'n'})), **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 in ('receipt-accepted','receipt-rejected','unread-accepted','unread-rejected') and arg.get('revision',data['revision']) != data['revision']: event = 'unknown-event'
            state = table.get((state, event), state)
            if state == 'read-confirmed':
                data['ack_revision'] = data['revision']
                data['unread_ids'] = [x for x in data['unread_ids'] if x != data['item']]
            if state == 'unread' and data['item'] not in data['unread_ids']: data['unread_ids'].append(data['item'])
    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('unread / open-preview', solve('unread', [('open-preview', N)], N), 'previewing')
check('previewing / close-preview', solve('previewing', [('close-preview', N)], N), 'unread')
check('previewing / mark-read', solve('previewing', [('mark-read', N)], N), 'read-pending')
check('read-pending / receipt-accepted', solve('read-pending', [('receipt-accepted', N)], N), 'read-confirmed')
check('read-pending / receipt-rejected', solve('read-pending', [('receipt-rejected', N)], N), 'read-error')
check('read-error / retry-receipt', solve('read-error', [('retry-receipt', N)], N), 'read-pending')
check('read-confirmed / mark-unread', solve('read-confirmed', [('mark-unread', N)], N), 'unread-pending')
check('unread-pending / unread-accepted', solve('unread-pending', [('unread-accepted', N)], N), 'unread')
check('unread-pending / unread-rejected', solve('unread-pending', [('unread-rejected', N)], N), 'unread-error')
check('unread-error / dismiss-error', solve('unread-error', [('dismiss-error', N)], N), 'read-confirmed')
check('older notification incarnation', solve('unread', [('open-preview', N - 1)], N), 'unread')
check('future notification incarnation', solve('unread', [('open-preview', N + 1)], N), 'unread')
check('unknown event is inert', solve('unread', [('unknown-event', N)], N), 'unread')
check('empty delivery batch', solve('unread', [], N), 'unread')
check('N stale deliveries before current delivery', solve('unread', [('open-preview', N - 1)] * N + [('open-preview', N)], N), 'previewing')
check('trace open-preview then close-preview', solve('unread', [('open-preview', N), ('close-preview', N)], N), 'unread')
check('trace open-preview then mark-read', solve('unread', [('open-preview', N), ('mark-read', N)], N), 'read-pending')
check('trace close-preview then open-preview', solve('previewing', [('close-preview', N), ('open-preview', N)], N), 'previewing')
check('trace mark-read then receipt-accepted', solve('previewing', [('mark-read', N), ('receipt-accepted', N)], N), 'read-confirmed')
check('trace mark-read then receipt-rejected', solve('previewing', [('mark-read', N), ('receipt-rejected', N)], N), 'read-error')
check('trace receipt-accepted then mark-unread', solve('read-pending', [('receipt-accepted', N), ('mark-unread', N)], N), 'unread-pending')
check('trace receipt-rejected then retry-receipt', solve('read-pending', [('receipt-rejected', N), ('retry-receipt', N)], N), 'read-pending')
check('trace retry-receipt then receipt-accepted', solve('read-error', [('retry-receipt', N), ('receipt-accepted', N)], N), 'read-confirmed')
check('trace retry-receipt then receipt-rejected', solve('read-error', [('retry-receipt', N), ('receipt-rejected', N)], N), 'read-error')
check('trace mark-unread then unread-accepted', solve('read-confirmed', [('mark-unread', N), ('unread-accepted', N)], N), 'unread')
check('trace mark-unread then unread-rejected', solve('read-confirmed', [('mark-unread', N), ('unread-rejected', N)], N), 'unread-error')
check('trace unread-accepted then open-preview', solve('unread-pending', [('unread-accepted', N), ('open-preview', N)], N), 'previewing')
check('trace unread-rejected then dismiss-error', solve('unread-pending', [('unread-rejected', N), ('dismiss-error', N)], N), 'read-confirmed')
check('trace dismiss-error then mark-unread', solve('unread-error', [('dismiss-error', N), ('mark-unread', N)], N), 'unread-pending')
check('domain state regression 1: ack_revision', solve('read-pending', [('receipt-accepted', N, {'revision': 1})], N, {}, 'ack_revision'), {'phase': 'read-pending', 'value': 0})
check('domain state regression 2: ack_revision', solve('read-pending', [('receipt-accepted', N, {'revision': 2})], N, {}, 'ack_revision'), {'phase': 'read-confirmed', 'value': 2})
check('domain state regression 3: unread_ids', solve('read-pending', [('receipt-accepted', N, {})], N, {}, 'unread_ids'), {'phase': 'read-confirmed', 'value': ['other']})
check('domain state regression 4: unread_ids', solve('unread-pending', [('unread-accepted', N, {})], N, {'unread_ids': ['other']}, 'unread_ids'), {'phase': 'unread', 'value': ['other', 'n']})
check('domain state regression 5: unread_ids', solve('unread', [('open-preview', N, {})], N, {}, 'unread_ids'), {'phase': 'previewing', 'value': ['n', 'other']})
check('domain state regression 6: unread_ids', solve('unread-pending', [('unread-accepted', N, {'revision': 1})], N, {'unread_ids': ['other']}, 'unread_ids'), {'phase': 'unread-pending', 'value': ['other']})
check('domain state regression 7: unread_ids', solve('unread', [('open-preview', N, {}), ('mark-read', N, {}), ('receipt-accepted', N, {'revision': 1}), ('receipt-accepted', N, {'revision': 2})], N, {}, 'unread_ids'), {'phase': 'read-confirmed', '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 fixtureActualExpectedOutcome
unread / open-previewpreviewingpreviewingPassed
previewing / close-previewunreadunreadPassed
previewing / mark-readread-pendingread-pendingPassed
read-pending / receipt-acceptedread-confirmedread-confirmedPassed
read-pending / receipt-rejectedread-errorread-errorPassed
read-error / retry-receiptpreviewingread-pendingFailed
read-confirmed / mark-unreadunread-pendingunread-pendingPassed
unread-pending / unread-acceptedunreadunreadPassed
unread-pending / unread-rejectedunread-errorunread-errorPassed
unread-error / dismiss-errorread-confirmedread-confirmedPassed
older notification incarnationunreadunreadPassed
future notification incarnationunreadunreadPassed
unknown event is inertunreadunreadPassed
empty delivery batchunreadunreadPassed
N stale deliveries before current deliverypreviewingpreviewingPassed
trace open-preview then close-previewunreadunreadPassed
trace open-preview then mark-readread-pendingread-pendingPassed
trace close-preview then open-previewpreviewingpreviewingPassed
trace mark-read then receipt-acceptedread-confirmedread-confirmedPassed
trace mark-read then receipt-rejectedread-errorread-errorPassed
trace receipt-accepted then mark-unreadunread-pendingunread-pendingPassed
trace receipt-rejected then retry-receiptpreviewingread-pendingFailed
trace retry-receipt then receipt-acceptedpreviewingread-confirmedFailed
trace retry-receipt then receipt-rejectedpreviewingread-errorFailed
trace mark-unread then unread-acceptedunreadunreadPassed
trace mark-unread then unread-rejectedunread-errorunread-errorPassed
trace unread-accepted then open-previewpreviewingpreviewingPassed
trace unread-rejected then dismiss-errorread-confirmedread-confirmedPassed
trace dismiss-error then mark-unreadunread-pendingunread-pendingPassed
domain state regression 1: ack_revision{'phase': 'read-pending', 'value': 0}{'phase': 'read-pending', 'value': 0}Passed
domain state regression 2: ack_revision{'phase': 'read-confirmed', 'value': 2}{'phase': 'read-confirmed', 'value': 2}Passed
domain state regression 3: unread_ids{'phase': 'read-confirmed', 'value': ['other']}{'phase': 'read-confirmed', 'value': ['other']}Passed
domain state regression 4: unread_ids{'phase': 'unread', 'value': ['other', 'n']}{'phase': 'unread', 'value': ['other', 'n']}Passed
domain state regression 5: unread_ids{'phase': 'previewing', 'value': ['n', 'other']}{'phase': 'previewing', 'value': ['n', 'other']}Passed
domain state regression 6: unread_ids{'phase': 'unread-pending', 'value': ['other']}{'phase': 'unread-pending', 'value': ['other']}Passed
domain state regression 7: unread_ids{'phase': 'read-confirmed', 'value': ['other']}{'phase': 'read-confirmed', 'value': ['other']}Passed

SHA-256 / acd328d42d9155c74aa327ff5ecbf8d0fc49808feecf9c80ef7169d4a9fd7efd

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 36 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:28.010820+00:00.

Case digest / 4c321e0d77cbe16159d4f87bf6d04041cd2040150e01fdc5afe49c7d505f0e83