FA-32786 / Menu interactions / Open access
Menu bridge hit region ignores its horizontal bounds · case 01
Menu bridge hit region ignores its horizontal bounds.
ROOT CAUSE
The submenu-edge-placement model applies `p['owner_right']<=p['x']<=p['menu_left']` at its gap-hit operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['owner_right']<=p['x']<=p['menu_left'] and p['top']<=p['y']<=p['bottom']` at gap-hit.
Unsuccessful approach: The attempted repair `p['top']<=p['y']<=p['bottom']` still violates the gap-hit oracle.
Case contract
Submenu placement uses owner edges, overlap compensation, available side space and root-relative coordinates under a stipulated rectangular layout.
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 == 'right':
return p['x']+p['width']-p['overlap']
if action == 'left':
return p['x']-p['submenu']+p['overlap']
if action == 'side':
return 'right' if p['right']>=p['width'] else ('left' if p['left']>=p['width'] else ('right' if p['right']>=p['left'] else 'left'))
if action == 'row-align':
return p['row_y']-p['padding']
if action == 'root-relative':
return [p['screen'][0]-p['root'][0],p['screen'][1]-p['root'][1]]
if action == 'gap-hit':
return p['owner_right']<=p['x']<=p['menu_left']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('right contract', solve('right', {'x':N,'width':20,'overlap':2}), N+18)
check('left contract', solve('left', {'x':N+30,'submenu':10,'overlap':2}), N+22)
check('side contract', solve('side', {'right':N+5,'left':N+2,'width':N+10}), 'right')
check('row-align contract', solve('row-align', {'row_y':N+20,'padding':3}), N+17)
check('root-relative contract', solve('root-relative', {'screen':[10*N,20*N],'root':[N,2*N]}), [9*N,18*N])
check('gap-hit contract', solve('gap-hit', {'owner_right':N+5,'menu_left':N+8,'x':N,'top':0,'bottom':10,'y':5}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('only left fits',solve('side',{'right':N,'left':N+10,'width':N+5}),'left')
check('bridge vertical miss',solve('gap-hit',{'owner_right':N,'menu_left':N+4,'x':N+2,'top':3,'bottom':8,'y':10}),False)
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 |
|---|---|---|---|
| right contract | 19 | 19 | Passed |
| left contract | 23 | 23 | Passed |
| side contract | right | right | Passed |
| row-align contract | 18 | 18 | Passed |
| root-relative contract | [9, 18] | [9, 18] | Passed |
| gap-hit contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| only left fits | left | left | Passed |
| bridge vertical miss | True | False | Failed |
SHA-256 / 38edae39d0e33d943ff463ee4a669d7a35d4f64b23afc4f5386e36fe7503e45a
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 == 'right':
return p['x']+p['width']-p['overlap']
if action == 'left':
return p['x']-p['submenu']+p['overlap']
if action == 'side':
return 'right' if p['right']>=p['width'] else ('left' if p['left']>=p['width'] else ('right' if p['right']>=p['left'] else 'left'))
if action == 'row-align':
return p['row_y']-p['padding']
if action == 'root-relative':
return [p['screen'][0]-p['root'][0],p['screen'][1]-p['root'][1]]
if action == 'gap-hit':
return p['top']<=p['y']<=p['bottom']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('right contract', solve('right', {'x':N,'width':20,'overlap':2}), N+18)
check('left contract', solve('left', {'x':N+30,'submenu':10,'overlap':2}), N+22)
check('side contract', solve('side', {'right':N+5,'left':N+2,'width':N+10}), 'right')
check('row-align contract', solve('row-align', {'row_y':N+20,'padding':3}), N+17)
check('root-relative contract', solve('root-relative', {'screen':[10*N,20*N],'root':[N,2*N]}), [9*N,18*N])
check('gap-hit contract', solve('gap-hit', {'owner_right':N+5,'menu_left':N+8,'x':N,'top':0,'bottom':10,'y':5}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('only left fits',solve('side',{'right':N,'left':N+10,'width':N+5}),'left')
check('bridge vertical miss',solve('gap-hit',{'owner_right':N,'menu_left':N+4,'x':N+2,'top':3,'bottom':8,'y':10}),False)
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 |
|---|---|---|---|
| right contract | 19 | 19 | Passed |
| left contract | 23 | 23 | Passed |
| side contract | right | right | Passed |
| row-align contract | 18 | 18 | Passed |
| root-relative contract | [9, 18] | [9, 18] | Passed |
| gap-hit contract | True | False | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| only left fits | left | left | Passed |
| bridge vertical miss | False | False | Passed |
SHA-256 / 5944e26117b2e58af3c462d4751df95b8f230a5ca58278ab0e8353884b87637a
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 == 'right':
return p['x']+p['width']-p['overlap']
if action == 'left':
return p['x']-p['submenu']+p['overlap']
if action == 'side':
return 'right' if p['right']>=p['width'] else ('left' if p['left']>=p['width'] else ('right' if p['right']>=p['left'] else 'left'))
if action == 'row-align':
return p['row_y']-p['padding']
if action == 'root-relative':
return [p['screen'][0]-p['root'][0],p['screen'][1]-p['root'][1]]
if action == 'gap-hit':
return p['owner_right']<=p['x']<=p['menu_left'] and p['top']<=p['y']<=p['bottom']
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('right contract', solve('right', {'x':N,'width':20,'overlap':2}), N+18)
check('left contract', solve('left', {'x':N+30,'submenu':10,'overlap':2}), N+22)
check('side contract', solve('side', {'right':N+5,'left':N+2,'width':N+10}), 'right')
check('row-align contract', solve('row-align', {'row_y':N+20,'padding':3}), N+17)
check('root-relative contract', solve('root-relative', {'screen':[10*N,20*N],'root':[N,2*N]}), [9*N,18*N])
check('gap-hit contract', solve('gap-hit', {'owner_right':N+5,'menu_left':N+8,'x':N,'top':0,'bottom':10,'y':5}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('only left fits',solve('side',{'right':N,'left':N+10,'width':N+5}),'left')
check('bridge vertical miss',solve('gap-hit',{'owner_right':N,'menu_left':N+4,'x':N+2,'top':3,'bottom':8,'y':10}),False)
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 |
|---|---|---|---|
| right contract | 19 | 19 | Passed |
| left contract | 23 | 23 | Passed |
| side contract | right | right | Passed |
| row-align contract | 18 | 18 | Passed |
| root-relative contract | [9, 18] | [9, 18] | Passed |
| gap-hit contract | False | False | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| only left fits | left | left | Passed |
| bridge vertical miss | False | False | Passed |
SHA-256 / 0c2c7adbabf248ae3417d771a851c5edfe915ae1add416989ed61ce892bc8e2c
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:15.683367+00:00.
Case digest / 495d49f5e9a376f1ac45b22d872839948b193cfc19c04fd3882629ca2fb9cf83