FAILURE MAP
← Case archive

FA-20886 / Assistive announcements / Open access

Canceling queued speech also removes unrelated IDs · case 01

The announcement trace violates the stated speech-backpressure contract.

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

ROOT CAUSE

Fault site: elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]] is implemented as elif e[0]=='cancel': q=[]

VERIFIED REPAIR

Restore the stated transition: elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]

Unsuccessful approach: The attempted repair substitutes elif e[0]=='cancel': q=q[1:] and still violates a regression oracle.

Case contract

Transport starts with two credits. Queue appends speech. Pump sends up to available credits, records inflight IDs and consumes credit. Acknowledge known inflight ID releases exactly one credit; unknown ACK does nothing. Window sets nonnegative capacity and credit to max(0,capacity-inflight). Disconnect moves inflight messages before queued ones in original send order and restores credits; cancel removes only queued matching IDs. Return sent text trace, inflight IDs, queue IDs and credit.

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):
    capacity=2; credit=2; q=[]; flying={}; sent=[]
    for e in events:
        if e[0]=='queue': q.append([e[1],e[2]])
        elif e[0]=='pump':
            while q and credit>0:
                ident,text=q.pop(0)
                flying[ident]=text
                sent.append(text)
                credit-=1
        elif e[0]=='ack' and e[1] in flying:
            del flying[e[1]]
            credit=max(0,capacity-len(flying))
        elif e[0]=='window':
            capacity=max(0,e[1]); credit=max(0,capacity-len(flying))
        elif e[0]=='disconnect':
            q=[[k,v] for k,v in flying.items()]+q
            flying.clear(); credit=capacity
        elif e[0]=='cancel': q=[]
    return [sent,list(flying),[x[0] for x in q],credit]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['ack','a']]", "[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['disconnect'],['pump']]", "[['window',0],['queue','a','x'*N],['pump']]", "[['window',N+2],['queue','a','alpha'],['pump'],['ack','a'],['ack','a']]", "[['queue','a','x'*N],['queue','b','y'],['cancel','b']]", "[['ack','missing'],['pump']]", "[['queue','a','x'*N],['queue','b','y'],['pump'],['window',1],['ack','a'],['pump']]"]
expected = {1: [[['alpha', 'beta'], ['b'], ['c'], 1], [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 3], [[], [], ['a'], 2], [[], [], [], 2], [['x', 'y'], ['b'], [], 0]], 2: [[['alphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalpha', 'beta', 'alphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 4], [[], [], ['a'], 2], [[], [], [], 2], [['xx', 'y'], ['b'], [], 0]], 3: [[['alphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalpha', 'beta', 'alphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 5], [[], [], ['a'], 2], [[], [], [], 2], [['xxx', 'y'], ['b'], [], 0]], 4: [[['alphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalpha', 'beta', 'alphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 6], [[], [], ['a'], 2], [[], [], [], 2], [['xxxx', 'y'], ['b'], [], 0]], 5: [[['alphaalphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalphaalpha', 'beta', 'alphaalphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 7], [[], [], ['a'], 2], [[], [], [], 2], [['xxxxx', 'y'], ['b'], [], 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[['alpha', 'beta'], ['b'], ['c'], 1][['alpha', 'beta'], ['b'], ['c'], 1]Passed
trace-2[['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0][['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0]Passed
trace-3[[], [], ['a'], 0][[], [], ['a'], 0]Passed
trace-4[['alpha'], [], [], 3][['alpha'], [], [], 3]Passed
trace-5[[], [], [], 2][[], [], ['a'], 2]Failed
trace-6[[], [], [], 2][[], [], [], 2]Passed
trace-7[['x', 'y'], ['b'], [], 0][['x', 'y'], ['b'], [], 0]Passed

SHA-256 / 56924307eddd8aa791de34ebb924aeb759c40e9e3d1b93a04280344cf2550708

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events):
    capacity=2; credit=2; q=[]; flying={}; sent=[]
    for e in events:
        if e[0]=='queue': q.append([e[1],e[2]])
        elif e[0]=='pump':
            while q and credit>0:
                ident,text=q.pop(0)
                flying[ident]=text
                sent.append(text)
                credit-=1
        elif e[0]=='ack' and e[1] in flying:
            del flying[e[1]]
            credit=max(0,capacity-len(flying))
        elif e[0]=='window':
            capacity=max(0,e[1]); credit=max(0,capacity-len(flying))
        elif e[0]=='disconnect':
            q=[[k,v] for k,v in flying.items()]+q
            flying.clear(); credit=capacity
        elif e[0]=='cancel': q=q[1:]
    return [sent,list(flying),[x[0] for x in q],credit]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['ack','a']]", "[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['disconnect'],['pump']]", "[['window',0],['queue','a','x'*N],['pump']]", "[['window',N+2],['queue','a','alpha'],['pump'],['ack','a'],['ack','a']]", "[['queue','a','x'*N],['queue','b','y'],['cancel','b']]", "[['ack','missing'],['pump']]", "[['queue','a','x'*N],['queue','b','y'],['pump'],['window',1],['ack','a'],['pump']]"]
expected = {1: [[['alpha', 'beta'], ['b'], ['c'], 1], [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 3], [[], [], ['a'], 2], [[], [], [], 2], [['x', 'y'], ['b'], [], 0]], 2: [[['alphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalpha', 'beta', 'alphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 4], [[], [], ['a'], 2], [[], [], [], 2], [['xx', 'y'], ['b'], [], 0]], 3: [[['alphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalpha', 'beta', 'alphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 5], [[], [], ['a'], 2], [[], [], [], 2], [['xxx', 'y'], ['b'], [], 0]], 4: [[['alphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalpha', 'beta', 'alphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 6], [[], [], ['a'], 2], [[], [], [], 2], [['xxxx', 'y'], ['b'], [], 0]], 5: [[['alphaalphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalphaalpha', 'beta', 'alphaalphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 7], [[], [], ['a'], 2], [[], [], [], 2], [['xxxxx', 'y'], ['b'], [], 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[['alpha', 'beta'], ['b'], ['c'], 1][['alpha', 'beta'], ['b'], ['c'], 1]Passed
trace-2[['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0][['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0]Passed
trace-3[[], [], ['a'], 0][[], [], ['a'], 0]Passed
trace-4[['alpha'], [], [], 3][['alpha'], [], [], 3]Passed
trace-5[[], [], ['b'], 2][[], [], ['a'], 2]Failed
trace-6[[], [], [], 2][[], [], [], 2]Passed
trace-7[['x', 'y'], ['b'], [], 0][['x', 'y'], ['b'], [], 0]Passed

SHA-256 / b81fc4b68f5c226756c31881cd4cf51f4514130b1986d79fbcc9e1c710eccd9a

3 / The verified repair

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

N = 1
observations = []
def solve(events):
    capacity=2; credit=2; q=[]; flying={}; sent=[]
    for e in events:
        if e[0]=='queue': q.append([e[1],e[2]])
        elif e[0]=='pump':
            while q and credit>0:
                ident,text=q.pop(0)
                flying[ident]=text
                sent.append(text)
                credit-=1
        elif e[0]=='ack' and e[1] in flying:
            del flying[e[1]]
            credit=max(0,capacity-len(flying))
        elif e[0]=='window':
            capacity=max(0,e[1]); credit=max(0,capacity-len(flying))
        elif e[0]=='disconnect':
            q=[[k,v] for k,v in flying.items()]+q
            flying.clear(); credit=capacity
        elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
    return [sent,list(flying),[x[0] for x in q],credit]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['ack','a']]", "[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['disconnect'],['pump']]", "[['window',0],['queue','a','x'*N],['pump']]", "[['window',N+2],['queue','a','alpha'],['pump'],['ack','a'],['ack','a']]", "[['queue','a','x'*N],['queue','b','y'],['cancel','b']]", "[['ack','missing'],['pump']]", "[['queue','a','x'*N],['queue','b','y'],['pump'],['window',1],['ack','a'],['pump']]"]
expected = {1: [[['alpha', 'beta'], ['b'], ['c'], 1], [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 3], [[], [], ['a'], 2], [[], [], [], 2], [['x', 'y'], ['b'], [], 0]], 2: [[['alphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalpha', 'beta', 'alphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 4], [[], [], ['a'], 2], [[], [], [], 2], [['xx', 'y'], ['b'], [], 0]], 3: [[['alphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalpha', 'beta', 'alphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 5], [[], [], ['a'], 2], [[], [], [], 2], [['xxx', 'y'], ['b'], [], 0]], 4: [[['alphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalpha', 'beta', 'alphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 6], [[], [], ['a'], 2], [[], [], [], 2], [['xxxx', 'y'], ['b'], [], 0]], 5: [[['alphaalphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalphaalpha', 'beta', 'alphaalphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 7], [[], [], ['a'], 2], [[], [], [], 2], [['xxxxx', 'y'], ['b'], [], 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[['alpha', 'beta'], ['b'], ['c'], 1][['alpha', 'beta'], ['b'], ['c'], 1]Passed
trace-2[['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0][['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0]Passed
trace-3[[], [], ['a'], 0][[], [], ['a'], 0]Passed
trace-4[['alpha'], [], [], 3][['alpha'], [], [], 3]Passed
trace-5[[], [], ['a'], 2][[], [], ['a'], 2]Passed
trace-6[[], [], [], 2][[], [], [], 2]Passed
trace-7[['x', 'y'], ['b'], [], 0][['x', 'y'], ['b'], [], 0]Passed

SHA-256 / 16e65ceb467686a05f36258ecd9dade7b2330f81cdabb3f7cf6b584c97e44bb4

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

Case digest / 33a64346adb25c6dc8ad503307a1e2dc3985ac7d07d8ee1d54f9fb15306ee3c8