FA-32601 / Menu interactions / Open access
Cancelled menu command continues through ancestor handlers · case 01
Cancelled menu command continues through ancestor handlers.
ROOT CAUSE
The command-routing model applies `p['handled']` at its stop operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['handled'] or p['cancelled']` at stop.
Unsuccessful approach: The attempted repair `p['handled'] and p['cancelled']` still violates the stop oracle.
Case contract
Menu dispatch resolves the nearest ancestor handler accepting the command, preserving a command origin distinct from the handler owner.
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 == 'nearest':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'unsupported':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'origin':
return p['invocation_origin']
if action == 'args':
return dict(p['defaults'],**p['invocation'])
if action == 'stop':
return p['handled']
if action == 'result-owner':
return {'command':p['command'],'handler':p['handler'],'origin':p['origin']}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')
check('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)
check('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))
check('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})
check('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)
check('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| nearest contract | child | child | Passed |
| unsupported contract | None | None | Passed |
| origin contract | row1 | row1 | Passed |
| args contract | {'count': 2, 'mode': 'copy'} | {'count': 2, 'mode': 'copy'} | Passed |
| stop contract | False | True | Failed |
| result-owner contract | {'command': '1', 'handler': 'app', 'origin': 'context'} | {'command': '1', 'handler': 'app', 'origin': 'context'} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 3feb414c8219f1dcee7fd9c0250d97827b9d73303ed872b14b9621e30c9e746f
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 == 'nearest':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'unsupported':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'origin':
return p['invocation_origin']
if action == 'args':
return dict(p['defaults'],**p['invocation'])
if action == 'stop':
return p['handled'] and p['cancelled']
if action == 'result-owner':
return {'command':p['command'],'handler':p['handler'],'origin':p['origin']}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')
check('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)
check('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))
check('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})
check('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)
check('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| nearest contract | child | child | Passed |
| unsupported contract | None | None | Passed |
| origin contract | row1 | row1 | Passed |
| args contract | {'count': 2, 'mode': 'copy'} | {'count': 2, 'mode': 'copy'} | Passed |
| stop contract | False | True | Failed |
| result-owner contract | {'command': '1', 'handler': 'app', 'origin': 'context'} | {'command': '1', 'handler': 'app', 'origin': 'context'} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / f37fd308ee3f8c4583d38c846a23a6105f5d67c1cbf53d3081baf89ae35921b3
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 == 'nearest':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'unsupported':
return next((x['owner'] for x in reversed(p['chain']) if p['command'] in x['handles']),None)
if action == 'origin':
return p['invocation_origin']
if action == 'args':
return dict(p['defaults'],**p['invocation'])
if action == 'stop':
return p['handled'] or p['cancelled']
if action == 'result-owner':
return {'command':p['command'],'handler':p['handler'],'origin':p['origin']}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest contract', solve('nearest', {'command':'c'+str(N),'chain':[{'owner':'root','handles':['c'+str(N)]},{'owner':'child','handles':['c'+str(N)]}]}), 'child')
check('unsupported contract', solve('unsupported', {'command':'missing'+str(N),'chain':[{'owner':'root','handles':['a']},{'owner':'child','handles':['b']}]}), None)
check('origin contract', solve('origin', {'invocation_origin':'row'+str(N),'handler_owner':'panel','root_owner':'app'}), 'row'+str(N))
check('args contract', solve('args', {'defaults':{'count':1,'mode':'copy'},'invocation':{'count':N+1}}), {'count':N+1,'mode':'copy'})
check('stop contract', solve('stop', {'handled':False,'cancelled':True,'serial':N}), True)
check('result-owner contract', solve('result-owner', {'command':str(N),'handler':'app','origin':'context'}), {'command':str(N),'handler':'app','origin':'context'})
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| nearest contract | child | child | Passed |
| unsupported contract | None | None | Passed |
| origin contract | row1 | row1 | Passed |
| args contract | {'count': 2, 'mode': 'copy'} | {'count': 2, 'mode': 'copy'} | Passed |
| stop contract | True | True | Passed |
| result-owner contract | {'command': '1', 'handler': 'app', 'origin': 'context'} | {'command': '1', 'handler': 'app', 'origin': 'context'} | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / a074dadc309847fa86daf7c53729dc9f1d2f43608fa3d0e6829c711c5680dee8
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:13.873109+00:00.
Case digest / 557a0f7031cf305a8103eb7de523b545b945241965024f4d54d56032ee6cb087