FA-32876 / Menu interactions / Open access
Menu refresh pins a submenu to the old row index · case 01
Menu refresh pins a submenu to the old row index.
ROOT CAUSE
The menu-snapshot-refresh model applies `p['old_index']` at its anchor-id operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `next((i for i,x in enumerate(p['rows']) if x==p['owner']),None)` at anchor-id.
Unsuccessful approach: The attempted repair `0` still violates the anchor-id oracle.
Case contract
Refreshing an open menu reconciles immutable command IDs, provider revisions and annotations without confusing display positions with identity.
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 == 'retain-live':
return [x for x in p['old'] if x in p['new']]
if action == 'new-order':
return [x for x in p['new'] if x in p['old']]
if action == 'annotation':
return {x:p['annotations'][x] for x in p['new'] if x in p['annotations']}
if action == 'provider-version':
return p['incoming']>p['current']
if action == 'path-valid':
return all(x in p['parents'] and p['parents'][x]==y for y,x in zip(p['chain'],p['chain'][1:]))
if action == 'anchor-id':
return p['old_index']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('retain-live contract', solve('retain-live', {'old':[N,N+1],'new':[N+1,N+2]}), [N+1])
check('new-order contract', solve('new-order', {'old':[N,N+1],'new':[N+1,N]}), [N+1,N])
check('annotation contract', solve('annotation', {'new':['a'],'annotations':{'a':N,'gone':N+1}}), {'a':N})
check('provider-version contract', solve('provider-version', {'incoming':N,'current':N}), False)
check('path-valid contract', solve('path-valid', {'chain':['r','a',str(N)],'parents':{'a':'r',str(N):'other'}}), False)
check('anchor-id contract', solve('anchor-id', {'rows':['x','y','owner'+str(N)],'owner':'owner'+str(N),'old_index':1}), 2)
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 |
|---|---|---|---|
| retain-live contract | [2] | [2] | Passed |
| new-order contract | [2, 1] | [2, 1] | Passed |
| annotation contract | {'a': 1} | {'a': 1} | Passed |
| provider-version contract | False | False | Passed |
| path-valid contract | False | False | Passed |
| anchor-id contract | 1 | 2 | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 05bbcced685d8278c40f22de7c52dbaf5798b3fa33ae6bf1aff5cfe2ad2c0bbb
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 == 'retain-live':
return [x for x in p['old'] if x in p['new']]
if action == 'new-order':
return [x for x in p['new'] if x in p['old']]
if action == 'annotation':
return {x:p['annotations'][x] for x in p['new'] if x in p['annotations']}
if action == 'provider-version':
return p['incoming']>p['current']
if action == 'path-valid':
return all(x in p['parents'] and p['parents'][x]==y for y,x in zip(p['chain'],p['chain'][1:]))
if action == 'anchor-id':
return 0
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('retain-live contract', solve('retain-live', {'old':[N,N+1],'new':[N+1,N+2]}), [N+1])
check('new-order contract', solve('new-order', {'old':[N,N+1],'new':[N+1,N]}), [N+1,N])
check('annotation contract', solve('annotation', {'new':['a'],'annotations':{'a':N,'gone':N+1}}), {'a':N})
check('provider-version contract', solve('provider-version', {'incoming':N,'current':N}), False)
check('path-valid contract', solve('path-valid', {'chain':['r','a',str(N)],'parents':{'a':'r',str(N):'other'}}), False)
check('anchor-id contract', solve('anchor-id', {'rows':['x','y','owner'+str(N)],'owner':'owner'+str(N),'old_index':1}), 2)
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 |
|---|---|---|---|
| retain-live contract | [2] | [2] | Passed |
| new-order contract | [2, 1] | [2, 1] | Passed |
| annotation contract | {'a': 1} | {'a': 1} | Passed |
| provider-version contract | False | False | Passed |
| path-valid contract | False | False | Passed |
| anchor-id contract | 0 | 2 | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 31750528160c35b2946887b9ceeec9195f16c3aae2d92524c8dc17344241abc7
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 == 'retain-live':
return [x for x in p['old'] if x in p['new']]
if action == 'new-order':
return [x for x in p['new'] if x in p['old']]
if action == 'annotation':
return {x:p['annotations'][x] for x in p['new'] if x in p['annotations']}
if action == 'provider-version':
return p['incoming']>p['current']
if action == 'path-valid':
return all(x in p['parents'] and p['parents'][x]==y for y,x in zip(p['chain'],p['chain'][1:]))
if action == 'anchor-id':
return next((i for i,x in enumerate(p['rows']) if x==p['owner']),None)
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('retain-live contract', solve('retain-live', {'old':[N,N+1],'new':[N+1,N+2]}), [N+1])
check('new-order contract', solve('new-order', {'old':[N,N+1],'new':[N+1,N]}), [N+1,N])
check('annotation contract', solve('annotation', {'new':['a'],'annotations':{'a':N,'gone':N+1}}), {'a':N})
check('provider-version contract', solve('provider-version', {'incoming':N,'current':N}), False)
check('path-valid contract', solve('path-valid', {'chain':['r','a',str(N)],'parents':{'a':'r',str(N):'other'}}), False)
check('anchor-id contract', solve('anchor-id', {'rows':['x','y','owner'+str(N)],'owner':'owner'+str(N),'old_index':1}), 2)
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 |
|---|---|---|---|
| retain-live contract | [2] | [2] | Passed |
| new-order contract | [2, 1] | [2, 1] | Passed |
| annotation contract | {'a': 1} | {'a': 1} | Passed |
| provider-version contract | False | False | Passed |
| path-valid contract | False | False | Passed |
| anchor-id contract | 2 | 2 | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / e5e786fe9f306d2f561b29e4fc91cac9805d2ffe825254ca3106b58c592f5932
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:16.735334+00:00.
Case digest / bbdbc22bd6d4e637d0e6dc5ff093010735c1d72b9a3c127c45e3382a8113cca0