FA-33781 / Menu interactions / Open access
Menu preview accumulates on the previous preview instead of base state · case 01
Menu preview accumulates on the previous preview instead of base state.
ROOT CAUSE
The menu-command-preview model applies `p['current_preview']+p['delta']` at its base operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['base']+p['delta']` at base.
Unsuccessful approach: The attempted repair `p['delta']` still violates the base oracle.
Case contract
Hover previews are provisional document overlays; changing preview restores the base, commit applies the actual command once and cancellation removes only the menu-owned preview.
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 == 'base':
return p['current_preview']+p['delta']
if action == 'cancel':
return p['base']
if action == 'commit-once':
return p['base']+p['delta']
if action == 'owner-cleanup':
return [x for x in p['overlays'] if x['menu']!=p['menu']]
if action == 'supported':
return p['previewable'] and p['reversible']
if action == 'exit-mode':
return 'commit' if p['reason']=='execute' else 'restore'
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('base contract', solve('base', {'base':N,'current_preview':N+5,'delta':2}), N+2)
check('cancel contract', solve('cancel', {'base':N,'current':N+3}), N)
check('commit-once contract', solve('commit-once', {'base':N,'preview':N+2,'delta':2}), N+2)
check('owner-cleanup contract', solve('owner-cleanup', {'overlays':[{'menu':'a','id':N},{'menu':'b','id':N+1}],'menu':'a'}), [{'menu':'b','id':N+1}])
check('supported contract', solve('supported', {'previewable':True,'reversible':False,'command':N}), False)
check('exit-mode contract', solve('exit-mode', {'reason':'leave','owner':N}), 'restore')
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 |
|---|---|---|---|
| base contract | 8 | 3 | Failed |
| cancel contract | 1 | 1 | Passed |
| commit-once contract | 3 | 3 | Passed |
| owner-cleanup contract | [{'id': 2, 'menu': 'b'}] | [{'id': 2, 'menu': 'b'}] | Passed |
| supported contract | False | False | Passed |
| exit-mode contract | restore | restore | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / fdba27d0205102eda5e1313e41ce5643d0f58fb97f533b7c3fc851fb35c5a01a
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 == 'base':
return p['delta']
if action == 'cancel':
return p['base']
if action == 'commit-once':
return p['base']+p['delta']
if action == 'owner-cleanup':
return [x for x in p['overlays'] if x['menu']!=p['menu']]
if action == 'supported':
return p['previewable'] and p['reversible']
if action == 'exit-mode':
return 'commit' if p['reason']=='execute' else 'restore'
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('base contract', solve('base', {'base':N,'current_preview':N+5,'delta':2}), N+2)
check('cancel contract', solve('cancel', {'base':N,'current':N+3}), N)
check('commit-once contract', solve('commit-once', {'base':N,'preview':N+2,'delta':2}), N+2)
check('owner-cleanup contract', solve('owner-cleanup', {'overlays':[{'menu':'a','id':N},{'menu':'b','id':N+1}],'menu':'a'}), [{'menu':'b','id':N+1}])
check('supported contract', solve('supported', {'previewable':True,'reversible':False,'command':N}), False)
check('exit-mode contract', solve('exit-mode', {'reason':'leave','owner':N}), 'restore')
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 |
|---|---|---|---|
| base contract | 2 | 3 | Failed |
| cancel contract | 1 | 1 | Passed |
| commit-once contract | 3 | 3 | Passed |
| owner-cleanup contract | [{'id': 2, 'menu': 'b'}] | [{'id': 2, 'menu': 'b'}] | Passed |
| supported contract | False | False | Passed |
| exit-mode contract | restore | restore | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / b7e05bf79b7e17a869697154398aeb092284769143ce2695b663c9588fb8bc2e
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 == 'base':
return p['base']+p['delta']
if action == 'cancel':
return p['base']
if action == 'commit-once':
return p['base']+p['delta']
if action == 'owner-cleanup':
return [x for x in p['overlays'] if x['menu']!=p['menu']]
if action == 'supported':
return p['previewable'] and p['reversible']
if action == 'exit-mode':
return 'commit' if p['reason']=='execute' else 'restore'
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('base contract', solve('base', {'base':N,'current_preview':N+5,'delta':2}), N+2)
check('cancel contract', solve('cancel', {'base':N,'current':N+3}), N)
check('commit-once contract', solve('commit-once', {'base':N,'preview':N+2,'delta':2}), N+2)
check('owner-cleanup contract', solve('owner-cleanup', {'overlays':[{'menu':'a','id':N},{'menu':'b','id':N+1}],'menu':'a'}), [{'menu':'b','id':N+1}])
check('supported contract', solve('supported', {'previewable':True,'reversible':False,'command':N}), False)
check('exit-mode contract', solve('exit-mode', {'reason':'leave','owner':N}), 'restore')
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 |
|---|---|---|---|
| base contract | 3 | 3 | Passed |
| cancel contract | 1 | 1 | Passed |
| commit-once contract | 3 | 3 | Passed |
| owner-cleanup contract | [{'id': 2, 'menu': 'b'}] | [{'id': 2, 'menu': 'b'}] | Passed |
| supported contract | False | False | Passed |
| exit-mode contract | restore | restore | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / a94eb917d71e65759bb62865cdf7cdb2ab233f02531386709d26b07b4e0453b8
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:25.645035+00:00.
Case digest / 53222ad97e2b7a690eb950bc7548f56cc72f498ecf2f1270dbcfe88ca73775be