FA-33011 / Menu interactions / Open access
Overflow popup drops the first overflowed menu command · case 01
Overflow popup drops the first overflowed menu command.
ROOT CAUSE
The overflow-menu model applies `p['items'][:p['fit']]` at its suffix operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['items'][p['fit']:]` at suffix.
Unsuccessful approach: The attempted repair `p['items'][p['fit']+1:]` still violates the suffix oracle.
Case contract
A menu overflow container reserves its own trigger, preserves complete groups, and restores source order when room returns.
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 == 'reserve-trigger':
return p['capacity']-p['trigger']
if action == 'prefix-fit':
return next((i for i in range(len(p['widths'])+1) if sum(p['widths'][:i+1])>p['capacity']),len(p['widths']))
if action == 'suffix':
return p['items'][:p['fit']]
if action == 'group-atomic':
return [g for g in p['groups'] if g['width']<=p['remaining']]
if action == 'restore':
return sorted(p,key=lambda x:x['source'])
if action == 'trigger-visible':
return bool(p['overflow'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reserve-trigger contract', solve('reserve-trigger', {'capacity':N+10,'trigger':3}), N+7)
check('prefix-fit contract', solve('prefix-fit', {'widths':[N+1,N+1,N+1],'capacity':2*(N+1)}), 2)
check('suffix contract', solve('suffix', {'items':list(range(N+4)),'fit':2}), list(range(2,N+4)))
check('group-atomic contract', solve('group-atomic', {'groups':[{'width':N+2,'id':'a'},{'width':N+3,'id':'b'}],'remaining':N+2}), [{'width':N+2,'id':'a'}])
check('restore contract', solve('restore', [{'source':2,'label':'a'},{'source':N-N,'label':'z'}]), [{'source':0,'label':'z'},{'source':2,'label':'a'}])
check('trigger-visible contract', solve('trigger-visible', {'overflow':[],'capacity':N,'main':list(range(N))}), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| reserve-trigger contract | 8 | 8 | Passed |
| prefix-fit contract | 2 | 2 | Passed |
| suffix contract | [0, 1] | [2, 3, 4] | Failed |
| group-atomic contract | [{'id': 'a', 'width': 3}] | [{'id': 'a', 'width': 3}] | Passed |
| restore contract | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | Passed |
| trigger-visible contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / d7cae79d373244a5a3717fbed2e25275290c4d3e5810a296853f2f1b0ad7410a
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 == 'reserve-trigger':
return p['capacity']-p['trigger']
if action == 'prefix-fit':
return next((i for i in range(len(p['widths'])+1) if sum(p['widths'][:i+1])>p['capacity']),len(p['widths']))
if action == 'suffix':
return p['items'][p['fit']+1:]
if action == 'group-atomic':
return [g for g in p['groups'] if g['width']<=p['remaining']]
if action == 'restore':
return sorted(p,key=lambda x:x['source'])
if action == 'trigger-visible':
return bool(p['overflow'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reserve-trigger contract', solve('reserve-trigger', {'capacity':N+10,'trigger':3}), N+7)
check('prefix-fit contract', solve('prefix-fit', {'widths':[N+1,N+1,N+1],'capacity':2*(N+1)}), 2)
check('suffix contract', solve('suffix', {'items':list(range(N+4)),'fit':2}), list(range(2,N+4)))
check('group-atomic contract', solve('group-atomic', {'groups':[{'width':N+2,'id':'a'},{'width':N+3,'id':'b'}],'remaining':N+2}), [{'width':N+2,'id':'a'}])
check('restore contract', solve('restore', [{'source':2,'label':'a'},{'source':N-N,'label':'z'}]), [{'source':0,'label':'z'},{'source':2,'label':'a'}])
check('trigger-visible contract', solve('trigger-visible', {'overflow':[],'capacity':N,'main':list(range(N))}), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| reserve-trigger contract | 8 | 8 | Passed |
| prefix-fit contract | 2 | 2 | Passed |
| suffix contract | [3, 4] | [2, 3, 4] | Failed |
| group-atomic contract | [{'id': 'a', 'width': 3}] | [{'id': 'a', 'width': 3}] | Passed |
| restore contract | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | Passed |
| trigger-visible contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / b1daee57a4e4a21f9e8a6a9338797ef5e5656e7a2fa8f9e37e34855fb436b6ed
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 == 'reserve-trigger':
return p['capacity']-p['trigger']
if action == 'prefix-fit':
return next((i for i in range(len(p['widths'])+1) if sum(p['widths'][:i+1])>p['capacity']),len(p['widths']))
if action == 'suffix':
return p['items'][p['fit']:]
if action == 'group-atomic':
return [g for g in p['groups'] if g['width']<=p['remaining']]
if action == 'restore':
return sorted(p,key=lambda x:x['source'])
if action == 'trigger-visible':
return bool(p['overflow'])
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('reserve-trigger contract', solve('reserve-trigger', {'capacity':N+10,'trigger':3}), N+7)
check('prefix-fit contract', solve('prefix-fit', {'widths':[N+1,N+1,N+1],'capacity':2*(N+1)}), 2)
check('suffix contract', solve('suffix', {'items':list(range(N+4)),'fit':2}), list(range(2,N+4)))
check('group-atomic contract', solve('group-atomic', {'groups':[{'width':N+2,'id':'a'},{'width':N+3,'id':'b'}],'remaining':N+2}), [{'width':N+2,'id':'a'}])
check('restore contract', solve('restore', [{'source':2,'label':'a'},{'source':N-N,'label':'z'}]), [{'source':0,'label':'z'},{'source':2,'label':'a'}])
check('trigger-visible contract', solve('trigger-visible', {'overflow':[],'capacity':N,'main':list(range(N))}), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| reserve-trigger contract | 8 | 8 | Passed |
| prefix-fit contract | 2 | 2 | Passed |
| suffix contract | [2, 3, 4] | [2, 3, 4] | Passed |
| group-atomic contract | [{'id': 'a', 'width': 3}] | [{'id': 'a', 'width': 3}] | Passed |
| restore contract | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | [{'label': 'z', 'source': 0}, {'label': 'a', 'source': 2}] | Passed |
| trigger-visible contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 67a96186ab1c75343719c34406eae59dbf9a088bfe25933eab78774fe3d44424
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.040103+00:00.
Case digest / 4ede6c1013ae70ca27e0cf6c5703dabada1acbc9f10ba63b583449dcce15284b