FA-32961 / Menu interactions / Open access
Clearing menu filter restores only the last filtered projection · case 01
Clearing menu filter restores only the last filtered projection.
ROOT CAUSE
The filtered-menu-projection model applies `p['filtered']` at its query-clear operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['original']` at query-clear.
Unsuccessful approach: The attempted repair `p['filtered']+p['original']` still violates the query-clear oracle.
Case contract
Menu filtering retains matching leaves and required ancestor headers, counts only commands, and discards decorations orphaned by filtering.
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 == 'ancestors':
return sorted(set(p['matches']) | {a for x in p['matches'] for a in p['ancestors'][x]})
if action == 'command-count':
return sum(x['kind']=='command' for x in p)
if action == 'disabled-match':
return [x for x in p if x['matches']]
if action == 'group-header':
return [x for x in p['headers'] if x in p['surviving_groups']]
if action == 'query-clear':
return p['filtered']
if action == 'owner-match':
return p['direct_match'] or bool(p['descendant_matches'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ancestors contract', solve('ancestors', {'matches':['c'+str(N)],'ancestors':{'c'+str(N):['r','tools']}}), sorted(['c'+str(N),'r','tools']))
check('command-count contract', solve('command-count', [{'kind':'header'},{'kind':'command','id':N},{'kind':'separator'}]), 1)
check('disabled-match contract', solve('disabled-match', [{'matches':True,'enabled':False,'id':N},{'matches':False,'enabled':True,'id':N+1}]), [{'matches':True,'enabled':False,'id':N}])
check('group-header contract', solve('group-header', {'headers':['a','b'],'surviving_groups':['b','c'+str(N)]}), ['b'])
check('query-clear contract', solve('query-clear', {'original':list(range(N+3)),'filtered':[N]}), list(range(N+3)))
check('owner-match contract', solve('owner-match', {'direct_match':False,'descendant_matches':[N]}), True)
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 |
|---|---|---|---|
| ancestors contract | ['c1', 'r', 'tools'] | ['c1', 'r', 'tools'] | Passed |
| command-count contract | 1 | 1 | Passed |
| disabled-match contract | [{'enabled': False, 'id': 1, 'matches': True}] | [{'enabled': False, 'id': 1, 'matches': True}] | Passed |
| group-header contract | ['b'] | ['b'] | Passed |
| query-clear contract | [1] | [0, 1, 2, 3] | Failed |
| owner-match contract | True | True | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 549ca05f4fe7c693d551f62e1fbbea4aedbd1c6b057329493042ff2a4c99581f
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 == 'ancestors':
return sorted(set(p['matches']) | {a for x in p['matches'] for a in p['ancestors'][x]})
if action == 'command-count':
return sum(x['kind']=='command' for x in p)
if action == 'disabled-match':
return [x for x in p if x['matches']]
if action == 'group-header':
return [x for x in p['headers'] if x in p['surviving_groups']]
if action == 'query-clear':
return p['filtered']+p['original']
if action == 'owner-match':
return p['direct_match'] or bool(p['descendant_matches'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ancestors contract', solve('ancestors', {'matches':['c'+str(N)],'ancestors':{'c'+str(N):['r','tools']}}), sorted(['c'+str(N),'r','tools']))
check('command-count contract', solve('command-count', [{'kind':'header'},{'kind':'command','id':N},{'kind':'separator'}]), 1)
check('disabled-match contract', solve('disabled-match', [{'matches':True,'enabled':False,'id':N},{'matches':False,'enabled':True,'id':N+1}]), [{'matches':True,'enabled':False,'id':N}])
check('group-header contract', solve('group-header', {'headers':['a','b'],'surviving_groups':['b','c'+str(N)]}), ['b'])
check('query-clear contract', solve('query-clear', {'original':list(range(N+3)),'filtered':[N]}), list(range(N+3)))
check('owner-match contract', solve('owner-match', {'direct_match':False,'descendant_matches':[N]}), True)
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 |
|---|---|---|---|
| ancestors contract | ['c1', 'r', 'tools'] | ['c1', 'r', 'tools'] | Passed |
| command-count contract | 1 | 1 | Passed |
| disabled-match contract | [{'enabled': False, 'id': 1, 'matches': True}] | [{'enabled': False, 'id': 1, 'matches': True}] | Passed |
| group-header contract | ['b'] | ['b'] | Passed |
| query-clear contract | [1, 0, 1, 2, 3] | [0, 1, 2, 3] | Failed |
| owner-match contract | True | True | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / a23956dc5c3b4cc3c4deafe0bfa29dc424cffdf3ad634474da2b8cf19c0f3f52
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 == 'ancestors':
return sorted(set(p['matches']) | {a for x in p['matches'] for a in p['ancestors'][x]})
if action == 'command-count':
return sum(x['kind']=='command' for x in p)
if action == 'disabled-match':
return [x for x in p if x['matches']]
if action == 'group-header':
return [x for x in p['headers'] if x in p['surviving_groups']]
if action == 'query-clear':
return p['original']
if action == 'owner-match':
return p['direct_match'] or bool(p['descendant_matches'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ancestors contract', solve('ancestors', {'matches':['c'+str(N)],'ancestors':{'c'+str(N):['r','tools']}}), sorted(['c'+str(N),'r','tools']))
check('command-count contract', solve('command-count', [{'kind':'header'},{'kind':'command','id':N},{'kind':'separator'}]), 1)
check('disabled-match contract', solve('disabled-match', [{'matches':True,'enabled':False,'id':N},{'matches':False,'enabled':True,'id':N+1}]), [{'matches':True,'enabled':False,'id':N}])
check('group-header contract', solve('group-header', {'headers':['a','b'],'surviving_groups':['b','c'+str(N)]}), ['b'])
check('query-clear contract', solve('query-clear', {'original':list(range(N+3)),'filtered':[N]}), list(range(N+3)))
check('owner-match contract', solve('owner-match', {'direct_match':False,'descendant_matches':[N]}), True)
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 |
|---|---|---|---|
| ancestors contract | ['c1', 'r', 'tools'] | ['c1', 'r', 'tools'] | Passed |
| command-count contract | 1 | 1 | Passed |
| disabled-match contract | [{'enabled': False, 'id': 1, 'matches': True}] | [{'enabled': False, 'id': 1, 'matches': True}] | Passed |
| group-header contract | ['b'] | ['b'] | Passed |
| query-clear contract | [0, 1, 2, 3] | [0, 1, 2, 3] | Passed |
| owner-match contract | True | True | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 0cadb09f912e2d5e1edf70d8815b74b125ad513577df7c2cfe0523bd3e5a6c7d
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:17.481524+00:00.
Case digest / 3b1e7096322e6fde5827dcf871010582af63bcba2b20004d177ae1254b205ff3