FA-20421 / Assistive announcements / Open access
Speech rate adjustment accidentally seeks through words · case 01
The announcement trace violates the stated speech-cursor contract.
ROOT CAUSE
Fault site: elif e[0]=='speed': pass is implemented as elif e[0]=='speed': cursor=min(len(words),cursor+1)
VERIFIED REPAIR
Restore the stated transition: elif e[0]=='speed': pass
Unsuccessful approach: The attempted repair substitutes elif e[0]=='speed': cursor=0 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=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': cursor=min(len(words),cursor+1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| trace-1 | [['word', 'word', 'word', 'word'], 1, 4, False] | [['word', 'word', 'word', 'word'], 0, 3, False] | Failed |
| 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 / 8e93e6e5a177ec3f5f44e0abfd10862a6441dedbc1c379bb8452aa0436d2ad9a
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=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': cursor=0
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| trace-1 | [['word', 'word', 'word', 'word'], 0, 2, False] | [['word', 'word', 'word', 'word'], 0, 3, False] | Failed |
| 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 / f03a75be35952e15a131e8350b108277cacc012b6f8fe62990a4b3313d076427
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.853890+00:00.
Case digest / afac0fbdb35fd720b81d8eda685668b542a43806baa6b4414b8fd880c09146a6