FAILURE MAP
← Case archive

FA-33081 / Menu interactions / Open access

No-op menu action adds a meaningless undo entry · case 01

No-op menu action adds a meaningless undo entry.

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

ROOT CAUSE

The menu-command-receipts model applies `{'before':p['before'],'after':p['after']}` at its noop operation instead of the stipulated transformation.

THE FAILURE

The menu-command-receipts model applies `{'before':p['before'],'after':p['after']}` at its noop operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `{} if p['before']==p['after'] else {'before':p['before'],'after':p['after']}` still violates the noop 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 [x for x in p['effects'] if x['transaction']==p['transaction']]
    if action == 'description':
        return p['captured_label']
    if action == 'noop':
        return {'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 contract{'after': 1, 'before': 1}NoneFailed
merge-window contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 801d90e7671b8822b5dcb12723018dd454f473fdecbd95c2f428109d10374625

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['transaction']==p['transaction']]
    if action == 'description':
        return p['captured_label']
    if action == 'noop':
        return {} 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 contract{}NoneFailed
merge-window contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 37364b43999bc01c6fb15d6eb1342ed1ab8a9586ed593b04fb9a70fb7e164b8f

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / e07c314fc1b8f9784aa0f23cc0f8a92b2452fed1d62a56e1d8adf5e1a4780fd6