FA-33061 / Menu interactions / Open access
Uncommitted menu action produces an undo receipt · case 01
Uncommitted menu action produces an undo receipt.
ROOT CAUSE
The menu-command-receipts model applies `p['receipt']` at its success-receipt operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['receipt'] if p['committed'] else None` at success-receipt.
Unsuccessful approach: The attempted repair `p['receipt'] if p['attempted'] else None` still violates the success-receipt oracle.
Case contract
Menu command receipts retain committed effects, invocation identity and reversible scope; receipt generation does not imply successful mutation.
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 == 'success-receipt':
return p['receipt']
if action == 'effect-order':
return list(reversed(p))
if action == 'scope':
return [x for x in p['effects'] if x['transaction']==p['transaction']]
if action == 'description':
return p['captured_label']
if action == 'noop':
return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}
if action == 'merge-window':
return p['command']==p['previous_command'] and p['context']==p['previous_context'] and p['elapsed']<=p['window']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)
check('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])
check('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])
check('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))
check('noop contract', solve('noop', {'before':N,'after':N}), None)
check('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), 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 |
|---|---|---|---|
| success-receipt contract | 1 | None | Failed |
| effect-order contract | ['rename', 'write1', 'create'] | ['rename', 'write1', 'create'] | Passed |
| scope contract | [{'document': 'd', 'transaction': 1}] | [{'document': 'd', 'transaction': 1}] | Passed |
| description contract | Move 1 | Move 1 | Passed |
| noop contract | None | None | Passed |
| merge-window contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / f2a66dff5db9a00efc14fff84c405a08f3489000296308a2830e0030714366de
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 == 'success-receipt':
return p['receipt'] if p['attempted'] else None
if action == 'effect-order':
return list(reversed(p))
if action == 'scope':
return [x for x in p['effects'] if x['transaction']==p['transaction']]
if action == 'description':
return p['captured_label']
if action == 'noop':
return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}
if action == 'merge-window':
return p['command']==p['previous_command'] and p['context']==p['previous_context'] and p['elapsed']<=p['window']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)
check('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])
check('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])
check('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))
check('noop contract', solve('noop', {'before':N,'after':N}), None)
check('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), 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 |
|---|---|---|---|
| success-receipt contract | 1 | None | Failed |
| effect-order contract | ['rename', 'write1', 'create'] | ['rename', 'write1', 'create'] | Passed |
| scope contract | [{'document': 'd', 'transaction': 1}] | [{'document': 'd', 'transaction': 1}] | Passed |
| description contract | Move 1 | Move 1 | Passed |
| noop contract | None | None | Passed |
| merge-window contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / a53bbf8debf80eb3bbad55e539bc2a23ae8504abe1bb8505ca61da7d74a26eeb
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 == 'success-receipt':
return p['receipt'] if p['committed'] else None
if action == 'effect-order':
return list(reversed(p))
if action == 'scope':
return [x for x in p['effects'] if x['transaction']==p['transaction']]
if action == 'description':
return p['captured_label']
if action == 'noop':
return None if p['before']==p['after'] else {'before':p['before'],'after':p['after']}
if action == 'merge-window':
return p['command']==p['previous_command'] and p['context']==p['previous_context'] and p['elapsed']<=p['window']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('success-receipt contract', solve('success-receipt', {'receipt':N,'committed':False,'attempted':True}), None)
check('effect-order contract', solve('effect-order', ['create','write'+str(N),'rename']), ['rename','write'+str(N),'create'])
check('scope contract', solve('scope', {'transaction':N,'document':'d','effects':[{'transaction':N,'document':'d'},{'transaction':N+1,'document':'d'}]}), [{'transaction':N,'document':'d'}])
check('description contract', solve('description', {'captured_label':'Move '+str(N),'live_label':'Copy','command_id':'edit'}), 'Move '+str(N))
check('noop contract', solve('noop', {'before':N,'after':N}), None)
check('merge-window contract', solve('merge-window', {'command':'rename','previous_command':'rename','context':N,'previous_context':N+1,'elapsed':1,'window':5}), 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 |
|---|---|---|---|
| success-receipt contract | None | None | Passed |
| effect-order contract | ['rename', 'write1', 'create'] | ['rename', 'write1', 'create'] | Passed |
| scope contract | [{'document': 'd', 'transaction': 1}] | [{'document': 'd', 'transaction': 1}] | Passed |
| description contract | Move 1 | Move 1 | Passed |
| noop contract | None | None | Passed |
| merge-window contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 79cdbebe599a468dd5d63fa2cf905ccc390178c52a3f69906590fa3d291526ba
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:18.552214+00:00.
Case digest / 19f3799998af32100024e93b0a5ae3bcc50f3de43ee1804bf79189f6c8cd7fb6