FAILURE MAP
← Case archive

FA-21046 / Assistive announcements / Open access

Latest delivered speech becomes oldest history item · 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: history.append([e[1],e[2]]) is implemented as history.insert(0,[e[1],e[2]])

THE FAILURE

Fault site: history.append([e[1],e[2]]) is implemented as history.insert(0,[e[1],e[2]])

Unsuccessful approach: The attempted repair substitutes history.append([e[2],e[1]]) 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.insert(0,[e[1],e[2]])
            history=history[-limit:]
            cursor=len(history)
            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', 'word0', 'word1', 'word2', 'word2'], [['2', 'word2'], ['1', 'word1'], ['0', 'word0']], 0][['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0]Failed
trace-2[['same', 'same'], [['b', 'same'], ['a', 'same']], 2][['same', 'same'], [['a', 'same'], ['b', 'same']], 2]Failed
trace-3[['same', 'same', 'new', 'new'], [['a', 'new'], ['b', 'same']], 2][['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2]Failed
trace-4[['alpha', 'beta', 'alpha', 'gamma', 'alpha'], [['c', 'gamma'], ['b', 'beta'], ['a', 'alpha']], 2][['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2]Failed
trace-5[['alpha', 'beta', 'gamma', 'beta'], [['c', 'gamma'], ['b', 'beta']], 1][['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1]Failed
trace-6[['alpha'], [], 0][['alpha'], [], 0]Passed
trace-7[['a', 'b', 'c', 'a'], [['a', 'a']], 0][['a', 'b', 'c', 'c'], [['c', 'c']], 0]Failed
trace-8[[], [], 0][[], [], 0]Passed

SHA-256 / ec8360f41429fc09c8f25354e302e3228a41499603b88e407fc570a1c1e27078

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[2],e[1]])
            history=history[-limit:]
            cursor=len(history)
            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', '4', '3', '2', '2'], [['word2', '2'], ['word3', '3'], ['word4', '4']], 0][['word0', 'word1', 'word2', 'word3', 'word4', 'word4', 'word3', 'word2', 'word2'], [['2', 'word2'], ['3', 'word3'], ['4', 'word4']], 0]Failed
trace-2[['same', 'same'], [['same', 'a'], ['same', 'b']], 2][['same', 'same'], [['a', 'same'], ['b', 'same']], 2]Failed
trace-3[['same', 'same', 'new'], [['same', 'a'], ['same', 'b'], ['new', 'a']], 3][['same', 'same', 'new', 'new'], [['b', 'same'], ['a', 'new']], 2]Failed
trace-4[['alpha', 'beta', 'b', 'gamma', 'c'], [['alpha', 'a'], ['beta', 'b'], ['gamma', 'c']], 2][['alpha', 'beta', 'beta', 'gamma', 'gamma'], [['a', 'alpha'], ['b', 'beta'], ['c', 'gamma']], 2]Failed
trace-5[['alpha', 'beta', 'gamma', 'c'], [['alpha', 'a'], ['beta', 'b'], ['gamma', 'c']], 2][['alpha', 'beta', 'gamma', 'gamma'], [['b', 'beta'], ['c', 'gamma']], 1]Failed
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 / 0ab0a303174b87c69cfc7eea2878be7a526d27467354965cf468ec50432b0e41

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 / 9d3c65569499ccabd677339790a5e69319b6493546c96db203aee606e5c663e4