FAILURE MAP
← Case archive

FA-33736 / Menu interactions / Open access

Budget-truncated submenu lacks a visible truncation state · case 01

Budget-truncated submenu lacks a visible truncation state.

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

ROOT CAUSE

The nested-provider-budgets model applies `{'rows':p['rows'][:p['limit']],'truncated':False}` at its truncate-signal operation instead of the stipulated transformation.

VERIFIED REPAIR

Apply `{'rows':p['rows'][:p['limit']],'truncated':len(p['rows'])>p['limit']}` at truncate-signal.

Unsuccessful approach: The attempted repair `{'rows':p['rows'],'truncated':True}` still violates the truncate-signal oracle.

Case contract

Nested menu providers consume shared row and depth budgets and charge visible descendants exactly once; cached rows still occupy presentation budget.

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 == 'remaining-rows':
        return max(0,p['budget']-p['ancestor_rows'])
    if action == 'remaining-depth':
        return max(0,p['maximum']-p['depth'])
    if action == 'charge-cache':
        return len(p['fresh'])+len(p['cached'])
    if action == 'truncate-signal':
        return {'rows':p['rows'][:p['limit']],'truncated':False}
    if action == 'reservation':
        return max(0,p['available']-sum(p['reservations'].values()))
    if action == 'release-reservation':
        return {k:v for k,v in p['reservations'].items() if k!=p['provider']}
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remaining-rows contract', solve('remaining-rows', {'budget':N+10,'ancestor_rows':4,'local_rows':1}), N+6)
check('remaining-depth contract', solve('remaining-depth', {'maximum':N+6,'depth':2}), N+4)
check('charge-cache contract', solve('charge-cache', {'fresh':[N],'cached':[N+1,N+2]}), 3)
check('truncate-signal contract', solve('truncate-signal', {'rows':list(range(N+3)),'limit':2}), {'rows':[0,1],'truncated':True})
check('reservation contract', solve('reservation', {'available':N+10,'reservations':{'a':2,'b':3}}), N+5)
check('release-reservation contract', solve('release-reservation', {'reservations':{'a':N,'b':N+1},'provider':'a','used':1}), {'b':N+1})
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
remaining-rows contract77Passed
remaining-depth contract55Passed
charge-cache contract33Passed
truncate-signal contract{'rows': [0, 1], 'truncated': False}{'rows': [0, 1], 'truncated': True}Failed
reservation contract66Passed
release-reservation contract{'b': 2}{'b': 2}Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / c6cb087ac33181ecfe9fdaea013b7b5e1e505f1fee87a5341e7ba99bdc101842

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 == 'remaining-rows':
        return max(0,p['budget']-p['ancestor_rows'])
    if action == 'remaining-depth':
        return max(0,p['maximum']-p['depth'])
    if action == 'charge-cache':
        return len(p['fresh'])+len(p['cached'])
    if action == 'truncate-signal':
        return {'rows':p['rows'],'truncated':True}
    if action == 'reservation':
        return max(0,p['available']-sum(p['reservations'].values()))
    if action == 'release-reservation':
        return {k:v for k,v in p['reservations'].items() if k!=p['provider']}
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remaining-rows contract', solve('remaining-rows', {'budget':N+10,'ancestor_rows':4,'local_rows':1}), N+6)
check('remaining-depth contract', solve('remaining-depth', {'maximum':N+6,'depth':2}), N+4)
check('charge-cache contract', solve('charge-cache', {'fresh':[N],'cached':[N+1,N+2]}), 3)
check('truncate-signal contract', solve('truncate-signal', {'rows':list(range(N+3)),'limit':2}), {'rows':[0,1],'truncated':True})
check('reservation contract', solve('reservation', {'available':N+10,'reservations':{'a':2,'b':3}}), N+5)
check('release-reservation contract', solve('release-reservation', {'reservations':{'a':N,'b':N+1},'provider':'a','used':1}), {'b':N+1})
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
remaining-rows contract77Passed
remaining-depth contract55Passed
charge-cache contract33Passed
truncate-signal contract{'rows': [0, 1, 2, 3], 'truncated': True}{'rows': [0, 1], 'truncated': True}Failed
reservation contract66Passed
release-reservation contract{'b': 2}{'b': 2}Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 1d891860ec5e77fcd01de89585ffcbb446a6bc7dc3f23d8ee8f887e85bf2c7b6

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 == 'remaining-rows':
        return max(0,p['budget']-p['ancestor_rows'])
    if action == 'remaining-depth':
        return max(0,p['maximum']-p['depth'])
    if action == 'charge-cache':
        return len(p['fresh'])+len(p['cached'])
    if action == 'truncate-signal':
        return {'rows':p['rows'][:p['limit']],'truncated':len(p['rows'])>p['limit']}
    if action == 'reservation':
        return max(0,p['available']-sum(p['reservations'].values()))
    if action == 'release-reservation':
        return {k:v for k,v in p['reservations'].items() if k!=p['provider']}
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remaining-rows contract', solve('remaining-rows', {'budget':N+10,'ancestor_rows':4,'local_rows':1}), N+6)
check('remaining-depth contract', solve('remaining-depth', {'maximum':N+6,'depth':2}), N+4)
check('charge-cache contract', solve('charge-cache', {'fresh':[N],'cached':[N+1,N+2]}), 3)
check('truncate-signal contract', solve('truncate-signal', {'rows':list(range(N+3)),'limit':2}), {'rows':[0,1],'truncated':True})
check('reservation contract', solve('reservation', {'available':N+10,'reservations':{'a':2,'b':3}}), N+5)
check('release-reservation contract', solve('release-reservation', {'reservations':{'a':N,'b':N+1},'provider':'a','used':1}), {'b':N+1})
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
remaining-rows contract77Passed
remaining-depth contract55Passed
charge-cache contract33Passed
truncate-signal contract{'rows': [0, 1], 'truncated': True}{'rows': [0, 1], 'truncated': True}Passed
reservation contract66Passed
release-reservation contract{'b': 2}{'b': 2}Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / b3e284b11b10e409929dbd22d71db5db36d57b0acc2c055a031e5d24ddde9813

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

Case digest / 4e2666c55f91ec316c53e18670f208076f07b79979977e79bf12563f15abe0cd