FA-32466 / Menu interactions / Open access
Submenu continuation cursor is synthesized from row count · case 01
Submenu continuation cursor is synthesized from row count.
ROOT CAUSE
The lazy-pages model applies `str(len(p['items']))` at its cursor operation instead of the stipulated transformation.
VERIFIED REPAIR
Apply `p['next']` at cursor.
Unsuccessful approach: The attempted repair `p['previous']` still violates the cursor oracle.
Case contract
Lazy submenu pages retain provider order, unique IDs and opaque cursors; loading indicators disappear on final empty results.
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 == 'append':
return p['old']+[x for x in p['page'] if x not in p['old']]
if action == 'cursor':
return str(len(p['items']))
if action == 'done':
return p['next'] is None
if action == 'empty':
return [] if p['done'] and not p['items'] else p['items']
if action == 'retry':
return p['failed']
if action == 'footer':
return p['rows'][:-1]+p['page']+[p['rows'][-1]]
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('append contract', solve('append', {'old':[N],'page':[N,N+1]}), [N,N+1])
check('cursor contract', solve('cursor', {'next':'cursor'+str(N),'previous':'old','items':[1,2]}), 'cursor'+str(N))
check('done contract', solve('done', {'next':'next'+str(N),'items':[],'limit':20}), False)
check('empty contract', solve('empty', {'done':True,'items':[],'request':N}), [])
check('retry contract', solve('retry', {'failed':'failed'+str(N),'next':'next'}), 'failed'+str(N))
check('footer contract', solve('footer', {'rows':['existing','footer'],'page':['new'+str(N)]}), ['existing','new'+str(N),'footer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('retain earlier page', solve('append', {'old':[N-1,N], 'page':[N,N+1]}), [N-1,N,N+1])
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 |
|---|---|---|---|
| append contract | [1, 2] | [1, 2] | Passed |
| cursor contract | 2 | cursor1 | Failed |
| done contract | False | False | Passed |
| empty contract | [] | [] | Passed |
| retry contract | failed1 | failed1 | Passed |
| footer contract | ['existing', 'new1', 'footer'] | ['existing', 'new1', 'footer'] | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| retain earlier page | [0, 1, 2] | [0, 1, 2] | Passed |
SHA-256 / 6c7c418e4f79e23483e66d9d6f2e893e1469f4367b5c2078a320ebdb3cd01689
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 == 'append':
return p['old']+[x for x in p['page'] if x not in p['old']]
if action == 'cursor':
return p['previous']
if action == 'done':
return p['next'] is None
if action == 'empty':
return [] if p['done'] and not p['items'] else p['items']
if action == 'retry':
return p['failed']
if action == 'footer':
return p['rows'][:-1]+p['page']+[p['rows'][-1]]
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('append contract', solve('append', {'old':[N],'page':[N,N+1]}), [N,N+1])
check('cursor contract', solve('cursor', {'next':'cursor'+str(N),'previous':'old','items':[1,2]}), 'cursor'+str(N))
check('done contract', solve('done', {'next':'next'+str(N),'items':[],'limit':20}), False)
check('empty contract', solve('empty', {'done':True,'items':[],'request':N}), [])
check('retry contract', solve('retry', {'failed':'failed'+str(N),'next':'next'}), 'failed'+str(N))
check('footer contract', solve('footer', {'rows':['existing','footer'],'page':['new'+str(N)]}), ['existing','new'+str(N),'footer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('retain earlier page', solve('append', {'old':[N-1,N], 'page':[N,N+1]}), [N-1,N,N+1])
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 |
|---|---|---|---|
| append contract | [1, 2] | [1, 2] | Passed |
| cursor contract | old | cursor1 | Failed |
| done contract | False | False | Passed |
| empty contract | [] | [] | Passed |
| retry contract | failed1 | failed1 | Passed |
| footer contract | ['existing', 'new1', 'footer'] | ['existing', 'new1', 'footer'] | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| retain earlier page | [0, 1, 2] | [0, 1, 2] | Passed |
SHA-256 / 8443b00999589e20a807ee288a7c2393b94595ba6a7b8d297908b7f6d3ea96cf
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 == 'append':
return p['old']+[x for x in p['page'] if x not in p['old']]
if action == 'cursor':
return p['next']
if action == 'done':
return p['next'] is None
if action == 'empty':
return [] if p['done'] and not p['items'] else p['items']
if action == 'retry':
return p['failed']
if action == 'footer':
return p['rows'][:-1]+p['page']+[p['rows'][-1]]
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('append contract', solve('append', {'old':[N],'page':[N,N+1]}), [N,N+1])
check('cursor contract', solve('cursor', {'next':'cursor'+str(N),'previous':'old','items':[1,2]}), 'cursor'+str(N))
check('done contract', solve('done', {'next':'next'+str(N),'items':[],'limit':20}), False)
check('empty contract', solve('empty', {'done':True,'items':[],'request':N}), [])
check('retry contract', solve('retry', {'failed':'failed'+str(N),'next':'next'}), 'failed'+str(N))
check('footer contract', solve('footer', {'rows':['existing','footer'],'page':['new'+str(N)]}), ['existing','new'+str(N),'footer'])
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('retain earlier page', solve('append', {'old':[N-1,N], 'page':[N,N+1]}), [N-1,N,N+1])
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 |
|---|---|---|---|
| append contract | [1, 2] | [1, 2] | Passed |
| cursor contract | cursor1 | cursor1 | Passed |
| done contract | False | False | Passed |
| empty contract | [] | [] | Passed |
| retry contract | failed1 | failed1 | Passed |
| footer contract | ['existing', 'new1', 'footer'] | ['existing', 'new1', 'footer'] | Passed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
| retain earlier page | [0, 1, 2] | [0, 1, 2] | Passed |
SHA-256 / 5bfca9a8ddb800e3b119f9f1ba50be7331836d94de2996ce55181293459161f6
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:12.489268+00:00.
Case digest / 00368b67dd5ec8c3180ed64e88aa52580511f8405fdd4eb9f069245885becc71