FAILURE MAP
← Case archive

FA-32776 / Menu interactions / Open access

Submenu content starts below the owning row due to padding · case 01

Submenu content starts below the owning row due to padding.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The submenu-edge-placement model applies `p['row_y']` at its row-align operation instead of the stipulated transformation.

THE FAILURE

The submenu-edge-placement model applies `p['row_y']` at its row-align operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `p['row_y']+p['padding']` still violates the row-align 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']
    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 fixtureActualExpectedOutcome
right contract1919Passed
left contract2323Passed
side contractrightrightPassed
row-align contract2118Failed
root-relative contract[9, 18][9, 18]Passed
gap-hit contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
only left fitsleftleftPassed
bridge vertical missFalseFalsePassed

SHA-256 / 39cb694fa074c52c7b5c8a338594f5ef659494d6a1d1d3cdffd6c4188c48384f

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['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 fixtureActualExpectedOutcome
right contract1919Passed
left contract2323Passed
side contractrightrightPassed
row-align contract2418Failed
root-relative contract[9, 18][9, 18]Passed
gap-hit contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
only left fitsleftleftPassed
bridge vertical missFalseFalsePassed

SHA-256 / f6021144a6cd923d26966771c1fe9ba33d8685d9658edee5ca3140320df7ecd5

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 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:15.683367+00:00.

Case digest / 1a0722089f7bf98a558f573b1dcaf6a12398ce85d15421bf2186a43b6341483b