FAILURE MAP
← Case archive

FA-21056 / Assistive announcements / Open access

New speech does not reset replay navigation · case 01

The announcement trace violates the stated speech-history contract.

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

ROOT CAUSE

Fault site: cursor=len(history) out.append is implemented as cursor=0 out.append

THE FAILURE

Fault site: cursor=len(history) out.append is implemented as cursor=0 out.append

Unsuccessful approach: The attempted repair substitutes cursor=max(0,len(history)-1) out.append and still violates a regression oracle.

Case contract

History retains the last three delivered utterances [id,text], newest last. Deliver same ID replaces its prior record and moves it newest. Replay speaks selected history text without adding history. Previous walks a separate cursor newest to oldest and clamps at oldest. Deliver resets cursor to newest. Forget deletes one ID and resets cursor. Clear removes history without changing spoken output. Limit clamps to at least one and trims oldest. Report spoken and history.

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):
    history=[]; out=[]; cursor=0; limit=3
    for e in events:
        if e[0]=='deliver':
            history=[x for x in history if x[0]!=e[1]]
            history.append([e[1],e[2]])
            history=history[-limit:]
            cursor=0
            out.append(e[2])
        elif e[0]=='replay':
            match=next((x for x in history if x[0]==e[1]),None)
            if match: out.append(match[1])
        elif e[0]=='previous' and history:
            cursor=max(0,cursor-1)
            out.append(history[cursor][1])
        elif e[0]=='forget': history=[x for x in history if x[0]!=e[1]]; cursor=len(history)
        elif e[0]=='clear': history=[]; cursor=0
        elif e[0]=='limit': limit=max(1,e[1]); history=history[-limit:]; cursor=len(history)
    return [out,history,cursor]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['deliver',str(i),'word'*N+str(i)] for i in range(N+4)]+[['previous'],['previous'],['previous'],['previous']]", "[['deliver','a','same'*N],['deliver','b','same'*N]]", "[['deliver','a','same'*N],['deliver','b','same'*N],['deliver','a','new'],['replay','a']]", "[['deliver','a','alpha'*N],['deliver','b','beta'],['previous'],['deliver','c','gamma'],['previous']]", "[['deliver','a','alpha'*N],['deliver','b','beta'],['deliver','c','gamma'],['forget','a'],['previous']]", "[['deliver','a','alpha'*N],['clear'],['replay','a']]", "[['deliver','a','a'*N],['deliver','b','b'],['deliver','c','c'],['limit',1],['previous']]", '[]']
expected = {1: [[['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0], [['same', 'same'], [['a', 'same'], ['b', 'same']], 2], [['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2], [['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alpha'], [], 0], [['a', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 2: [[['wordword0', 'wordword1', 'wordword2', 'wordword3', 'wordword4', 'wordword5', 'wordword5', 'wordword4', 'wordword3', 'wordword3'], [['3', 'wordword3'], ['4', 'wordword4'], ['5', 'wordword5']], 0], [['samesame', 'samesame'], [['a', 'samesame'], ['b', 'samesame']], 2], [['samesame', 'samesame', 'new', 'new'], [['b', 'samesame'], ['a', 'new']], 2], [['alphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalpha'], [], 0], [['aa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 3: [[['wordwordword0', 'wordwordword1', 'wordwordword2', 'wordwordword3', 'wordwordword4', 'wordwordword5', 'wordwordword6', 'wordwordword6', 'wordwordword5', 'wordwordword4', 'wordwordword4'], [['4', 'wordwordword4'], ['5', 'wordwordword5'], ['6', 'wordwordword6']], 0], [['samesamesame', 'samesamesame'], [['a', 'samesamesame'], ['b', 'samesamesame']], 2], [['samesamesame', 'samesamesame', 'new', 'new'], [['b', 'samesamesame'], ['a', 'new']], 2], [['alphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalpha'], [], 0], [['aaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 4: [[['wordwordwordword0', 'wordwordwordword1', 'wordwordwordword2', 'wordwordwordword3', 'wordwordwordword4', 'wordwordwordword5', 'wordwordwordword6', 'wordwordwordword7', 'wordwordwordword7', 'wordwordwordword6', 'wordwordwordword5', 'wordwordwordword5'], [['5', 'wordwordwordword5'], ['6', 'wordwordwordword6'], ['7', 'wordwordwordword7']], 0], [['samesamesamesame', 'samesamesamesame'], [['a', 'samesamesamesame'], ['b', 'samesamesamesame']], 2], [['samesamesamesame', 'samesamesamesame', 'new', 'new'], [['b', 'samesamesamesame'], ['a', 'new']], 2], [['alphaalphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalphaalpha'], [], 0], [['aaaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 5: [[['wordwordwordwordword0', 'wordwordwordwordword1', 'wordwordwordwordword2', 'wordwordwordwordword3', 'wordwordwordwordword4', 'wordwordwordwordword5', 'wordwordwordwordword6', 'wordwordwordwordword7', 'wordwordwordwordword8', 'wordwordwordwordword8', 'wordwordwordwordword7', 'wordwordwordwordword6', 'wordwordwordwordword6'], [['6', 'wordwordwordwordword6'], ['7', 'wordwordwordwordword7'], ['8', 'wordwordwordwordword8']], 0], [['samesamesamesamesame', 'samesamesamesamesame'], [['a', 'samesamesamesamesame'], ['b', 'samesamesamesamesame']], 2], [['samesamesamesamesame', 'samesamesamesamesame', 'new', 'new'], [['b', 'samesamesamesamesame'], ['a', 'new']], 2], [['alphaalphaalphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalphaalphaalpha'], [], 0], [['aaaaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 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[['word0', 'word1', 'word2', 'word3', 'word4', 'word2', 'word2', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0][['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0]Failed
trace-2[['same', 'same'], [['a', 'same'], ['b', 'same']], 0][['same', 'same'], [['a', 'same'], ['b', 'same']], 2]Failed
trace-3[['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 0][['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2]Failed
trace-4[['alpha', 'beta', 'alpha', 'gamma', 'alpha'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 0][['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2]Failed
trace-5[['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1][['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1]Passed
trace-6[['alpha'], [], 0][['alpha'], [], 0]Passed
trace-7[['a', 'b', 'c', 'c'], [['c', 'c']], 0][['a', 'b', 'c', 'c'], [['c', 'c']], 0]Passed
trace-8[[], [], 0][[], [], 0]Passed

SHA-256 / ec362dc12cdd70652e3f7888d8c8ab4d7b9de72f7f7afe98d7bcae425ba9daae

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events):
    history=[]; out=[]; cursor=0; limit=3
    for e in events:
        if e[0]=='deliver':
            history=[x for x in history if x[0]!=e[1]]
            history.append([e[1],e[2]])
            history=history[-limit:]
            cursor=max(0,len(history)-1)
            out.append(e[2])
        elif e[0]=='replay':
            match=next((x for x in history if x[0]==e[1]),None)
            if match: out.append(match[1])
        elif e[0]=='previous' and history:
            cursor=max(0,cursor-1)
            out.append(history[cursor][1])
        elif e[0]=='forget': history=[x for x in history if x[0]!=e[1]]; cursor=len(history)
        elif e[0]=='clear': history=[]; cursor=0
        elif e[0]=='limit': limit=max(1,e[1]); history=history[-limit:]; cursor=len(history)
    return [out,history,cursor]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['deliver',str(i),'word'*N+str(i)] for i in range(N+4)]+[['previous'],['previous'],['previous'],['previous']]", "[['deliver','a','same'*N],['deliver','b','same'*N]]", "[['deliver','a','same'*N],['deliver','b','same'*N],['deliver','a','new'],['replay','a']]", "[['deliver','a','alpha'*N],['deliver','b','beta'],['previous'],['deliver','c','gamma'],['previous']]", "[['deliver','a','alpha'*N],['deliver','b','beta'],['deliver','c','gamma'],['forget','a'],['previous']]", "[['deliver','a','alpha'*N],['clear'],['replay','a']]", "[['deliver','a','a'*N],['deliver','b','b'],['deliver','c','c'],['limit',1],['previous']]", '[]']
expected = {1: [[['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0], [['same', 'same'], [['a', 'same'], ['b', 'same']], 2], [['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2], [['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alpha'], [], 0], [['a', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 2: [[['wordword0', 'wordword1', 'wordword2', 'wordword3', 'wordword4', 'wordword5', 'wordword5', 'wordword4', 'wordword3', 'wordword3'], [['3', 'wordword3'], ['4', 'wordword4'], ['5', 'wordword5']], 0], [['samesame', 'samesame'], [['a', 'samesame'], ['b', 'samesame']], 2], [['samesame', 'samesame', 'new', 'new'], [['b', 'samesame'], ['a', 'new']], 2], [['alphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalpha'], [], 0], [['aa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 3: [[['wordwordword0', 'wordwordword1', 'wordwordword2', 'wordwordword3', 'wordwordword4', 'wordwordword5', 'wordwordword6', 'wordwordword6', 'wordwordword5', 'wordwordword4', 'wordwordword4'], [['4', 'wordwordword4'], ['5', 'wordwordword5'], ['6', 'wordwordword6']], 0], [['samesamesame', 'samesamesame'], [['a', 'samesamesame'], ['b', 'samesamesame']], 2], [['samesamesame', 'samesamesame', 'new', 'new'], [['b', 'samesamesame'], ['a', 'new']], 2], [['alphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalpha'], [], 0], [['aaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 4: [[['wordwordwordword0', 'wordwordwordword1', 'wordwordwordword2', 'wordwordwordword3', 'wordwordwordword4', 'wordwordwordword5', 'wordwordwordword6', 'wordwordwordword7', 'wordwordwordword7', 'wordwordwordword6', 'wordwordwordword5', 'wordwordwordword5'], [['5', 'wordwordwordword5'], ['6', 'wordwordwordword6'], ['7', 'wordwordwordword7']], 0], [['samesamesamesame', 'samesamesamesame'], [['a', 'samesamesamesame'], ['b', 'samesamesamesame']], 2], [['samesamesamesame', 'samesamesamesame', 'new', 'new'], [['b', 'samesamesamesame'], ['a', 'new']], 2], [['alphaalphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalphaalpha'], [], 0], [['aaaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 0]], 5: [[['wordwordwordwordword0', 'wordwordwordwordword1', 'wordwordwordwordword2', 'wordwordwordwordword3', 'wordwordwordwordword4', 'wordwordwordwordword5', 'wordwordwordwordword6', 'wordwordwordwordword7', 'wordwordwordwordword8', 'wordwordwordwordword8', 'wordwordwordwordword7', 'wordwordwordwordword6', 'wordwordwordwordword6'], [['6', 'wordwordwordwordword6'], ['7', 'wordwordwordwordword7'], ['8', 'wordwordwordwordword8']], 0], [['samesamesamesamesame', 'samesamesamesamesame'], [['a', 'samesamesamesamesame'], ['b', 'samesamesamesamesame']], 2], [['samesamesamesamesame', 'samesamesamesamesame', 'new', 'new'], [['b', 'samesamesamesamesame'], ['a', 'new']], 2], [['alphaalphaalphaalphaalpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alphaalphaalphaalphaalpha'], ['b', 'beta'], ['c', 'gamma']], 2], [['alphaalphaalphaalphaalpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1], [['alphaalphaalphaalphaalpha'], [], 0], [['aaaaa', 'b', 'c', 'c'], [['c', 'c']], 0], [[], [], 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[['word0', 'word1', 'word2', 'word3', 'word4', 'word3', 'word2', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0][['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0]Failed
trace-2[['same', 'same'], [['a', 'same'], ['b', 'same']], 1][['same', 'same'], [['a', 'same'], ['b', 'same']], 2]Failed
trace-3[['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 1][['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2]Failed
trace-4[['alpha', 'beta', 'alpha', 'gamma', 'beta'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 1][['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2]Failed
trace-5[['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1][['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1]Passed
trace-6[['alpha'], [], 0][['alpha'], [], 0]Passed
trace-7[['a', 'b', 'c', 'c'], [['c', 'c']], 0][['a', 'b', 'c', 'c'], [['c', 'c']], 0]Passed
trace-8[[], [], 0][[], [], 0]Passed

SHA-256 / 119b49e76a403f383071d0306973f6a0c5659a7c1d7321b122f9157f72655811

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 8 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:25.269453+00:00.

Case digest / 5d22653611515d326a47132cf77203331e43ced282e1761f21a37985c42ceff3