FAILURE MAP
← Case archive

FA-34101 / Notification interfaces / Open access

Grouped notification interaction: uncached-expand from collapsed · case 01

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

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

ROOT CAUSE

An uncached group claims to have loaded children.

VERIFIED REPAIR

Commit the collapsed / uncached-expand transition to loading; preserve the other explicitly stipulated transitions.

Unsuccessful approach: Treating unloaded membership as empty suppresses the group.

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'): 'expanded', ('expanded', 'collapse'): 'collapsed', ('collapsed', 'uncached-expand'): 'expanded', ('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 / expandexpandedexpandedPassed
expanded / collapsecollapsedcollapsedPassed
collapsed / uncached-expandexpandedloadingFailed
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 deliveryexpandedexpandedPassed
trace expand then collapsecollapsedcollapsedPassed
trace expand then last-child-removedemptyemptyPassed
trace collapse then expandexpandedexpandedPassed
trace collapse then uncached-expandexpandedloadingFailed
trace uncached-expand then children-arriveexpandedexpandedPassed
trace uncached-expand then children-failexpandedload-errorFailed
trace uncached-expand then collapse-during-loadexpandedcollapse-pendingFailed
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 expandexpandedexpandedPassed
trace children-arrive then uncached-expandexpandedloadingFailed
trace last-child-removed then first-child-addedcollapsedcollapsedPassed
trace first-child-added then expandexpandedexpandedPassed
trace first-child-added then uncached-expandexpandedloadingFailed
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': 'expanded', 'value': ['x', 'y']}{'phase': 'collapsed', 'value': ['x', 'y']}Failed

SHA-256 / d980ec7698b6943b5cc9e30836e2befd5a780529f62213058bd0e74d919280cc

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'): 'expanded', ('expanded', 'collapse'): 'collapsed', ('collapsed', 'uncached-expand'): 'empty', ('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 / expandexpandedexpandedPassed
expanded / collapsecollapsedcollapsedPassed
collapsed / uncached-expandemptyloadingFailed
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 deliveryexpandedexpandedPassed
trace expand then collapsecollapsedcollapsedPassed
trace expand then last-child-removedemptyemptyPassed
trace collapse then expandexpandedexpandedPassed
trace collapse then uncached-expandemptyloadingFailed
trace uncached-expand then children-arriveemptyexpandedFailed
trace uncached-expand then children-failemptyload-errorFailed
trace uncached-expand then collapse-during-loademptycollapse-pendingFailed
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 expandexpandedexpandedPassed
trace children-arrive then uncached-expandemptyloadingFailed
trace last-child-removed then first-child-addedcollapsedcollapsedPassed
trace first-child-added then expandexpandedexpandedPassed
trace first-child-added then uncached-expandemptyloadingFailed
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': 'empty', 'value': ['x', 'y']}{'phase': 'collapsed', 'value': ['x', 'y']}Failed

SHA-256 / edc7e716d158e4ba2f17136b2b40bb250501b23e716b1d6e7b384aa2156b3d69

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 = {('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'}
    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 / expandexpandedexpandedPassed
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 deliveryexpandedexpandedPassed
trace expand then collapsecollapsedcollapsedPassed
trace expand then last-child-removedemptyemptyPassed
trace collapse then expandexpandedexpandedPassed
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 expandexpandedexpandedPassed
trace children-arrive then uncached-expandloadingloadingPassed
trace last-child-removed then first-child-addedcollapsedcollapsedPassed
trace first-child-added then expandexpandedexpandedPassed
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 / 8d360c087c50c3bf7b717357bd9581455e79e318bc35da05c062f3b8fa7fb912

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.626827+00:00.

Case digest / 596c0ca9e9b9e5c19e5c98a628d96ad7e7a3c24d6b7e9e58a398ae26b1816880