FAILURE MAP
← Case archive

FA-21276 / Assistive announcements / Open access

Bypass dispatch removes blocked head instead of fitting speech · case 01

The announcement trace violates the stated speech-time-budget contract.

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

ROOT CAUSE

Fault site: ident,text,cost=q.pop(index) is implemented as ident,text,cost=q[index]; q.pop(0)

VERIFIED REPAIR

Restore the stated transition: ident,text,cost=q.pop(index)

Unsuccessful approach: The attempted repair substitutes ident,text,cost=q[index] and still violates a regression oracle.

Case contract

Each turn has a spoken-character budget. Enqueue [id,text,cost] with positive cost. Begin replaces remaining budget. Pump selects first queued job that fits, allowing later small jobs to bypass large ones; sends one and subtracts its cost. Refund restores cost of a sent ID once, without requeueing. Cancel removes only unsent ID. Cap limits remaining credit immediately. Reset clears queue and refund ledger. Return speech IDs, queue IDs, remaining, cap.

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):
    remaining=0; cap=100; q=[]; spent={}; out=[]
    for e in events:
        if e[0]=='begin': remaining=min(cap,max(0,e[1]))
        elif e[0]=='enqueue': q.append(e[1:])
        elif e[0]=='cap': cap=max(0,e[1]); remaining=min(remaining,cap)
        elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
        elif e[0]=='refund' and e[1] in spent:
            remaining=min(cap,remaining+spent.pop(e[1]))
        elif e[0]=='reset': q=[]; spent={}; remaining=0
        elif e[0]=='pump':
            index=next((i for i,x in enumerate(q) if x[2]<=remaining),None)
            if index is not None:
                ident,text,cost=q[index]; q.pop(0)
                remaining-=cost
                spent[ident]=cost
                out.append([ident,text])
    return [out,[x[0] for x in q],remaining,cap]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',N+4],['enqueue','big','large',N+8],['enqueue','small','tiny',N+1],['pump'],['refund','small'],['refund','small']]", "[['begin',N],['enqueue','exact','x'*N,N],['pump']]", "[['begin',N+5],['begin',2]]", "[['begin',N+5],['begin',2],['cap',1],['cap',8]]", "[['cap',3],['begin',N+10]]", "[['enqueue','a','alpha'*N,2],['enqueue','b','beta',1],['cancel','b']]", "[['begin',N+10],['enqueue','a','alpha',2],['pump'],['refund','a']]", "[['begin',N+5],['enqueue','a','alpha',2],['pump']]", "[['begin',N+5],['enqueue','a','alpha',2],['enqueue','b','beta',1],['pump'],['reset'],['refund','a']]", '[]']
expected = {1: [[[['small', 'tiny']], ['big'], 5, 100], [[['exact', 'x']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 11, 100], [[['a', 'alpha']], [], 4, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 2: [[[['small', 'tiny']], ['big'], 6, 100], [[['exact', 'xx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 12, 100], [[['a', 'alpha']], [], 5, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 3: [[[['small', 'tiny']], ['big'], 7, 100], [[['exact', 'xxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 13, 100], [[['a', 'alpha']], [], 6, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 4: [[[['small', 'tiny']], ['big'], 8, 100], [[['exact', 'xxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 14, 100], [[['a', 'alpha']], [], 7, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 5: [[[['small', 'tiny']], ['big'], 9, 100], [[['exact', 'xxxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 15, 100], [[['a', 'alpha']], [], 8, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]]}[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[[['small', 'tiny']], ['small'], 5, 100][[['small', 'tiny']], ['big'], 5, 100]Failed
trace-2[[['exact', 'x']], [], 0, 100][[['exact', 'x']], [], 0, 100]Passed
trace-3[[], [], 2, 100][[], [], 2, 100]Passed
trace-4[[], [], 1, 8][[], [], 1, 8]Passed
trace-5[[], [], 3, 3][[], [], 3, 3]Passed
trace-6[[], ['a'], 0, 100][[], ['a'], 0, 100]Passed
trace-7[[['a', 'alpha']], [], 11, 100][[['a', 'alpha']], [], 11, 100]Passed
trace-8[[['a', 'alpha']], [], 4, 100][[['a', 'alpha']], [], 4, 100]Passed
trace-9[[['a', 'alpha']], [], 0, 100][[['a', 'alpha']], [], 0, 100]Passed
trace-10[[], [], 0, 100][[], [], 0, 100]Passed

SHA-256 / 6a581539aca843d0c94a7648bbed3498ebabb31dab741f23d894b976ab6e4849

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events):
    remaining=0; cap=100; q=[]; spent={}; out=[]
    for e in events:
        if e[0]=='begin': remaining=min(cap,max(0,e[1]))
        elif e[0]=='enqueue': q.append(e[1:])
        elif e[0]=='cap': cap=max(0,e[1]); remaining=min(remaining,cap)
        elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
        elif e[0]=='refund' and e[1] in spent:
            remaining=min(cap,remaining+spent.pop(e[1]))
        elif e[0]=='reset': q=[]; spent={}; remaining=0
        elif e[0]=='pump':
            index=next((i for i,x in enumerate(q) if x[2]<=remaining),None)
            if index is not None:
                ident,text,cost=q[index]
                remaining-=cost
                spent[ident]=cost
                out.append([ident,text])
    return [out,[x[0] for x in q],remaining,cap]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',N+4],['enqueue','big','large',N+8],['enqueue','small','tiny',N+1],['pump'],['refund','small'],['refund','small']]", "[['begin',N],['enqueue','exact','x'*N,N],['pump']]", "[['begin',N+5],['begin',2]]", "[['begin',N+5],['begin',2],['cap',1],['cap',8]]", "[['cap',3],['begin',N+10]]", "[['enqueue','a','alpha'*N,2],['enqueue','b','beta',1],['cancel','b']]", "[['begin',N+10],['enqueue','a','alpha',2],['pump'],['refund','a']]", "[['begin',N+5],['enqueue','a','alpha',2],['pump']]", "[['begin',N+5],['enqueue','a','alpha',2],['enqueue','b','beta',1],['pump'],['reset'],['refund','a']]", '[]']
expected = {1: [[[['small', 'tiny']], ['big'], 5, 100], [[['exact', 'x']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 11, 100], [[['a', 'alpha']], [], 4, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 2: [[[['small', 'tiny']], ['big'], 6, 100], [[['exact', 'xx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 12, 100], [[['a', 'alpha']], [], 5, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 3: [[[['small', 'tiny']], ['big'], 7, 100], [[['exact', 'xxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 13, 100], [[['a', 'alpha']], [], 6, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 4: [[[['small', 'tiny']], ['big'], 8, 100], [[['exact', 'xxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 14, 100], [[['a', 'alpha']], [], 7, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 5: [[[['small', 'tiny']], ['big'], 9, 100], [[['exact', 'xxxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 15, 100], [[['a', 'alpha']], [], 8, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]]}[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[[['small', 'tiny']], ['big', 'small'], 5, 100][[['small', 'tiny']], ['big'], 5, 100]Failed
trace-2[[['exact', 'x']], ['exact'], 0, 100][[['exact', 'x']], [], 0, 100]Failed
trace-3[[], [], 2, 100][[], [], 2, 100]Passed
trace-4[[], [], 1, 8][[], [], 1, 8]Passed
trace-5[[], [], 3, 3][[], [], 3, 3]Passed
trace-6[[], ['a'], 0, 100][[], ['a'], 0, 100]Passed
trace-7[[['a', 'alpha']], ['a'], 11, 100][[['a', 'alpha']], [], 11, 100]Failed
trace-8[[['a', 'alpha']], ['a'], 4, 100][[['a', 'alpha']], [], 4, 100]Failed
trace-9[[['a', 'alpha']], [], 0, 100][[['a', 'alpha']], [], 0, 100]Passed
trace-10[[], [], 0, 100][[], [], 0, 100]Passed

SHA-256 / 178169f47929c44ef10d1707b02dca98adbefa2430663ed02624ce27618e21b4

3 / The verified repair

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

N = 1
observations = []
def solve(events):
    remaining=0; cap=100; q=[]; spent={}; out=[]
    for e in events:
        if e[0]=='begin': remaining=min(cap,max(0,e[1]))
        elif e[0]=='enqueue': q.append(e[1:])
        elif e[0]=='cap': cap=max(0,e[1]); remaining=min(remaining,cap)
        elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
        elif e[0]=='refund' and e[1] in spent:
            remaining=min(cap,remaining+spent.pop(e[1]))
        elif e[0]=='reset': q=[]; spent={}; remaining=0
        elif e[0]=='pump':
            index=next((i for i,x in enumerate(q) if x[2]<=remaining),None)
            if index is not None:
                ident,text,cost=q.pop(index)
                remaining-=cost
                spent[ident]=cost
                out.append([ident,text])
    return [out,[x[0] for x in q],remaining,cap]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',N+4],['enqueue','big','large',N+8],['enqueue','small','tiny',N+1],['pump'],['refund','small'],['refund','small']]", "[['begin',N],['enqueue','exact','x'*N,N],['pump']]", "[['begin',N+5],['begin',2]]", "[['begin',N+5],['begin',2],['cap',1],['cap',8]]", "[['cap',3],['begin',N+10]]", "[['enqueue','a','alpha'*N,2],['enqueue','b','beta',1],['cancel','b']]", "[['begin',N+10],['enqueue','a','alpha',2],['pump'],['refund','a']]", "[['begin',N+5],['enqueue','a','alpha',2],['pump']]", "[['begin',N+5],['enqueue','a','alpha',2],['enqueue','b','beta',1],['pump'],['reset'],['refund','a']]", '[]']
expected = {1: [[[['small', 'tiny']], ['big'], 5, 100], [[['exact', 'x']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 11, 100], [[['a', 'alpha']], [], 4, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 2: [[[['small', 'tiny']], ['big'], 6, 100], [[['exact', 'xx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 12, 100], [[['a', 'alpha']], [], 5, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 3: [[[['small', 'tiny']], ['big'], 7, 100], [[['exact', 'xxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 13, 100], [[['a', 'alpha']], [], 6, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 4: [[[['small', 'tiny']], ['big'], 8, 100], [[['exact', 'xxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 14, 100], [[['a', 'alpha']], [], 7, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]], 5: [[[['small', 'tiny']], ['big'], 9, 100], [[['exact', 'xxxxx']], [], 0, 100], [[], [], 2, 100], [[], [], 1, 8], [[], [], 3, 3], [[], ['a'], 0, 100], [[['a', 'alpha']], [], 15, 100], [[['a', 'alpha']], [], 8, 100], [[['a', 'alpha']], [], 0, 100], [[], [], 0, 100]]}[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[[['small', 'tiny']], ['big'], 5, 100][[['small', 'tiny']], ['big'], 5, 100]Passed
trace-2[[['exact', 'x']], [], 0, 100][[['exact', 'x']], [], 0, 100]Passed
trace-3[[], [], 2, 100][[], [], 2, 100]Passed
trace-4[[], [], 1, 8][[], [], 1, 8]Passed
trace-5[[], [], 3, 3][[], [], 3, 3]Passed
trace-6[[], ['a'], 0, 100][[], ['a'], 0, 100]Passed
trace-7[[['a', 'alpha']], [], 11, 100][[['a', 'alpha']], [], 11, 100]Passed
trace-8[[['a', 'alpha']], [], 4, 100][[['a', 'alpha']], [], 4, 100]Passed
trace-9[[['a', 'alpha']], [], 0, 100][[['a', 'alpha']], [], 0, 100]Passed
trace-10[[], [], 0, 100][[], [], 0, 100]Passed

SHA-256 / bdbc4319fb090e4a978938843d3307b06ec697b2ab2559c293905eff17094e7a

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

Case digest / 95a6a36ce33f4b23090dc3c8665449c4096ebc1827d2233a09d0bc8fc7804c5e