FAILURE MAP
← Case archive

FA-20396 / Assistive announcements / Open access

Pause request fails to suspend the announcement · case 01

The announcement trace violates the stated speech-cursor contract.

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

ROOT CAUSE

Fault site: elif e[0]=='pause': paused=True is implemented as elif e[0]=='pause': paused=False

VERIFIED REPAIR

Restore the stated transition: elif e[0]=='pause': paused=True

Unsuccessful approach: The attempted repair substitutes elif e[0]=='pause': paused=bool(cursor) and still violates a regression oracle.

Case contract

Finite word arrays model announcements. Load copies words and resets cursor and completion. Speak advances one word only while unpaused. Seek clamps to [0,length]. Rewind moves one word. Cancel discards current words. Completion is logged exactly once when a speak reaches end, never for an empty load. Speed changes do not move word cursor. Return spoken words, completion count, cursor and paused flag.

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):
    words=[]; cursor=0; paused=False; done=False; spoken=[]; completions=0
    for e in events:
        if e[0]=='load':
            words=list(e[1]); cursor=0; done=False
        elif e[0]=='pause': paused=False
        elif e[0]=='resume': paused=False
        elif e[0]=='seek': cursor=max(0,min(e[1],len(words)))
        elif e[0]=='rewind': cursor=max(0,cursor-1)
        elif e[0]=='cancel': words=[]; cursor=0; done=True
        elif e[0]=='speed': pass
        elif e[0]=='speak':
            if paused: continue
            if cursor<len(words):
                spoken.append(words[cursor]); cursor+=1
            if words and cursor==len(words) and not done:
                completions+=1; done=True
    return [spoken,completions,cursor,paused]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['load',['word']*(N+3)],['speak'],['speak'],['rewind'],['speed',2],['speak'],['pause'],['speak'],['resume'],['speak']]", "[['load',['x']*(N+1)],['pause'],['speak'],['resume'],['speak'],['load',['a','b']],['speak']]", "[['load',['x']*N]]+[['speak']]*(N+2)+[['load',['y']],['speak'],['speak']]", "[['load',['x']*(N+2)],['speak'],['speak'],['cancel'],['speak']]", "[['load',['x']*N],['seek',N+5],['speak'],['seek',-2]]", "[['load',[]],['speak'],['cancel']]", "[['load',['x']*(N+4)],['seek',3],['rewind']]"]
expected = {1: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 2: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 3: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 4: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 5: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]]}[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[['word', 'word', 'word', 'word', 'word'], 1, 4, False][['word', 'word', 'word', 'word'], 0, 3, False]Failed
trace-2[['x', 'x', 'a'], 1, 1, False][['x', 'a'], 0, 1, False]Failed
trace-3[['x', 'y'], 2, 1, False][['x', 'y'], 2, 1, False]Passed
trace-4[['x', 'x'], 0, 0, False][['x', 'x'], 0, 0, False]Passed
trace-5[[], 1, 0, False][[], 1, 0, False]Passed
trace-6[[], 0, 0, False][[], 0, 0, False]Passed
trace-7[[], 0, 2, False][[], 0, 2, False]Passed

SHA-256 / c488b661d32712240c3a0778fe0c51f4d2edf4c1510cd1ccbfb444d9cc43f38e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events):
    words=[]; cursor=0; paused=False; done=False; spoken=[]; completions=0
    for e in events:
        if e[0]=='load':
            words=list(e[1]); cursor=0; done=False
        elif e[0]=='pause': paused=bool(cursor)
        elif e[0]=='resume': paused=False
        elif e[0]=='seek': cursor=max(0,min(e[1],len(words)))
        elif e[0]=='rewind': cursor=max(0,cursor-1)
        elif e[0]=='cancel': words=[]; cursor=0; done=True
        elif e[0]=='speed': pass
        elif e[0]=='speak':
            if paused: continue
            if cursor<len(words):
                spoken.append(words[cursor]); cursor+=1
            if words and cursor==len(words) and not done:
                completions+=1; done=True
    return [spoken,completions,cursor,paused]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['load',['word']*(N+3)],['speak'],['speak'],['rewind'],['speed',2],['speak'],['pause'],['speak'],['resume'],['speak']]", "[['load',['x']*(N+1)],['pause'],['speak'],['resume'],['speak'],['load',['a','b']],['speak']]", "[['load',['x']*N]]+[['speak']]*(N+2)+[['load',['y']],['speak'],['speak']]", "[['load',['x']*(N+2)],['speak'],['speak'],['cancel'],['speak']]", "[['load',['x']*N],['seek',N+5],['speak'],['seek',-2]]", "[['load',[]],['speak'],['cancel']]", "[['load',['x']*(N+4)],['seek',3],['rewind']]"]
expected = {1: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 2: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 3: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 4: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 5: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]]}[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[['word', 'word', 'word', 'word'], 0, 3, False][['word', 'word', 'word', 'word'], 0, 3, False]Passed
trace-2[['x', 'x', 'a'], 1, 1, False][['x', 'a'], 0, 1, False]Failed
trace-3[['x', 'y'], 2, 1, False][['x', 'y'], 2, 1, False]Passed
trace-4[['x', 'x'], 0, 0, False][['x', 'x'], 0, 0, False]Passed
trace-5[[], 1, 0, False][[], 1, 0, False]Passed
trace-6[[], 0, 0, False][[], 0, 0, False]Passed
trace-7[[], 0, 2, False][[], 0, 2, False]Passed

SHA-256 / 37a800abb7a737c0f3f8352212292dfa72b7452374c3e4ff21be2890ac53ba07

3 / The verified repair

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

N = 1
observations = []
def solve(events):
    words=[]; cursor=0; paused=False; done=False; spoken=[]; completions=0
    for e in events:
        if e[0]=='load':
            words=list(e[1]); cursor=0; done=False
        elif e[0]=='pause': paused=True
        elif e[0]=='resume': paused=False
        elif e[0]=='seek': cursor=max(0,min(e[1],len(words)))
        elif e[0]=='rewind': cursor=max(0,cursor-1)
        elif e[0]=='cancel': words=[]; cursor=0; done=True
        elif e[0]=='speed': pass
        elif e[0]=='speak':
            if paused: continue
            if cursor<len(words):
                spoken.append(words[cursor]); cursor+=1
            if words and cursor==len(words) and not done:
                completions+=1; done=True
    return [spoken,completions,cursor,paused]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['load',['word']*(N+3)],['speak'],['speak'],['rewind'],['speed',2],['speak'],['pause'],['speak'],['resume'],['speak']]", "[['load',['x']*(N+1)],['pause'],['speak'],['resume'],['speak'],['load',['a','b']],['speak']]", "[['load',['x']*N]]+[['speak']]*(N+2)+[['load',['y']],['speak'],['speak']]", "[['load',['x']*(N+2)],['speak'],['speak'],['cancel'],['speak']]", "[['load',['x']*N],['seek',N+5],['speak'],['seek',-2]]", "[['load',[]],['speak'],['cancel']]", "[['load',['x']*(N+4)],['seek',3],['rewind']]"]
expected = {1: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 2: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 3: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 4: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]], 5: [[['word', 'word', 'word', 'word'], 0, 3, False], [['x', 'a'], 0, 1, False], [['x', 'x', 'x', 'x', 'x', 'y'], 2, 1, False], [['x', 'x'], 0, 0, False], [[], 1, 0, False], [[], 0, 0, False], [[], 0, 2, False]]}[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[['word', 'word', 'word', 'word'], 0, 3, False][['word', 'word', 'word', 'word'], 0, 3, False]Passed
trace-2[['x', 'a'], 0, 1, False][['x', 'a'], 0, 1, False]Passed
trace-3[['x', 'y'], 2, 1, False][['x', 'y'], 2, 1, False]Passed
trace-4[['x', 'x'], 0, 0, False][['x', 'x'], 0, 0, False]Passed
trace-5[[], 1, 0, False][[], 1, 0, False]Passed
trace-6[[], 0, 0, False][[], 0, 0, False]Passed
trace-7[[], 0, 2, False][[], 0, 2, False]Passed

SHA-256 / 3033cd6d72a701382f4212e09c2b6d46e73043c310da0e486c7c7b29572437c1

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

Case digest / d60f53cadbd03b5d85001394dab0fb3a2d90aff108aff6a469d63765a9e877e9