FAILURE MAP
← Case archive

FA-21711 / Assistive announcements / Open access

Repeated item ID creates duplicate spoken list item · case 01

The announcement trace violates the stated list-change-narration contract.

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

ROOT CAUSE

Fault site: if index is not None: items[index][1]=e[2] is implemented as if index is not None: items.append([e[1],e[2]])

THE FAILURE

Fault site: if index is not None: items[index][1]=e[2] is implemented as if index is not None: items.append([e[1],e[2]])

Unsuccessful approach: The attempted repair substitutes if index is not None: pass and still violates a regression oracle.

Case contract

An ordered collection maps unique item IDs to spoken labels. Add inserts at clamped zero-based position; existing ID updates label without moving. Remove announces old one-based position. Move removes then inserts at clamped destination and announces old/new positions. Rename announces old/new labels. Begin silences individual cues while accumulating cue count; end announces only count and clears batching. Reset clears list with no cue. Count command reports current cardinality. Return cues and ordered [id,label].

Why this case matters

Deterministic controlled model of assistive announcement delivery.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    items=[]; batching=False; changes=0; out=[]
    for e in events:
        op=e[0]; cue=None
        index=next((i for i,x in enumerate(items) if len(e)>1 and x[0]==e[1]),None)
        if op=='begin': batching=True; changes=0
        elif op=='end':
            if batching and changes: out.append(['changes',changes])
            batching=False; changes=0
        elif op=='reset': items=[]
        elif op=='count': out.append(['count',len(items)])
        elif op=='add':
            if index is not None: items.append([e[1],e[2]])
            else:
                position=max(0,min(len(items),e[3])); items.insert(position,[e[1],e[2]])
                cue=['added',e[2],position+1]
        elif index is not None:
            if op=='remove':
                item=items.pop(index); cue=['removed',item[1],index+1]
            elif op=='rename': cue=['renamed',items[index][1],e[2]]; items[index][1]=e[2]
            elif op=='move':
                item=items.pop(index); position=max(0,min(len(items),e[2])); items.insert(position,item)
                cue=['moved',item[1],index+1,position+1]
        if cue is not None:
            if batching: changes+=1
            else: out.append(cue)
    return [out,items,batching,changes]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['add','a','Alpha'*N,0],['add','b','Beta',0],['add','c','Gamma',1],['count'],['remove','c']]", "[['add','a','Old',0],['add','a','New'*N,4],['rename','a','Latest']]", "[['add','a','A'*N,0],['add','b','B',1],['add','c','C',2],['move','a',99],['move','c',0]]", "[['begin'],['add','a','A'*N,0],['add','b','B',1],['end'],['begin'],['end']]", "[['add','a','A'*N,0],['reset'],['count']]", "[['remove','missing'],['move','missing',N],['end']]", '[]']
expected = {1: [[[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'New', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0], [[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0], [[['added', 'A', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 2: [[[['added', 'AlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AA']], False, 0], [[['changes', 2]], [['a', 'AA'], ['b', 'B']], False, 0], [[['added', 'AA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 3: [[[['added', 'AlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAA']], False, 0], [[['changes', 2]], [['a', 'AAA'], ['b', 'B']], False, 0], [[['added', 'AAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 4: [[[['added', 'AlphaAlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAAA']], False, 0], [[['changes', 2]], [['a', 'AAAA'], ['b', 'B']], False, 0], [[['added', 'AAAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 5: [[[['added', 'AlphaAlphaAlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAAAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAAAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAAAA']], False, 0], [[['changes', 2]], [['a', 'AAAAA'], ['b', 'B']], False, 0], [[['added', 'AAAAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]]}[N]
for i, expression in enumerate(fixtures):
    check("trace-"+str(i+1), solve(eval(expression)), expected[i])
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
trace-1[[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0][[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0]Passed
trace-2[[['added', 'Old', 1], ['renamed', 'Old', 'Latest']], [['a', 'Latest'], ['a', 'New']], False, 0][[['added', 'Old', 1], ['renamed', 'New', 'Latest']], [['a', 'Latest']], False, 0]Failed
trace-3[[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0][[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0]Passed
trace-4[[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0][[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0]Passed
trace-5[[['added', 'A', 1], ['count', 0]], [], False, 0][[['added', 'A', 1], ['count', 0]], [], False, 0]Passed
trace-6[[], [], False, 0][[], [], False, 0]Passed
trace-7[[], [], False, 0][[], [], False, 0]Passed

SHA-256 / 3285ad036ed3b7e17cae3b02d8744df26e2eb34f2281871a01f0bd0250ec31da

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    items=[]; batching=False; changes=0; out=[]
    for e in events:
        op=e[0]; cue=None
        index=next((i for i,x in enumerate(items) if len(e)>1 and x[0]==e[1]),None)
        if op=='begin': batching=True; changes=0
        elif op=='end':
            if batching and changes: out.append(['changes',changes])
            batching=False; changes=0
        elif op=='reset': items=[]
        elif op=='count': out.append(['count',len(items)])
        elif op=='add':
            if index is not None: pass
            else:
                position=max(0,min(len(items),e[3])); items.insert(position,[e[1],e[2]])
                cue=['added',e[2],position+1]
        elif index is not None:
            if op=='remove':
                item=items.pop(index); cue=['removed',item[1],index+1]
            elif op=='rename': cue=['renamed',items[index][1],e[2]]; items[index][1]=e[2]
            elif op=='move':
                item=items.pop(index); position=max(0,min(len(items),e[2])); items.insert(position,item)
                cue=['moved',item[1],index+1,position+1]
        if cue is not None:
            if batching: changes+=1
            else: out.append(cue)
    return [out,items,batching,changes]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['add','a','Alpha'*N,0],['add','b','Beta',0],['add','c','Gamma',1],['count'],['remove','c']]", "[['add','a','Old',0],['add','a','New'*N,4],['rename','a','Latest']]", "[['add','a','A'*N,0],['add','b','B',1],['add','c','C',2],['move','a',99],['move','c',0]]", "[['begin'],['add','a','A'*N,0],['add','b','B',1],['end'],['begin'],['end']]", "[['add','a','A'*N,0],['reset'],['count']]", "[['remove','missing'],['move','missing',N],['end']]", '[]']
expected = {1: [[[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'New', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0], [[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0], [[['added', 'A', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 2: [[[['added', 'AlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AA']], False, 0], [[['changes', 2]], [['a', 'AA'], ['b', 'B']], False, 0], [[['added', 'AA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 3: [[[['added', 'AlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAA']], False, 0], [[['changes', 2]], [['a', 'AAA'], ['b', 'B']], False, 0], [[['added', 'AAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 4: [[[['added', 'AlphaAlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAAA']], False, 0], [[['changes', 2]], [['a', 'AAAA'], ['b', 'B']], False, 0], [[['added', 'AAAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]], 5: [[[['added', 'AlphaAlphaAlphaAlphaAlpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'AlphaAlphaAlphaAlphaAlpha']], False, 0], [[['added', 'Old', 1], ['renamed', 'NewNewNewNewNew', 'Latest']], [['a', 'Latest']], False, 0], [[['added', 'AAAAA', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'AAAAA', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'AAAAA']], False, 0], [[['changes', 2]], [['a', 'AAAAA'], ['b', 'B']], False, 0], [[['added', 'AAAAA', 1], ['count', 0]], [], False, 0], [[], [], False, 0], [[], [], False, 0]]}[N]
for i, expression in enumerate(fixtures):
    check("trace-"+str(i+1), solve(eval(expression)), expected[i])
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
trace-1[[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0][[['added', 'Alpha', 1], ['added', 'Beta', 1], ['added', 'Gamma', 2], ['count', 3], ['removed', 'Gamma', 2]], [['b', 'Beta'], ['a', 'Alpha']], False, 0]Passed
trace-2[[['added', 'Old', 1], ['renamed', 'Old', 'Latest']], [['a', 'Latest']], False, 0][[['added', 'Old', 1], ['renamed', 'New', 'Latest']], [['a', 'Latest']], False, 0]Failed
trace-3[[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0][[['added', 'A', 1], ['added', 'B', 2], ['added', 'C', 3], ['moved', 'A', 1, 3], ['moved', 'C', 2, 1]], [['c', 'C'], ['b', 'B'], ['a', 'A']], False, 0]Passed
trace-4[[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0][[['changes', 2]], [['a', 'A'], ['b', 'B']], False, 0]Passed
trace-5[[['added', 'A', 1], ['count', 0]], [], False, 0][[['added', 'A', 1], ['count', 0]], [], False, 0]Passed
trace-6[[], [], False, 0][[], [], False, 0]Passed
trace-7[[], [], False, 0][[], [], False, 0]Passed

SHA-256 / 5e4247bce699323184c880c1d55b1f987b104ee5427e188f8071c97c524d4796

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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

Stipulated bounded policy, not a browser, speech engine, platform API, or standards conformance claim. 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:40:31.636853+00:00.

Case digest / 43c9450a21f17776fa0872f72f1cca4d3457439110b39668e229e3d0f90db3ca