FAILURE MAP
← Case archive

FA-33111 / Menu interactions / Open access

Successful empty provider is confused with pending menu content · case 01

Successful empty provider is confused with pending menu content.

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

ROOT CAUSE

The provider-state-presentation model applies `p['rows']` at its empty-success operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `['empty'] if p['completed'] and not p['rows'] else p['rows']` at empty-success.

Unsuccessful approach: The attempted repair `['loading'] if not p['rows'] else p['rows']` still violates the empty-success oracle.

Case contract

Lazy submenu presentation distinguishes first load, refresh, stale content, retryable failure and empty success without disguising provider state as commands.

Why this case matters

Cascading and context menus require coherent command and session state as content changes.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
    if action == 'initial':
        return ['loading'] if p['loading'] and not p['rows'] else p['rows']
    if action == 'refresh':
        return p['rows']+(['refreshing'] if p['loading'] else [])
    if action == 'retryable':
        return ['error', 'retry'] if p['retryable'] else ['error']
    if action == 'stale-error':
        return p['rows']+['stale','error']
    if action == 'empty-success':
        return p['rows']
    if action == 'status-actionable':
        return [x for x in p if x['kind']=='command']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial contract', solve('initial', {'loading':True,'rows':[],'generation':N}), ['loading'])
check('refresh contract', solve('refresh', {'loading':True,'rows':[N,N+1]}), [N,N+1,'refreshing'])
check('retryable contract', solve('retryable', {'retryable':True,'code':N}), ['error','retry'])
check('stale-error contract', solve('stale-error', {'rows':[N],'error':'offline'}), [N,'stale','error'])
check('empty-success contract', solve('empty-success', {'completed':True,'rows':[],'version':N}), ['empty'])
check('status-actionable contract', solve('status-actionable', [{'kind':'error','id':N},{'kind':'command','id':N+1}]), [{'kind':'command','id':N+1}])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('initial content ready',solve('initial',{'loading':False,'rows':[N]}),[N])
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
initial contract['loading']['loading']Passed
refresh contract[1, 2, 'refreshing'][1, 2, 'refreshing']Passed
retryable contract['error', 'retry']['error', 'retry']Passed
stale-error contract[1, 'stale', 'error'][1, 'stale', 'error']Passed
empty-success contract[]['empty']Failed
status-actionable contract[{'id': 2, 'kind': 'command'}][{'id': 2, 'kind': 'command'}]Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
initial content ready[1][1]Passed

SHA-256 / 900f1a00296b02479fa0f23dff398f089e641e96f68a788f982a173b155c9f1a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
    if action == 'initial':
        return ['loading'] if p['loading'] and not p['rows'] else p['rows']
    if action == 'refresh':
        return p['rows']+(['refreshing'] if p['loading'] else [])
    if action == 'retryable':
        return ['error', 'retry'] if p['retryable'] else ['error']
    if action == 'stale-error':
        return p['rows']+['stale','error']
    if action == 'empty-success':
        return ['loading'] if not p['rows'] else p['rows']
    if action == 'status-actionable':
        return [x for x in p if x['kind']=='command']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial contract', solve('initial', {'loading':True,'rows':[],'generation':N}), ['loading'])
check('refresh contract', solve('refresh', {'loading':True,'rows':[N,N+1]}), [N,N+1,'refreshing'])
check('retryable contract', solve('retryable', {'retryable':True,'code':N}), ['error','retry'])
check('stale-error contract', solve('stale-error', {'rows':[N],'error':'offline'}), [N,'stale','error'])
check('empty-success contract', solve('empty-success', {'completed':True,'rows':[],'version':N}), ['empty'])
check('status-actionable contract', solve('status-actionable', [{'kind':'error','id':N},{'kind':'command','id':N+1}]), [{'kind':'command','id':N+1}])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('initial content ready',solve('initial',{'loading':False,'rows':[N]}),[N])
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
initial contract['loading']['loading']Passed
refresh contract[1, 2, 'refreshing'][1, 2, 'refreshing']Passed
retryable contract['error', 'retry']['error', 'retry']Passed
stale-error contract[1, 'stale', 'error'][1, 'stale', 'error']Passed
empty-success contract['loading']['empty']Failed
status-actionable contract[{'id': 2, 'kind': 'command'}][{'id': 2, 'kind': 'command'}]Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
initial content ready[1][1]Passed

SHA-256 / db2423fe965fd9a6500f36a119c18cf34ff91e60caafd1fbf572b1df3da80344

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
    if action == 'initial':
        return ['loading'] if p['loading'] and not p['rows'] else p['rows']
    if action == 'refresh':
        return p['rows']+(['refreshing'] if p['loading'] else [])
    if action == 'retryable':
        return ['error', 'retry'] if p['retryable'] else ['error']
    if action == 'stale-error':
        return p['rows']+['stale','error']
    if action == 'empty-success':
        return ['empty'] if p['completed'] and not p['rows'] else p['rows']
    if action == 'status-actionable':
        return [x for x in p if x['kind']=='command']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('initial contract', solve('initial', {'loading':True,'rows':[],'generation':N}), ['loading'])
check('refresh contract', solve('refresh', {'loading':True,'rows':[N,N+1]}), [N,N+1,'refreshing'])
check('retryable contract', solve('retryable', {'retryable':True,'code':N}), ['error','retry'])
check('stale-error contract', solve('stale-error', {'rows':[N],'error':'offline'}), [N,'stale','error'])
check('empty-success contract', solve('empty-success', {'completed':True,'rows':[],'version':N}), ['empty'])
check('status-actionable contract', solve('status-actionable', [{'kind':'error','id':N},{'kind':'command','id':N+1}]), [{'kind':'command','id':N+1}])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('initial content ready',solve('initial',{'loading':False,'rows':[N]}),[N])
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
initial contract['loading']['loading']Passed
refresh contract[1, 2, 'refreshing'][1, 2, 'refreshing']Passed
retryable contract['error', 'retry']['error', 'retry']Passed
stale-error contract[1, 'stale', 'error'][1, 'stale', 'error']Passed
empty-success contract['empty']['empty']Passed
status-actionable contract[{'id': 2, 'kind': 'command'}][{'id': 2, 'kind': 'command'}]Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
initial content ready[1][1]Passed

SHA-256 / a6b2be79553a66247f441d499dd57a05e70857449f1c6d43f1b74bb943f0e044

Verification & scope

Offline supplied-valid-payload model; excludes DOM, keyboard, focus, selection, announcements and browser conformance. 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:19.046850+00:00.

Case digest / 47eb73003d6b28f321becbaf952d1fcfe08fddd9f1cfdeaa9b357f29c4183a66