FAILURE MAP
← Case archive

FA-34036 / Notification interfaces / Open access

Inbox read receipt rendering: dismiss-error from unread-error · case 01

The dismiss-error event leaves a notification in unread instead of read-confirmed.

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

ROOT CAUSE

Dismissing the failed-unread error retains unsupported unread styling.

VERIFIED REPAIR

Commit the unread-error / dismiss-error transition to read-confirmed; preserve the other explicitly stipulated transitions.

Unsuccessful approach: Retrying implicitly on dismissal repeats an unwanted mutation.

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-pending', ('read-confirmed', 'mark-unread'): 'unread-pending', ('unread-pending', 'unread-accepted'): 'unread', ('unread-pending', 'unread-rejected'): 'unread-error', ('unread-error', 'dismiss-error'): 'unread'}
    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-pendingread-pendingPassed
read-confirmed / mark-unreadunread-pendingunread-pendingPassed
unread-pending / unread-acceptedunreadunreadPassed
unread-pending / unread-rejectedunread-errorunread-errorPassed
unread-error / dismiss-errorunreadread-confirmedFailed
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-pendingread-pendingPassed
trace retry-receipt then receipt-acceptedread-confirmedread-confirmedPassed
trace retry-receipt then receipt-rejectedread-errorread-errorPassed
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-errorunreadread-confirmedFailed
trace dismiss-error then mark-unreadunreadunread-pendingFailed
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 / 5e4ecbb706e278b0edd7847af144439bc0d0c8228c7d3ec1f889994e89b8cb5f

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'): 'read-pending', ('read-confirmed', 'mark-unread'): 'unread-pending', ('unread-pending', 'unread-accepted'): 'unread', ('unread-pending', 'unread-rejected'): 'unread-error', ('unread-error', 'dismiss-error'): 'unread-pending'}
    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-pendingread-pendingPassed
read-confirmed / mark-unreadunread-pendingunread-pendingPassed
unread-pending / unread-acceptedunreadunreadPassed
unread-pending / unread-rejectedunread-errorunread-errorPassed
unread-error / dismiss-errorunread-pendingread-confirmedFailed
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-pendingread-pendingPassed
trace retry-receipt then receipt-acceptedread-confirmedread-confirmedPassed
trace retry-receipt then receipt-rejectedread-errorread-errorPassed
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-errorunread-pendingread-confirmedFailed
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 / eabee589fe668cdca19bbd8c309f72d16a220358856546cab4929aeb03dad318

3 / The verified repair

Exit 0
"""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-pending', ('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-pendingread-pendingPassed
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-pendingread-pendingPassed
trace retry-receipt then receipt-acceptedread-confirmedread-confirmedPassed
trace retry-receipt then receipt-rejectedread-errorread-errorPassed
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 / 55e328c99f3505b0a0ecfb1ba6fb0e4e271776b7e8cb575d6e869e36cd87fe19

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 / f8c6eb8b6be4aa9028bc6b150ff0eb08457672cafa47e9c64668c451b62bb075