FA-32956 / Menu interactions / Open access
Filtered menu retains headings for groups with no surviving commands · case 01
Filtered menu retains headings for groups with no surviving commands.
ROOT CAUSE
The filtered-menu-projection model applies `p['headers']` at its group-header operation instead of the stipulated transformation.
THE FAILURE
The filtered-menu-projection model applies `p['headers']` at its group-header operation instead of the stipulated transformation.
Unsuccessful approach: The attempted repair `p['surviving_groups']` still violates the group-header 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 p['headers']
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 | ['a', 'b'] | ['b'] | Failed |
| 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 / 81d2ab078ac02762d316ad97e05a7ddc81ad11e5f5f1a24593d80c395ab88826
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 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', 'c1'] | ['b'] | Failed |
| 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 / 1809bb0f6998b5e2d6a79c4443327daad68fbe80e67bd2d46a1d617cd1157f0d
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:17.625813+00:00.
Case digest / 0d154dc5b78599813d17ab8d8f1b75e84e6457226f7117ae34fb073e683b05e8