FAILURE MAP
← Case archive

FA-32781 / Menu interactions / Open access

Portaled submenu mixes root-relative and screen coordinates · case 01

Portaled submenu mixes root-relative and screen coordinates.

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

ROOT CAUSE

The submenu-edge-placement model applies `p['screen']` at its root-relative operation instead of the stipulated transformation.

THE FAILURE

The submenu-edge-placement model applies `p['screen']` at its root-relative operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `[p['screen'][0]-p['root'][0],p['screen'][1]]` still violates the root-relative 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']
    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 contract1818Passed
root-relative contract[10, 20][9, 18]Failed
gap-hit contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
only left fitsleftleftPassed
bridge vertical missFalseFalsePassed

SHA-256 / 93995a059b7c9ed57e8bf394ba2bdab0609d0790f3abe78ae1b2c51a47bff357

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]]
    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 contract1818Passed
root-relative contract[9, 20][9, 18]Failed
gap-hit contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
only left fitsleftleftPassed
bridge vertical missFalseFalsePassed

SHA-256 / 4185a0c9ea75dc2005a0b808b8b4cffc646b56b9d83d78d9ae02c82e80ec4ce9

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 / e64da4225500b1f38c9a9f66c04fc22fc4818724cf9c07a662dc0b4807ea869c