FA-34026 / Notification interfaces / Open access
Inbox read receipt rendering: unread-accepted from unread-pending · case 01
The unread-accepted event leaves a notification in read-confirmed instead of unread.
ROOT CAUSE
Confirmed unread is overwritten by the prior read appearance.
VERIFIED REPAIR
Commit the unread-pending / unread-accepted transition to unread; preserve the other explicitly stipulated transitions.
Unsuccessful approach: Presenting success as an error obscures the changed badge.
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'): 'read-confirmed', ('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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unread / open-preview | previewing | previewing | Passed |
| previewing / close-preview | unread | unread | Passed |
| previewing / mark-read | read-pending | read-pending | Passed |
| read-pending / receipt-accepted | read-confirmed | read-confirmed | Passed |
| read-pending / receipt-rejected | read-error | read-error | Passed |
| read-error / retry-receipt | read-pending | read-pending | Passed |
| read-confirmed / mark-unread | unread-pending | unread-pending | Passed |
| unread-pending / unread-accepted | read-confirmed | unread | Failed |
| unread-pending / unread-rejected | unread-error | unread-error | Passed |
| unread-error / dismiss-error | read-confirmed | read-confirmed | Passed |
| older notification incarnation | unread | unread | Passed |
| future notification incarnation | unread | unread | Passed |
| unknown event is inert | unread | unread | Passed |
| empty delivery batch | unread | unread | Passed |
| N stale deliveries before current delivery | previewing | previewing | Passed |
| trace open-preview then close-preview | unread | unread | Passed |
| trace open-preview then mark-read | read-pending | read-pending | Passed |
| trace close-preview then open-preview | previewing | previewing | Passed |
| trace mark-read then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace mark-read then receipt-rejected | read-error | read-error | Passed |
| trace receipt-accepted then mark-unread | unread-pending | unread-pending | Passed |
| trace receipt-rejected then retry-receipt | read-pending | read-pending | Passed |
| trace retry-receipt then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace retry-receipt then receipt-rejected | read-error | read-error | Passed |
| trace mark-unread then unread-accepted | read-confirmed | unread | Failed |
| trace mark-unread then unread-rejected | unread-error | unread-error | Passed |
| trace unread-accepted then open-preview | read-confirmed | previewing | Failed |
| trace unread-rejected then dismiss-error | read-confirmed | read-confirmed | Passed |
| trace dismiss-error then mark-unread | unread-pending | unread-pending | Passed |
| 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': 'read-confirmed', 'value': ['other']} | {'phase': 'unread', 'value': ['other', 'n']} | Failed |
| 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 / 2387aa377eb32aec17d5f7bb33dce43ff96ed1d07afa05e78feb621e2b9c3ba3
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'): 'read-error', ('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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unread / open-preview | previewing | previewing | Passed |
| previewing / close-preview | unread | unread | Passed |
| previewing / mark-read | read-pending | read-pending | Passed |
| read-pending / receipt-accepted | read-confirmed | read-confirmed | Passed |
| read-pending / receipt-rejected | read-error | read-error | Passed |
| read-error / retry-receipt | read-pending | read-pending | Passed |
| read-confirmed / mark-unread | unread-pending | unread-pending | Passed |
| unread-pending / unread-accepted | read-error | unread | Failed |
| unread-pending / unread-rejected | unread-error | unread-error | Passed |
| unread-error / dismiss-error | read-confirmed | read-confirmed | Passed |
| older notification incarnation | unread | unread | Passed |
| future notification incarnation | unread | unread | Passed |
| unknown event is inert | unread | unread | Passed |
| empty delivery batch | unread | unread | Passed |
| N stale deliveries before current delivery | previewing | previewing | Passed |
| trace open-preview then close-preview | unread | unread | Passed |
| trace open-preview then mark-read | read-pending | read-pending | Passed |
| trace close-preview then open-preview | previewing | previewing | Passed |
| trace mark-read then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace mark-read then receipt-rejected | read-error | read-error | Passed |
| trace receipt-accepted then mark-unread | unread-pending | unread-pending | Passed |
| trace receipt-rejected then retry-receipt | read-pending | read-pending | Passed |
| trace retry-receipt then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace retry-receipt then receipt-rejected | read-error | read-error | Passed |
| trace mark-unread then unread-accepted | read-error | unread | Failed |
| trace mark-unread then unread-rejected | unread-error | unread-error | Passed |
| trace unread-accepted then open-preview | read-error | previewing | Failed |
| trace unread-rejected then dismiss-error | read-confirmed | read-confirmed | Passed |
| trace dismiss-error then mark-unread | unread-pending | unread-pending | Passed |
| 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': 'read-error', 'value': ['other']} | {'phase': 'unread', 'value': ['other', 'n']} | Failed |
| 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 / e505eab4c44368ceca15f196b219a26ba23a892b433c533ddfe0bcf59ceec9a7
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unread / open-preview | previewing | previewing | Passed |
| previewing / close-preview | unread | unread | Passed |
| previewing / mark-read | read-pending | read-pending | Passed |
| read-pending / receipt-accepted | read-confirmed | read-confirmed | Passed |
| read-pending / receipt-rejected | read-error | read-error | Passed |
| read-error / retry-receipt | read-pending | read-pending | Passed |
| read-confirmed / mark-unread | unread-pending | unread-pending | Passed |
| unread-pending / unread-accepted | unread | unread | Passed |
| unread-pending / unread-rejected | unread-error | unread-error | Passed |
| unread-error / dismiss-error | read-confirmed | read-confirmed | Passed |
| older notification incarnation | unread | unread | Passed |
| future notification incarnation | unread | unread | Passed |
| unknown event is inert | unread | unread | Passed |
| empty delivery batch | unread | unread | Passed |
| N stale deliveries before current delivery | previewing | previewing | Passed |
| trace open-preview then close-preview | unread | unread | Passed |
| trace open-preview then mark-read | read-pending | read-pending | Passed |
| trace close-preview then open-preview | previewing | previewing | Passed |
| trace mark-read then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace mark-read then receipt-rejected | read-error | read-error | Passed |
| trace receipt-accepted then mark-unread | unread-pending | unread-pending | Passed |
| trace receipt-rejected then retry-receipt | read-pending | read-pending | Passed |
| trace retry-receipt then receipt-accepted | read-confirmed | read-confirmed | Passed |
| trace retry-receipt then receipt-rejected | read-error | read-error | Passed |
| trace mark-unread then unread-accepted | unread | unread | Passed |
| trace mark-unread then unread-rejected | unread-error | unread-error | Passed |
| trace unread-accepted then open-preview | previewing | previewing | Passed |
| trace unread-rejected then dismiss-error | read-confirmed | read-confirmed | Passed |
| trace dismiss-error then mark-unread | unread-pending | unread-pending | Passed |
| 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:27.884617+00:00.
Case digest / 365808c236a34dcc5a383e0b0d3aa9f4dc4ee90d73dd44fb3f35d32cdc8b8eb6