FAILURE MAP
← Case archive

FA-33386 / Menu interactions / Open access

Menu separator width omits inter-column spacing · case 01

Menu separator width omits inter-column spacing.

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

ROOT CAUSE

The menu-row-decoration model applies `sum(p['columns'])` at its separator-span operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `sum(p['columns'])+p['gap']*(len(p['columns'])-1)` at separator-span.

Unsuccessful approach: The attempted repair `sum(p['columns'])+p['gap']*len(p['columns'])` still violates the separator-span oracle.

Case contract

Menu decoration columns are measured from visible command rows; text, badges and submenu indicators remain separate from command identity.

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 == 'indicator-column':
        return max((x['indicator_width'] for x in p if x['visible']),default=0)
    if action == 'badge':
        return None if p['count'] is None else str(p['count'])
    if action == 'label-command':
        return p['command']
    if action == 'suffix-order':
        return p['label']+(' '+p['suffix'] if p['suffix'] else '')
    if action == 'icon-space':
        return p['column_width'] if p['column_enabled'] else 0
    if action == 'separator-span':
        return sum(p['columns'])
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('indicator-column contract', solve('indicator-column', [{'visible':False,'indicator_width':N+10},{'visible':True,'indicator_width':2}]), 2)
check('badge contract', solve('badge', {'count':0,'revision':N}), '0')
check('label-command contract', solve('label-command', {'command':'cmd'+str(N),'label':'Copy','badge':'2'}), 'cmd'+str(N))
check('suffix-order contract', solve('suffix-order', {'label':'Item '+str(N),'suffix':'(new)'}), 'Item '+str(N)+' (new)')
check('icon-space contract', solve('icon-space', {'column_width':N+4,'column_enabled':True,'own_width':0}), N+4)
check('separator-span contract', solve('separator-span', {'columns':[N,10,4],'gap':2}), N+18)
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 fixtureActualExpectedOutcome
indicator-column contract22Passed
badge contract00Passed
label-command contractcmd1cmd1Passed
suffix-order contractItem 1 (new)Item 1 (new)Passed
icon-space contract55Passed
separator-span contract1519Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / d18f84fe423d6c4c893c88ebb7e2a461007c413a4e70c6c1830c759847d2502c

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 == 'indicator-column':
        return max((x['indicator_width'] for x in p if x['visible']),default=0)
    if action == 'badge':
        return None if p['count'] is None else str(p['count'])
    if action == 'label-command':
        return p['command']
    if action == 'suffix-order':
        return p['label']+(' '+p['suffix'] if p['suffix'] else '')
    if action == 'icon-space':
        return p['column_width'] if p['column_enabled'] else 0
    if action == 'separator-span':
        return sum(p['columns'])+p['gap']*len(p['columns'])
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('indicator-column contract', solve('indicator-column', [{'visible':False,'indicator_width':N+10},{'visible':True,'indicator_width':2}]), 2)
check('badge contract', solve('badge', {'count':0,'revision':N}), '0')
check('label-command contract', solve('label-command', {'command':'cmd'+str(N),'label':'Copy','badge':'2'}), 'cmd'+str(N))
check('suffix-order contract', solve('suffix-order', {'label':'Item '+str(N),'suffix':'(new)'}), 'Item '+str(N)+' (new)')
check('icon-space contract', solve('icon-space', {'column_width':N+4,'column_enabled':True,'own_width':0}), N+4)
check('separator-span contract', solve('separator-span', {'columns':[N,10,4],'gap':2}), N+18)
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 fixtureActualExpectedOutcome
indicator-column contract22Passed
badge contract00Passed
label-command contractcmd1cmd1Passed
suffix-order contractItem 1 (new)Item 1 (new)Passed
icon-space contract55Passed
separator-span contract2119Failed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 9fd68e8d50899c722ea5fe4c3b0845562b065a92f930d612c8ca869bcbf45b1c

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 == 'indicator-column':
        return max((x['indicator_width'] for x in p if x['visible']),default=0)
    if action == 'badge':
        return None if p['count'] is None else str(p['count'])
    if action == 'label-command':
        return p['command']
    if action == 'suffix-order':
        return p['label']+(' '+p['suffix'] if p['suffix'] else '')
    if action == 'icon-space':
        return p['column_width'] if p['column_enabled'] else 0
    if action == 'separator-span':
        return sum(p['columns'])+p['gap']*(len(p['columns'])-1)
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('indicator-column contract', solve('indicator-column', [{'visible':False,'indicator_width':N+10},{'visible':True,'indicator_width':2}]), 2)
check('badge contract', solve('badge', {'count':0,'revision':N}), '0')
check('label-command contract', solve('label-command', {'command':'cmd'+str(N),'label':'Copy','badge':'2'}), 'cmd'+str(N))
check('suffix-order contract', solve('suffix-order', {'label':'Item '+str(N),'suffix':'(new)'}), 'Item '+str(N)+' (new)')
check('icon-space contract', solve('icon-space', {'column_width':N+4,'column_enabled':True,'own_width':0}), N+4)
check('separator-span contract', solve('separator-span', {'columns':[N,10,4],'gap':2}), N+18)
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 fixtureActualExpectedOutcome
indicator-column contract22Passed
badge contract00Passed
label-command contractcmd1cmd1Passed
suffix-order contractItem 1 (new)Item 1 (new)Passed
icon-space contract55Passed
separator-span contract1919Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / b25a4b2dbb7acabb0df2f8600c0094f4e65eff71c3b5dddb4702e3071755f959

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:21.893339+00:00.

Case digest / a4f46ec95d5636c49fc2d3d936f37e86acc68d90e70386c1a55c1c09ae3be7c6