FAILURE MAP
← Case archive

FA-33506 / Menu interactions / Open access

Scoped context menu dismissal crosses its declared root boundary · case 01

Scoped context menu dismissal crosses its declared root boundary.

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

ROOT CAUSE

The menu-dismissal-policy model applies `[]` at its nested-boundary operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `p['chain'][:p['boundary']]` at nested-boundary.

Unsuccessful approach: The attempted repair `p['chain'][:p['boundary']+1]` still violates the nested-boundary oracle.

Case contract

Menu dismissal reasons map to explicit close scopes; command completion, owner removal and outside dismissal do not share a universal policy.

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 == 'leaf-scope':
        return p['chain'][:p['depth']] if p['scope']=='branch' else []
    if action == 'veto':
        return p['requested'] and not p['vetoed']
    if action == 'mandatory-teardown':
        return p['owner_removed'] or not p['vetoed']
    if action == 'reason-priority':
        return next(x for x in ['owner-removed','command','outside'] if x in p)
    if action == 'pending-command':
        return p['pending'] if p['reason']=='transfer' else []
    if action == 'nested-boundary':
        return []
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('leaf-scope contract', solve('leaf-scope', {'chain':['root','sub',str(N)],'depth':1,'scope':'branch'}), ['root'])
check('veto contract', solve('veto', {'requested':True,'vetoed':True,'owner':N}), False)
check('mandatory-teardown contract', solve('mandatory-teardown', {'owner_removed':True,'vetoed':True,'id':N}), True)
check('reason-priority contract', solve('reason-priority', ['outside','owner-removed','command']), 'owner-removed')
check('pending-command contract', solve('pending-command', {'pending':[N],'reason':'transfer'}), [N])
check('nested-boundary contract', solve('nested-boundary', {'chain':['outer','local','child'+str(N)],'boundary':1}), ['outer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
leaf-scope contract['root']['root']Passed
veto contractFalseFalsePassed
mandatory-teardown contractTrueTruePassed
reason-priority contractowner-removedowner-removedPassed
pending-command contract[1][1]Passed
nested-boundary contract[]['outer']Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / af79dc620f549995e92a52579e64c157039c7a4ce12f6fe1ef4bdd1fa7a3dc77

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 == 'leaf-scope':
        return p['chain'][:p['depth']] if p['scope']=='branch' else []
    if action == 'veto':
        return p['requested'] and not p['vetoed']
    if action == 'mandatory-teardown':
        return p['owner_removed'] or not p['vetoed']
    if action == 'reason-priority':
        return next(x for x in ['owner-removed','command','outside'] if x in p)
    if action == 'pending-command':
        return p['pending'] if p['reason']=='transfer' else []
    if action == 'nested-boundary':
        return p['chain'][:p['boundary']+1]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('leaf-scope contract', solve('leaf-scope', {'chain':['root','sub',str(N)],'depth':1,'scope':'branch'}), ['root'])
check('veto contract', solve('veto', {'requested':True,'vetoed':True,'owner':N}), False)
check('mandatory-teardown contract', solve('mandatory-teardown', {'owner_removed':True,'vetoed':True,'id':N}), True)
check('reason-priority contract', solve('reason-priority', ['outside','owner-removed','command']), 'owner-removed')
check('pending-command contract', solve('pending-command', {'pending':[N],'reason':'transfer'}), [N])
check('nested-boundary contract', solve('nested-boundary', {'chain':['outer','local','child'+str(N)],'boundary':1}), ['outer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
leaf-scope contract['root']['root']Passed
veto contractFalseFalsePassed
mandatory-teardown contractTrueTruePassed
reason-priority contractowner-removedowner-removedPassed
pending-command contract[1][1]Passed
nested-boundary contract['outer', 'local']['outer']Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / fda106dfe8613104ee52593acb579f0c3342295ff4d28ab859e01e9aef6a6f48

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 == 'leaf-scope':
        return p['chain'][:p['depth']] if p['scope']=='branch' else []
    if action == 'veto':
        return p['requested'] and not p['vetoed']
    if action == 'mandatory-teardown':
        return p['owner_removed'] or not p['vetoed']
    if action == 'reason-priority':
        return next(x for x in ['owner-removed','command','outside'] if x in p)
    if action == 'pending-command':
        return p['pending'] if p['reason']=='transfer' else []
    if action == 'nested-boundary':
        return p['chain'][:p['boundary']]
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('leaf-scope contract', solve('leaf-scope', {'chain':['root','sub',str(N)],'depth':1,'scope':'branch'}), ['root'])
check('veto contract', solve('veto', {'requested':True,'vetoed':True,'owner':N}), False)
check('mandatory-teardown contract', solve('mandatory-teardown', {'owner_removed':True,'vetoed':True,'id':N}), True)
check('reason-priority contract', solve('reason-priority', ['outside','owner-removed','command']), 'owner-removed')
check('pending-command contract', solve('pending-command', {'pending':[N],'reason':'transfer'}), [N])
check('nested-boundary contract', solve('nested-boundary', {'chain':['outer','local','child'+str(N)],'boundary':1}), ['outer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
leaf-scope contract['root']['root']Passed
veto contractFalseFalsePassed
mandatory-teardown contractTrueTruePassed
reason-priority contractowner-removedowner-removedPassed
pending-command contract[1][1]Passed
nested-boundary contract['outer']['outer']Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 8ff895ce62b2a56a133c23051c0c1e7bd551080975c15f5cb8d3cd0859557719

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

Case digest / e8b6421c2c899a8975120b1fc8f4a6e8e2a8ff353e95d8e38c6dd779aee8ed2b