FA-34576 / Notification interfaces / Open access
Notification inbox initial restoration: fresh-empty from fetching · case 01
The fresh-empty event leaves a notification in ready instead of empty.
ROOT CAUSE
Initial empty fetch pretends a populated inbox exists.
THE FAILURE
Initial empty fetch pretends a populated inbox exists.
Unsuccessful approach: Leaving the spinner running hides authoritative emptiness.
Case contract
Notification inbox initial restoration is a bounded visual-notification workflow with mutable policy state {'rows': ['cached'], 'version': 3, 'warning': False}. Its default transition relation is {('placeholder', 'cache-found'): 'cached-unverified', ('placeholder', 'cache-missing'): 'fetching', ('cached-unverified', 'refresh-start'): 'refreshing-cache', ('refreshing-cache', 'fresh-nonempty'): 'ready', ('refreshing-cache', 'fresh-empty'): 'empty', ('refreshing-cache', 'refresh-error'): 'stale-warning', ('fetching', 'fresh-nonempty'): 'ready', ('fetching', 'fresh-empty'): 'empty', ('fetching', 'refresh-error'): 'load-error', ('stale-warning', 'retry-refresh'): 'refreshing-cache'}; 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 = {('placeholder', 'cache-found'): 'cached-unverified', ('placeholder', 'cache-missing'): 'fetching', ('cached-unverified', 'refresh-start'): 'refreshing-cache', ('refreshing-cache', 'fresh-nonempty'): 'ready', ('refreshing-cache', 'fresh-empty'): 'empty', ('refreshing-cache', 'refresh-error'): 'stale-warning', ('fetching', 'fresh-nonempty'): 'ready', ('fetching', 'fresh-empty'): 'ready', ('fetching', 'refresh-error'): 'load-error', ('stale-warning', 'retry-refresh'): 'refreshing-cache'}
data = json.loads(json.dumps({'rows': ['cached'], 'version': 3, 'warning': False})) if payload is None else {**json.loads(json.dumps({'rows': ['cached'], 'version': 3, 'warning': False})), **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 ('fresh-nonempty','fresh-empty'):
if arg.get('version',data['version']) < data['version']: event = 'unknown-event'
else:
data['version'] = arg.get('version',data['version'])
data['rows'] = arg.get('rows',[] if event == 'fresh-empty' else ['fresh'])[:]
if event == 'cache-found' and 'rows' in arg: data['rows'] = arg['rows'][:]
state = table.get((state, event), state)
if state == 'stale-warning': data['warning'] = True
if state in ('ready','empty'): data['warning'] = False
if state == 'empty': data['rows'] = []
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('placeholder / cache-found', solve('placeholder', [('cache-found', N)], N), 'cached-unverified')
check('placeholder / cache-missing', solve('placeholder', [('cache-missing', N)], N), 'fetching')
check('cached-unverified / refresh-start', solve('cached-unverified', [('refresh-start', N)], N), 'refreshing-cache')
check('refreshing-cache / fresh-nonempty', solve('refreshing-cache', [('fresh-nonempty', N)], N), 'ready')
check('refreshing-cache / fresh-empty', solve('refreshing-cache', [('fresh-empty', N)], N), 'empty')
check('refreshing-cache / refresh-error', solve('refreshing-cache', [('refresh-error', N)], N), 'stale-warning')
check('fetching / fresh-nonempty', solve('fetching', [('fresh-nonempty', N)], N), 'ready')
check('fetching / fresh-empty', solve('fetching', [('fresh-empty', N)], N), 'empty')
check('fetching / refresh-error', solve('fetching', [('refresh-error', N)], N), 'load-error')
check('stale-warning / retry-refresh', solve('stale-warning', [('retry-refresh', N)], N), 'refreshing-cache')
check('older notification incarnation', solve('placeholder', [('cache-found', N - 1)], N), 'placeholder')
check('future notification incarnation', solve('placeholder', [('cache-found', N + 1)], N), 'placeholder')
check('unknown event is inert', solve('placeholder', [('unknown-event', N)], N), 'placeholder')
check('empty delivery batch', solve('placeholder', [], N), 'placeholder')
check('N stale deliveries before current delivery', solve('placeholder', [('cache-found', N - 1)] * N + [('cache-found', N)], N), 'cached-unverified')
check('trace cache-found then refresh-start', solve('placeholder', [('cache-found', N), ('refresh-start', N)], N), 'refreshing-cache')
check('trace cache-missing then fresh-nonempty', solve('placeholder', [('cache-missing', N), ('fresh-nonempty', N)], N), 'ready')
check('trace cache-missing then fresh-empty', solve('placeholder', [('cache-missing', N), ('fresh-empty', N)], N), 'empty')
check('trace cache-missing then refresh-error', solve('placeholder', [('cache-missing', N), ('refresh-error', N)], N), 'load-error')
check('trace refresh-start then fresh-nonempty', solve('cached-unverified', [('refresh-start', N), ('fresh-nonempty', N)], N), 'ready')
check('trace refresh-start then fresh-empty', solve('cached-unverified', [('refresh-start', N), ('fresh-empty', N)], N), 'empty')
check('trace refresh-start then refresh-error', solve('cached-unverified', [('refresh-start', N), ('refresh-error', N)], N), 'stale-warning')
check('trace refresh-error then retry-refresh', solve('refreshing-cache', [('refresh-error', N), ('retry-refresh', N)], N), 'refreshing-cache')
check('trace retry-refresh then fresh-nonempty', solve('stale-warning', [('retry-refresh', N), ('fresh-nonempty', N)], N), 'ready')
check('trace retry-refresh then fresh-empty', solve('stale-warning', [('retry-refresh', N), ('fresh-empty', N)], N), 'empty')
check('trace retry-refresh then refresh-error', solve('stale-warning', [('retry-refresh', N), ('refresh-error', N)], N), 'stale-warning')
check('domain state regression 1: rows', solve('refreshing-cache', [('fresh-nonempty', N, {'version': 2, 'rows': ['old']})], N, {}, 'rows'), {'phase': 'refreshing-cache', 'value': ['cached']})
check('domain state regression 2: rows', solve('refreshing-cache', [('fresh-nonempty', N, {'version': 4, 'rows': ['new']})], N, {}, 'rows'), {'phase': 'ready', 'value': ['new']})
check('domain state regression 3: rows', solve('refreshing-cache', [('refresh-error', N, {})], N, {}, 'rows'), {'phase': 'stale-warning', 'value': ['cached']})
check('domain state regression 4: warning', solve('refreshing-cache', [('refresh-error', N, {})], N, {}, 'warning'), {'phase': 'stale-warning', 'value': True})
check('domain state regression 5: rows', solve('refreshing-cache', [('fresh-empty', N, {})], N, {}, 'rows'), {'phase': 'empty', 'value': []})
check('domain state regression 6: rows', solve('placeholder', [('cache-found', N, {'rows': ['a', 'b']})], N, {}, 'rows'), {'phase': 'cached-unverified', 'value': ['a', 'b']})
check('domain state regression 7: rows', solve('placeholder', [('cache-found', N, {'rows': ['saved']}), ('refresh-start', N, {}), ('refresh-error', N, {})], N, {}, 'rows'), {'phase': 'stale-warning', 'value': ['saved']})
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 |
|---|---|---|---|
| placeholder / cache-found | cached-unverified | cached-unverified | Passed |
| placeholder / cache-missing | fetching | fetching | Passed |
| cached-unverified / refresh-start | refreshing-cache | refreshing-cache | Passed |
| refreshing-cache / fresh-nonempty | ready | ready | Passed |
| refreshing-cache / fresh-empty | empty | empty | Passed |
| refreshing-cache / refresh-error | stale-warning | stale-warning | Passed |
| fetching / fresh-nonempty | ready | ready | Passed |
| fetching / fresh-empty | ready | empty | Failed |
| fetching / refresh-error | load-error | load-error | Passed |
| stale-warning / retry-refresh | refreshing-cache | refreshing-cache | Passed |
| older notification incarnation | placeholder | placeholder | Passed |
| future notification incarnation | placeholder | placeholder | Passed |
| unknown event is inert | placeholder | placeholder | Passed |
| empty delivery batch | placeholder | placeholder | Passed |
| N stale deliveries before current delivery | cached-unverified | cached-unverified | Passed |
| trace cache-found then refresh-start | refreshing-cache | refreshing-cache | Passed |
| trace cache-missing then fresh-nonempty | ready | ready | Passed |
| trace cache-missing then fresh-empty | ready | empty | Failed |
| trace cache-missing then refresh-error | load-error | load-error | Passed |
| trace refresh-start then fresh-nonempty | ready | ready | Passed |
| trace refresh-start then fresh-empty | empty | empty | Passed |
| trace refresh-start then refresh-error | stale-warning | stale-warning | Passed |
| trace refresh-error then retry-refresh | refreshing-cache | refreshing-cache | Passed |
| trace retry-refresh then fresh-nonempty | ready | ready | Passed |
| trace retry-refresh then fresh-empty | empty | empty | Passed |
| trace retry-refresh then refresh-error | stale-warning | stale-warning | Passed |
| domain state regression 1: rows | {'phase': 'refreshing-cache', 'value': ['cached']} | {'phase': 'refreshing-cache', 'value': ['cached']} | Passed |
| domain state regression 2: rows | {'phase': 'ready', 'value': ['new']} | {'phase': 'ready', 'value': ['new']} | Passed |
| domain state regression 3: rows | {'phase': 'stale-warning', 'value': ['cached']} | {'phase': 'stale-warning', 'value': ['cached']} | Passed |
| domain state regression 4: warning | {'phase': 'stale-warning', 'value': True} | {'phase': 'stale-warning', 'value': True} | Passed |
| domain state regression 5: rows | {'phase': 'empty', 'value': []} | {'phase': 'empty', 'value': []} | Passed |
| domain state regression 6: rows | {'phase': 'cached-unverified', 'value': ['a', 'b']} | {'phase': 'cached-unverified', 'value': ['a', 'b']} | Passed |
| domain state regression 7: rows | {'phase': 'stale-warning', 'value': ['saved']} | {'phase': 'stale-warning', 'value': ['saved']} | Passed |
SHA-256 / e9409050aa63bbb508805749008882b1efbd592f46918a5de1f1357ba502c439
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 = {('placeholder', 'cache-found'): 'cached-unverified', ('placeholder', 'cache-missing'): 'fetching', ('cached-unverified', 'refresh-start'): 'refreshing-cache', ('refreshing-cache', 'fresh-nonempty'): 'ready', ('refreshing-cache', 'fresh-empty'): 'empty', ('refreshing-cache', 'refresh-error'): 'stale-warning', ('fetching', 'fresh-nonempty'): 'ready', ('fetching', 'fresh-empty'): 'fetching', ('fetching', 'refresh-error'): 'load-error', ('stale-warning', 'retry-refresh'): 'refreshing-cache'}
data = json.loads(json.dumps({'rows': ['cached'], 'version': 3, 'warning': False})) if payload is None else {**json.loads(json.dumps({'rows': ['cached'], 'version': 3, 'warning': False})), **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 ('fresh-nonempty','fresh-empty'):
if arg.get('version',data['version']) < data['version']: event = 'unknown-event'
else:
data['version'] = arg.get('version',data['version'])
data['rows'] = arg.get('rows',[] if event == 'fresh-empty' else ['fresh'])[:]
if event == 'cache-found' and 'rows' in arg: data['rows'] = arg['rows'][:]
state = table.get((state, event), state)
if state == 'stale-warning': data['warning'] = True
if state in ('ready','empty'): data['warning'] = False
if state == 'empty': data['rows'] = []
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('placeholder / cache-found', solve('placeholder', [('cache-found', N)], N), 'cached-unverified')
check('placeholder / cache-missing', solve('placeholder', [('cache-missing', N)], N), 'fetching')
check('cached-unverified / refresh-start', solve('cached-unverified', [('refresh-start', N)], N), 'refreshing-cache')
check('refreshing-cache / fresh-nonempty', solve('refreshing-cache', [('fresh-nonempty', N)], N), 'ready')
check('refreshing-cache / fresh-empty', solve('refreshing-cache', [('fresh-empty', N)], N), 'empty')
check('refreshing-cache / refresh-error', solve('refreshing-cache', [('refresh-error', N)], N), 'stale-warning')
check('fetching / fresh-nonempty', solve('fetching', [('fresh-nonempty', N)], N), 'ready')
check('fetching / fresh-empty', solve('fetching', [('fresh-empty', N)], N), 'empty')
check('fetching / refresh-error', solve('fetching', [('refresh-error', N)], N), 'load-error')
check('stale-warning / retry-refresh', solve('stale-warning', [('retry-refresh', N)], N), 'refreshing-cache')
check('older notification incarnation', solve('placeholder', [('cache-found', N - 1)], N), 'placeholder')
check('future notification incarnation', solve('placeholder', [('cache-found', N + 1)], N), 'placeholder')
check('unknown event is inert', solve('placeholder', [('unknown-event', N)], N), 'placeholder')
check('empty delivery batch', solve('placeholder', [], N), 'placeholder')
check('N stale deliveries before current delivery', solve('placeholder', [('cache-found', N - 1)] * N + [('cache-found', N)], N), 'cached-unverified')
check('trace cache-found then refresh-start', solve('placeholder', [('cache-found', N), ('refresh-start', N)], N), 'refreshing-cache')
check('trace cache-missing then fresh-nonempty', solve('placeholder', [('cache-missing', N), ('fresh-nonempty', N)], N), 'ready')
check('trace cache-missing then fresh-empty', solve('placeholder', [('cache-missing', N), ('fresh-empty', N)], N), 'empty')
check('trace cache-missing then refresh-error', solve('placeholder', [('cache-missing', N), ('refresh-error', N)], N), 'load-error')
check('trace refresh-start then fresh-nonempty', solve('cached-unverified', [('refresh-start', N), ('fresh-nonempty', N)], N), 'ready')
check('trace refresh-start then fresh-empty', solve('cached-unverified', [('refresh-start', N), ('fresh-empty', N)], N), 'empty')
check('trace refresh-start then refresh-error', solve('cached-unverified', [('refresh-start', N), ('refresh-error', N)], N), 'stale-warning')
check('trace refresh-error then retry-refresh', solve('refreshing-cache', [('refresh-error', N), ('retry-refresh', N)], N), 'refreshing-cache')
check('trace retry-refresh then fresh-nonempty', solve('stale-warning', [('retry-refresh', N), ('fresh-nonempty', N)], N), 'ready')
check('trace retry-refresh then fresh-empty', solve('stale-warning', [('retry-refresh', N), ('fresh-empty', N)], N), 'empty')
check('trace retry-refresh then refresh-error', solve('stale-warning', [('retry-refresh', N), ('refresh-error', N)], N), 'stale-warning')
check('domain state regression 1: rows', solve('refreshing-cache', [('fresh-nonempty', N, {'version': 2, 'rows': ['old']})], N, {}, 'rows'), {'phase': 'refreshing-cache', 'value': ['cached']})
check('domain state regression 2: rows', solve('refreshing-cache', [('fresh-nonempty', N, {'version': 4, 'rows': ['new']})], N, {}, 'rows'), {'phase': 'ready', 'value': ['new']})
check('domain state regression 3: rows', solve('refreshing-cache', [('refresh-error', N, {})], N, {}, 'rows'), {'phase': 'stale-warning', 'value': ['cached']})
check('domain state regression 4: warning', solve('refreshing-cache', [('refresh-error', N, {})], N, {}, 'warning'), {'phase': 'stale-warning', 'value': True})
check('domain state regression 5: rows', solve('refreshing-cache', [('fresh-empty', N, {})], N, {}, 'rows'), {'phase': 'empty', 'value': []})
check('domain state regression 6: rows', solve('placeholder', [('cache-found', N, {'rows': ['a', 'b']})], N, {}, 'rows'), {'phase': 'cached-unverified', 'value': ['a', 'b']})
check('domain state regression 7: rows', solve('placeholder', [('cache-found', N, {'rows': ['saved']}), ('refresh-start', N, {}), ('refresh-error', N, {})], N, {}, 'rows'), {'phase': 'stale-warning', 'value': ['saved']})
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 |
|---|---|---|---|
| placeholder / cache-found | cached-unverified | cached-unverified | Passed |
| placeholder / cache-missing | fetching | fetching | Passed |
| cached-unverified / refresh-start | refreshing-cache | refreshing-cache | Passed |
| refreshing-cache / fresh-nonempty | ready | ready | Passed |
| refreshing-cache / fresh-empty | empty | empty | Passed |
| refreshing-cache / refresh-error | stale-warning | stale-warning | Passed |
| fetching / fresh-nonempty | ready | ready | Passed |
| fetching / fresh-empty | fetching | empty | Failed |
| fetching / refresh-error | load-error | load-error | Passed |
| stale-warning / retry-refresh | refreshing-cache | refreshing-cache | Passed |
| older notification incarnation | placeholder | placeholder | Passed |
| future notification incarnation | placeholder | placeholder | Passed |
| unknown event is inert | placeholder | placeholder | Passed |
| empty delivery batch | placeholder | placeholder | Passed |
| N stale deliveries before current delivery | cached-unverified | cached-unverified | Passed |
| trace cache-found then refresh-start | refreshing-cache | refreshing-cache | Passed |
| trace cache-missing then fresh-nonempty | ready | ready | Passed |
| trace cache-missing then fresh-empty | fetching | empty | Failed |
| trace cache-missing then refresh-error | load-error | load-error | Passed |
| trace refresh-start then fresh-nonempty | ready | ready | Passed |
| trace refresh-start then fresh-empty | empty | empty | Passed |
| trace refresh-start then refresh-error | stale-warning | stale-warning | Passed |
| trace refresh-error then retry-refresh | refreshing-cache | refreshing-cache | Passed |
| trace retry-refresh then fresh-nonempty | ready | ready | Passed |
| trace retry-refresh then fresh-empty | empty | empty | Passed |
| trace retry-refresh then refresh-error | stale-warning | stale-warning | Passed |
| domain state regression 1: rows | {'phase': 'refreshing-cache', 'value': ['cached']} | {'phase': 'refreshing-cache', 'value': ['cached']} | Passed |
| domain state regression 2: rows | {'phase': 'ready', 'value': ['new']} | {'phase': 'ready', 'value': ['new']} | Passed |
| domain state regression 3: rows | {'phase': 'stale-warning', 'value': ['cached']} | {'phase': 'stale-warning', 'value': ['cached']} | Passed |
| domain state regression 4: warning | {'phase': 'stale-warning', 'value': True} | {'phase': 'stale-warning', 'value': True} | Passed |
| domain state regression 5: rows | {'phase': 'empty', 'value': []} | {'phase': 'empty', 'value': []} | Passed |
| domain state regression 6: rows | {'phase': 'cached-unverified', 'value': ['a', 'b']} | {'phase': 'cached-unverified', 'value': ['a', 'b']} | Passed |
| domain state regression 7: rows | {'phase': 'stale-warning', 'value': ['saved']} | {'phase': 'stale-warning', 'value': ['saved']} | Passed |
SHA-256 / bb46b8699f70f37b4914564b9ff41a9321f4c9bcc5c6c5fa908939703bab839b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 33 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:33.350916+00:00.
Case digest / ee39d2634cfd5d455393e9a4d84ec6dd9b555c772b9ab730a58c3d8e3748a23b