FAILURE MAP
← Case archive

FA-33071 / Menu interactions / Open access

Menu undo receipt captures another action on the same document · case 01

Menu undo receipt captures another action on the same document.

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

ROOT CAUSE

The menu-command-receipts model applies `p['effects']` at its scope operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `[x for x in p['effects'] if x['transaction']==p['transaction']]` at scope.

Unsuccessful approach: The attempted repair `[x for x in p['effects'] if x['document']==p['document']]` still violates the scope 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 p['committed'] else None
    if action == 'effect-order':
        return list(reversed(p))
    if action == 'scope':
        return p['effects']
    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 fixtureActualExpectedOutcome
success-receipt contractNoneNonePassed
effect-order contract['rename', 'write1', 'create']['rename', 'write1', 'create']Passed
scope contract[{'document': 'd', 'transaction': 1}, {'document': 'd', 'transaction': 2}][{'document': 'd', 'transaction': 1}]Failed
description contractMove 1Move 1Passed
noop contractNoneNonePassed
merge-window contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 96b815756a2cfc818618957fe1f6e64d3cd28ffc89f54a62dc16b674ccbd9f93

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['committed'] else None
    if action == 'effect-order':
        return list(reversed(p))
    if action == 'scope':
        return [x for x in p['effects'] if x['document']==p['document']]
    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 fixtureActualExpectedOutcome
success-receipt contractNoneNonePassed
effect-order contract['rename', 'write1', 'create']['rename', 'write1', 'create']Passed
scope contract[{'document': 'd', 'transaction': 1}, {'document': 'd', 'transaction': 2}][{'document': 'd', 'transaction': 1}]Failed
description contractMove 1Move 1Passed
noop contractNoneNonePassed
merge-window contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / c41d8550b9e35137ccb00034a6bdf8bf4bb375ccf46283493902a020e357098f

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 fixtureActualExpectedOutcome
success-receipt contractNoneNonePassed
effect-order contract['rename', 'write1', 'create']['rename', 'write1', 'create']Passed
scope contract[{'document': 'd', 'transaction': 1}][{'document': 'd', 'transaction': 1}]Passed
description contractMove 1Move 1Passed
noop contractNoneNonePassed
merge-window contractFalseFalsePassed
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.648073+00:00.

Case digest / c9e50fcc82540c6f90be7b1c65fd7608f0295a4afd80c249d5d7b2b6ade5596e