FA-32636 / Menu interactions / Open access
Old menu command completion clears a newer pending action · case 01
Old menu command completion clears a newer pending action.
ROOT CAUSE
The dispatch-lifecycle model applies `True` at its completion operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['transaction']==p['pending']` at completion.
Unsuccessful approach: The attempted repair `p['transaction']<=p['pending']` still violates the completion oracle.
Case contract
Menu command transactions have explicit preparation, execution, success and failure phases; close policy and duplicate suppression are separate.
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 == 'prepare':
return 'prepared' if p['validated'] and p['authorized'] else 'rejected'
if action == 'pending':
return p['state']=='prepared' and not p['inflight']
if action == 'success-close':
return p['success'] and p['policy']=='success'
if action == 'failure':
return {'state':'failed','error':p['error'],'retry':p['retryable']}
if action == 'retry-id':
return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}
if action == 'completion':
return True
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')
check('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)
check('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)
check('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})
check('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})
check('completion contract', solve('completion', {'transaction':N,'pending':N+1}), False)
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 |
|---|---|---|---|
| prepare contract | rejected | rejected | Passed |
| pending contract | False | False | Passed |
| success-close contract | False | False | Passed |
| failure contract | {'error': 'e1', 'retry': True, 'state': 'failed'} | {'error': 'e1', 'retry': True, 'state': 'failed'} | Passed |
| retry-id contract | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | Passed |
| completion contract | True | False | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 57e000c6d9e47dbdb10f11e081926e34c3efe858485d7068190efcc74f3e5575
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 == 'prepare':
return 'prepared' if p['validated'] and p['authorized'] else 'rejected'
if action == 'pending':
return p['state']=='prepared' and not p['inflight']
if action == 'success-close':
return p['success'] and p['policy']=='success'
if action == 'failure':
return {'state':'failed','error':p['error'],'retry':p['retryable']}
if action == 'retry-id':
return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}
if action == 'completion':
return p['transaction']<=p['pending']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')
check('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)
check('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)
check('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})
check('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})
check('completion contract', solve('completion', {'transaction':N,'pending':N+1}), False)
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 |
|---|---|---|---|
| prepare contract | rejected | rejected | Passed |
| pending contract | False | False | Passed |
| success-close contract | False | False | Passed |
| failure contract | {'error': 'e1', 'retry': True, 'state': 'failed'} | {'error': 'e1', 'retry': True, 'state': 'failed'} | Passed |
| retry-id contract | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | Passed |
| completion contract | True | False | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 3a1af1c017a1abddcf9e4aa464025f20eb7961bc42f1081a460df4c1a3c79bef
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 == 'prepare':
return 'prepared' if p['validated'] and p['authorized'] else 'rejected'
if action == 'pending':
return p['state']=='prepared' and not p['inflight']
if action == 'success-close':
return p['success'] and p['policy']=='success'
if action == 'failure':
return {'state':'failed','error':p['error'],'retry':p['retryable']}
if action == 'retry-id':
return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}
if action == 'completion':
return p['transaction']==p['pending']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')
check('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)
check('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)
check('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})
check('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})
check('completion contract', solve('completion', {'transaction':N,'pending':N+1}), False)
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 |
|---|---|---|---|
| prepare contract | rejected | rejected | Passed |
| pending contract | False | False | Passed |
| success-close contract | False | False | Passed |
| failure contract | {'error': 'e1', 'retry': True, 'state': 'failed'} | {'error': 'e1', 'retry': True, 'state': 'failed'} | Passed |
| retry-id contract | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | {'attempt': 2, 'command': 'copy', 'context': 'doc'} | Passed |
| completion contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / fd0f4097b108236b3995e2f8b1917737e62b02c57749983299887385aecc573a
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:14.198425+00:00.
Case digest / a2b0e1e810a398cca7a7daef8a83aaa2f0f8b0e5bee2e3ee3030dddcc0d24fb8