FAILURE MAP
← Case archive

FA-34091 / Notification interfaces / Open access

Grouped notification interaction: expand from collapsed · case 01

The expand event leaves a notification in loading instead of expanded.

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

ROOT CAUSE

A cached group expansion unnecessarily enters an indefinite load.

THE FAILURE

A cached group expansion unnecessarily enters an indefinite load.

Unsuccessful approach: Ignoring expand prevents inspection of member notifications.

Case contract

Grouped notification interaction is a bounded visual-notification workflow with mutable policy state {'children': ['a', 'b'], 'request': 3, 'wanted_open': False}. Its default transition relation is {('collapsed', 'expand'): 'expanded', ('expanded', 'collapse'): 'collapsed', ('collapsed', 'uncached-expand'): 'loading', ('loading', 'children-arrive'): 'expanded', ('loading', 'children-fail'): 'load-error', ('load-error', 'retry-expand'): 'loading', ('loading', 'collapse-during-load'): 'collapse-pending', ('collapse-pending', 'children-arrive'): 'collapsed', ('expanded', 'last-child-removed'): 'empty', ('empty', 'first-child-added'): 'collapsed'}; 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 = {('collapsed', 'expand'): 'loading', ('expanded', 'collapse'): 'collapsed', ('collapsed', 'uncached-expand'): 'loading', ('loading', 'children-arrive'): 'expanded', ('loading', 'children-fail'): 'load-error', ('load-error', 'retry-expand'): 'loading', ('loading', 'collapse-during-load'): 'collapse-pending', ('collapse-pending', 'children-arrive'): 'collapsed', ('expanded', 'last-child-removed'): 'empty', ('empty', 'first-child-added'): 'collapsed'}
    data = json.loads(json.dumps({'children': ['a', 'b'], 'request': 3, 'wanted_open': False})) if payload is None else {**json.loads(json.dumps({'children': ['a', 'b'], 'request': 3, 'wanted_open': 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 ('children-arrive','children-fail') and arg.get('request',data['request']) != data['request']: event = 'unknown-event'
            if event in ('expand','uncached-expand','retry-expand'): data['wanted_open'] = True
            if event in ('collapse','collapse-during-load'): data['wanted_open'] = False
            if event == 'children-arrive' and 'children' in arg: data['children'] = list(dict.fromkeys(arg['children']))
            if event == 'last-child-removed': data['children'] = []
            if event == 'first-child-added': data['children'] = [arg.get('child','new')]
            state = table.get((state, event), state)
            if state == 'expanded': data['wanted_open'] = True
            if state in ('collapsed','empty'): data['wanted_open'] = False
    return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collapsed / expand', solve('collapsed', [('expand', N)], N), 'expanded')
check('expanded / collapse', solve('expanded', [('collapse', N)], N), 'collapsed')
check('collapsed / uncached-expand', solve('collapsed', [('uncached-expand', N)], N), 'loading')
check('loading / children-arrive', solve('loading', [('children-arrive', N)], N), 'expanded')
check('loading / children-fail', solve('loading', [('children-fail', N)], N), 'load-error')
check('load-error / retry-expand', solve('load-error', [('retry-expand', N)], N), 'loading')
check('loading / collapse-during-load', solve('loading', [('collapse-during-load', N)], N), 'collapse-pending')
check('collapse-pending / children-arrive', solve('collapse-pending', [('children-arrive', N)], N), 'collapsed')
check('expanded / last-child-removed', solve('expanded', [('last-child-removed', N)], N), 'empty')
check('empty / first-child-added', solve('empty', [('first-child-added', N)], N), 'collapsed')
check('older notification incarnation', solve('collapsed', [('expand', N - 1)], N), 'collapsed')
check('future notification incarnation', solve('collapsed', [('expand', N + 1)], N), 'collapsed')
check('unknown event is inert', solve('collapsed', [('unknown-event', N)], N), 'collapsed')
check('empty delivery batch', solve('collapsed', [], N), 'collapsed')
check('N stale deliveries before current delivery', solve('collapsed', [('expand', N - 1)] * N + [('expand', N)], N), 'expanded')
check('trace expand then collapse', solve('collapsed', [('expand', N), ('collapse', N)], N), 'collapsed')
check('trace expand then last-child-removed', solve('collapsed', [('expand', N), ('last-child-removed', N)], N), 'empty')
check('trace collapse then expand', solve('expanded', [('collapse', N), ('expand', N)], N), 'expanded')
check('trace collapse then uncached-expand', solve('expanded', [('collapse', N), ('uncached-expand', N)], N), 'loading')
check('trace uncached-expand then children-arrive', solve('collapsed', [('uncached-expand', N), ('children-arrive', N)], N), 'expanded')
check('trace uncached-expand then children-fail', solve('collapsed', [('uncached-expand', N), ('children-fail', N)], N), 'load-error')
check('trace uncached-expand then collapse-during-load', solve('collapsed', [('uncached-expand', N), ('collapse-during-load', N)], N), 'collapse-pending')
check('trace children-arrive then collapse', solve('loading', [('children-arrive', N), ('collapse', N)], N), 'collapsed')
check('trace children-arrive then last-child-removed', solve('loading', [('children-arrive', N), ('last-child-removed', N)], N), 'empty')
check('trace children-fail then retry-expand', solve('loading', [('children-fail', N), ('retry-expand', N)], N), 'loading')
check('trace retry-expand then children-arrive', solve('load-error', [('retry-expand', N), ('children-arrive', N)], N), 'expanded')
check('trace retry-expand then children-fail', solve('load-error', [('retry-expand', N), ('children-fail', N)], N), 'load-error')
check('trace retry-expand then collapse-during-load', solve('load-error', [('retry-expand', N), ('collapse-during-load', N)], N), 'collapse-pending')
check('trace collapse-during-load then children-arrive', solve('loading', [('collapse-during-load', N), ('children-arrive', N)], N), 'collapsed')
check('trace children-arrive then expand', solve('collapse-pending', [('children-arrive', N), ('expand', N)], N), 'expanded')
check('trace children-arrive then uncached-expand', solve('collapse-pending', [('children-arrive', N), ('uncached-expand', N)], N), 'loading')
check('trace last-child-removed then first-child-added', solve('expanded', [('last-child-removed', N), ('first-child-added', N)], N), 'collapsed')
check('trace first-child-added then expand', solve('empty', [('first-child-added', N), ('expand', N)], N), 'expanded')
check('trace first-child-added then uncached-expand', solve('empty', [('first-child-added', N), ('uncached-expand', N)], N), 'loading')
check('domain state regression 1: children', solve('loading', [('children-arrive', N, {'request': 2, 'children': ['old']})], N, {}, 'children'), {'phase': 'loading', 'value': ['a', 'b']})
check('domain state regression 2: children', solve('loading', [('children-arrive', N, {'children': ['x', 'x', 'y']})], N, {}, 'children'), {'phase': 'expanded', 'value': ['x', 'y']})
check('domain state regression 3: wanted_open', solve('collapse-pending', [('children-arrive', N, {'children': ['x']})], N, {}, 'wanted_open'), {'phase': 'collapsed', 'value': False})
check('domain state regression 4: children', solve('expanded', [('last-child-removed', N, {})], N, {}, 'children'), {'phase': 'empty', 'value': []})
check('domain state regression 5: children', solve('empty', [('first-child-added', N, {'child': 'z'})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['z']})
check('domain state regression 6: children', solve('expanded', [('collapse', N, {})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['a', 'b']})
check('domain state regression 7: children', solve('collapsed', [('uncached-expand', N, {}), ('collapse-during-load', N, {}), ('children-arrive', N, {'children': ['x', 'y']})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['x', 'y']})
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
collapsed / expandloadingexpandedFailed
expanded / collapsecollapsedcollapsedPassed
collapsed / uncached-expandloadingloadingPassed
loading / children-arriveexpandedexpandedPassed
loading / children-failload-errorload-errorPassed
load-error / retry-expandloadingloadingPassed
loading / collapse-during-loadcollapse-pendingcollapse-pendingPassed
collapse-pending / children-arrivecollapsedcollapsedPassed
expanded / last-child-removedemptyemptyPassed
empty / first-child-addedcollapsedcollapsedPassed
older notification incarnationcollapsedcollapsedPassed
future notification incarnationcollapsedcollapsedPassed
unknown event is inertcollapsedcollapsedPassed
empty delivery batchcollapsedcollapsedPassed
N stale deliveries before current deliveryloadingexpandedFailed
trace expand then collapseloadingcollapsedFailed
trace expand then last-child-removedloadingemptyFailed
trace collapse then expandloadingexpandedFailed
trace collapse then uncached-expandloadingloadingPassed
trace uncached-expand then children-arriveexpandedexpandedPassed
trace uncached-expand then children-failload-errorload-errorPassed
trace uncached-expand then collapse-during-loadcollapse-pendingcollapse-pendingPassed
trace children-arrive then collapsecollapsedcollapsedPassed
trace children-arrive then last-child-removedemptyemptyPassed
trace children-fail then retry-expandloadingloadingPassed
trace retry-expand then children-arriveexpandedexpandedPassed
trace retry-expand then children-failload-errorload-errorPassed
trace retry-expand then collapse-during-loadcollapse-pendingcollapse-pendingPassed
trace collapse-during-load then children-arrivecollapsedcollapsedPassed
trace children-arrive then expandloadingexpandedFailed
trace children-arrive then uncached-expandloadingloadingPassed
trace last-child-removed then first-child-addedcollapsedcollapsedPassed
trace first-child-added then expandloadingexpandedFailed
trace first-child-added then uncached-expandloadingloadingPassed
domain state regression 1: children{'phase': 'loading', 'value': ['a', 'b']}{'phase': 'loading', 'value': ['a', 'b']}Passed
domain state regression 2: children{'phase': 'expanded', 'value': ['x', 'y']}{'phase': 'expanded', 'value': ['x', 'y']}Passed
domain state regression 3: wanted_open{'phase': 'collapsed', 'value': False}{'phase': 'collapsed', 'value': False}Passed
domain state regression 4: children{'phase': 'empty', 'value': []}{'phase': 'empty', 'value': []}Passed
domain state regression 5: children{'phase': 'collapsed', 'value': ['z']}{'phase': 'collapsed', 'value': ['z']}Passed
domain state regression 6: children{'phase': 'collapsed', 'value': ['a', 'b']}{'phase': 'collapsed', 'value': ['a', 'b']}Passed
domain state regression 7: children{'phase': 'collapsed', 'value': ['x', 'y']}{'phase': 'collapsed', 'value': ['x', 'y']}Passed

SHA-256 / c95d98883d943891845f9675fd5925bddbf31bb726329cd409a543bcaf18e965

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 = {('collapsed', 'expand'): 'collapsed', ('expanded', 'collapse'): 'collapsed', ('collapsed', 'uncached-expand'): 'loading', ('loading', 'children-arrive'): 'expanded', ('loading', 'children-fail'): 'load-error', ('load-error', 'retry-expand'): 'loading', ('loading', 'collapse-during-load'): 'collapse-pending', ('collapse-pending', 'children-arrive'): 'collapsed', ('expanded', 'last-child-removed'): 'empty', ('empty', 'first-child-added'): 'collapsed'}
    data = json.loads(json.dumps({'children': ['a', 'b'], 'request': 3, 'wanted_open': False})) if payload is None else {**json.loads(json.dumps({'children': ['a', 'b'], 'request': 3, 'wanted_open': 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 ('children-arrive','children-fail') and arg.get('request',data['request']) != data['request']: event = 'unknown-event'
            if event in ('expand','uncached-expand','retry-expand'): data['wanted_open'] = True
            if event in ('collapse','collapse-during-load'): data['wanted_open'] = False
            if event == 'children-arrive' and 'children' in arg: data['children'] = list(dict.fromkeys(arg['children']))
            if event == 'last-child-removed': data['children'] = []
            if event == 'first-child-added': data['children'] = [arg.get('child','new')]
            state = table.get((state, event), state)
            if state == 'expanded': data['wanted_open'] = True
            if state in ('collapsed','empty'): data['wanted_open'] = False
    return {'phase': state, 'value': data[observe]} if observe else state
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collapsed / expand', solve('collapsed', [('expand', N)], N), 'expanded')
check('expanded / collapse', solve('expanded', [('collapse', N)], N), 'collapsed')
check('collapsed / uncached-expand', solve('collapsed', [('uncached-expand', N)], N), 'loading')
check('loading / children-arrive', solve('loading', [('children-arrive', N)], N), 'expanded')
check('loading / children-fail', solve('loading', [('children-fail', N)], N), 'load-error')
check('load-error / retry-expand', solve('load-error', [('retry-expand', N)], N), 'loading')
check('loading / collapse-during-load', solve('loading', [('collapse-during-load', N)], N), 'collapse-pending')
check('collapse-pending / children-arrive', solve('collapse-pending', [('children-arrive', N)], N), 'collapsed')
check('expanded / last-child-removed', solve('expanded', [('last-child-removed', N)], N), 'empty')
check('empty / first-child-added', solve('empty', [('first-child-added', N)], N), 'collapsed')
check('older notification incarnation', solve('collapsed', [('expand', N - 1)], N), 'collapsed')
check('future notification incarnation', solve('collapsed', [('expand', N + 1)], N), 'collapsed')
check('unknown event is inert', solve('collapsed', [('unknown-event', N)], N), 'collapsed')
check('empty delivery batch', solve('collapsed', [], N), 'collapsed')
check('N stale deliveries before current delivery', solve('collapsed', [('expand', N - 1)] * N + [('expand', N)], N), 'expanded')
check('trace expand then collapse', solve('collapsed', [('expand', N), ('collapse', N)], N), 'collapsed')
check('trace expand then last-child-removed', solve('collapsed', [('expand', N), ('last-child-removed', N)], N), 'empty')
check('trace collapse then expand', solve('expanded', [('collapse', N), ('expand', N)], N), 'expanded')
check('trace collapse then uncached-expand', solve('expanded', [('collapse', N), ('uncached-expand', N)], N), 'loading')
check('trace uncached-expand then children-arrive', solve('collapsed', [('uncached-expand', N), ('children-arrive', N)], N), 'expanded')
check('trace uncached-expand then children-fail', solve('collapsed', [('uncached-expand', N), ('children-fail', N)], N), 'load-error')
check('trace uncached-expand then collapse-during-load', solve('collapsed', [('uncached-expand', N), ('collapse-during-load', N)], N), 'collapse-pending')
check('trace children-arrive then collapse', solve('loading', [('children-arrive', N), ('collapse', N)], N), 'collapsed')
check('trace children-arrive then last-child-removed', solve('loading', [('children-arrive', N), ('last-child-removed', N)], N), 'empty')
check('trace children-fail then retry-expand', solve('loading', [('children-fail', N), ('retry-expand', N)], N), 'loading')
check('trace retry-expand then children-arrive', solve('load-error', [('retry-expand', N), ('children-arrive', N)], N), 'expanded')
check('trace retry-expand then children-fail', solve('load-error', [('retry-expand', N), ('children-fail', N)], N), 'load-error')
check('trace retry-expand then collapse-during-load', solve('load-error', [('retry-expand', N), ('collapse-during-load', N)], N), 'collapse-pending')
check('trace collapse-during-load then children-arrive', solve('loading', [('collapse-during-load', N), ('children-arrive', N)], N), 'collapsed')
check('trace children-arrive then expand', solve('collapse-pending', [('children-arrive', N), ('expand', N)], N), 'expanded')
check('trace children-arrive then uncached-expand', solve('collapse-pending', [('children-arrive', N), ('uncached-expand', N)], N), 'loading')
check('trace last-child-removed then first-child-added', solve('expanded', [('last-child-removed', N), ('first-child-added', N)], N), 'collapsed')
check('trace first-child-added then expand', solve('empty', [('first-child-added', N), ('expand', N)], N), 'expanded')
check('trace first-child-added then uncached-expand', solve('empty', [('first-child-added', N), ('uncached-expand', N)], N), 'loading')
check('domain state regression 1: children', solve('loading', [('children-arrive', N, {'request': 2, 'children': ['old']})], N, {}, 'children'), {'phase': 'loading', 'value': ['a', 'b']})
check('domain state regression 2: children', solve('loading', [('children-arrive', N, {'children': ['x', 'x', 'y']})], N, {}, 'children'), {'phase': 'expanded', 'value': ['x', 'y']})
check('domain state regression 3: wanted_open', solve('collapse-pending', [('children-arrive', N, {'children': ['x']})], N, {}, 'wanted_open'), {'phase': 'collapsed', 'value': False})
check('domain state regression 4: children', solve('expanded', [('last-child-removed', N, {})], N, {}, 'children'), {'phase': 'empty', 'value': []})
check('domain state regression 5: children', solve('empty', [('first-child-added', N, {'child': 'z'})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['z']})
check('domain state regression 6: children', solve('expanded', [('collapse', N, {})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['a', 'b']})
check('domain state regression 7: children', solve('collapsed', [('uncached-expand', N, {}), ('collapse-during-load', N, {}), ('children-arrive', N, {'children': ['x', 'y']})], N, {}, 'children'), {'phase': 'collapsed', 'value': ['x', 'y']})
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
collapsed / expandcollapsedexpandedFailed
expanded / collapsecollapsedcollapsedPassed
collapsed / uncached-expandloadingloadingPassed
loading / children-arriveexpandedexpandedPassed
loading / children-failload-errorload-errorPassed
load-error / retry-expandloadingloadingPassed
loading / collapse-during-loadcollapse-pendingcollapse-pendingPassed
collapse-pending / children-arrivecollapsedcollapsedPassed
expanded / last-child-removedemptyemptyPassed
empty / first-child-addedcollapsedcollapsedPassed
older notification incarnationcollapsedcollapsedPassed
future notification incarnationcollapsedcollapsedPassed
unknown event is inertcollapsedcollapsedPassed
empty delivery batchcollapsedcollapsedPassed
N stale deliveries before current deliverycollapsedexpandedFailed
trace expand then collapsecollapsedcollapsedPassed
trace expand then last-child-removedcollapsedemptyFailed
trace collapse then expandcollapsedexpandedFailed
trace collapse then uncached-expandloadingloadingPassed
trace uncached-expand then children-arriveexpandedexpandedPassed
trace uncached-expand then children-failload-errorload-errorPassed
trace uncached-expand then collapse-during-loadcollapse-pendingcollapse-pendingPassed
trace children-arrive then collapsecollapsedcollapsedPassed
trace children-arrive then last-child-removedemptyemptyPassed
trace children-fail then retry-expandloadingloadingPassed
trace retry-expand then children-arriveexpandedexpandedPassed
trace retry-expand then children-failload-errorload-errorPassed
trace retry-expand then collapse-during-loadcollapse-pendingcollapse-pendingPassed
trace collapse-during-load then children-arrivecollapsedcollapsedPassed
trace children-arrive then expandcollapsedexpandedFailed
trace children-arrive then uncached-expandloadingloadingPassed
trace last-child-removed then first-child-addedcollapsedcollapsedPassed
trace first-child-added then expandcollapsedexpandedFailed
trace first-child-added then uncached-expandloadingloadingPassed
domain state regression 1: children{'phase': 'loading', 'value': ['a', 'b']}{'phase': 'loading', 'value': ['a', 'b']}Passed
domain state regression 2: children{'phase': 'expanded', 'value': ['x', 'y']}{'phase': 'expanded', 'value': ['x', 'y']}Passed
domain state regression 3: wanted_open{'phase': 'collapsed', 'value': False}{'phase': 'collapsed', 'value': False}Passed
domain state regression 4: children{'phase': 'empty', 'value': []}{'phase': 'empty', 'value': []}Passed
domain state regression 5: children{'phase': 'collapsed', 'value': ['z']}{'phase': 'collapsed', 'value': ['z']}Passed
domain state regression 6: children{'phase': 'collapsed', 'value': ['a', 'b']}{'phase': 'collapsed', 'value': ['a', 'b']}Passed
domain state regression 7: children{'phase': 'collapsed', 'value': ['x', 'y']}{'phase': 'collapsed', 'value': ['x', 'y']}Passed

SHA-256 / 367b403209b43bf1ce8f64542dbd2309805f1fc58a64a0cf67d4731437229b81

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 41 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.992521+00:00.

Case digest / 6bf224a1f064f1b96c6286a16127d565c3ab770f9dc81885c9bd1632cae97bef