FA-20461 / Assistive announcements / Open access
An index equal to chunk count enters speech assembly · case 01
The announcement trace violates the stated chunk-assembly contract.
ROOT CAUSE
Fault site: if not 0<=e[1]<count: continue is implemented as if not 0<=e[1]<=count: continue
VERIFIED REPAIR
Restore the stated transition: if not 0<=e[1]<count: continue
Unsuccessful approach: The attempted repair substitutes if e[1]<0: continue and still violates a regression oracle.
Case contract
Utterance chunks carry a sequence index. Begin sets expected count and clears previous chunks. Put accepts only in-range indices; last write wins. Seal emits only a contiguous complete set, in index order, joined by spaces. A successful seal clears pieces and closes the assembly. Cancel closes without speech; reopen starts a new assembly. Report emitted strings and pending indices.
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):
count=0; pieces={}; opened=False; spoken=[]
for e in events:
if e[0]=='begin':
count=e[1]
pieces.clear()
opened=True
elif e[0]=='put':
if not opened: continue
if not 0<=e[1]<=count: continue
pieces[e[1]]=e[2]
elif e[0]=='cancel': pieces.clear(); opened=False
elif e[0]=='seal':
if not opened: continue
if len(pieces)!=count: continue
if count: spoken.append(' '.join(pieces[i] for i in range(count)))
pieces.clear(); opened=False
return [spoken, sorted(pieces), opened]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',2],['put',1,'two'*N],['put',0,'one'],['seal'],['seal']]", "[['begin',2],['put',0,'old'],['put',0,'new'*N],['put',1,'end'],['seal']]", "[['begin',2],['put',1,'old'],['begin',2],['put',0,'fresh'*N],['seal']]", "[['begin',1],['put',1,'outside'*N],['put',0,'inside'],['seal']]", "[['begin',N],['put',0,'x'],['cancel'],['put',0,'late']]", "[['begin',0],['seal'],['seal']]", "[['begin',1],['put',0,'x'*N],['seal']]", "[['begin',2],['put',0,'partial'*N],['seal']]"]
expected = {1: [[['one two'], [], False], [['new end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['x'], [], False], [[], [0], True]], 2: [[['one twotwo'], [], False], [['newnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xx'], [], False], [[], [0], True]], 3: [[['one twotwotwo'], [], False], [['newnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxx'], [], False], [[], [0], True]], 4: [[['one twotwotwotwo'], [], False], [['newnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxx'], [], False], [[], [0], True]], 5: [[['one twotwotwotwotwo'], [], False], [['newnewnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxxx'], [], False], [[], [0], True]]}[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 | [['one two'], [], False] | [['one two'], [], False] | Passed |
| trace-2 | [['new end'], [], False] | [['new end'], [], False] | Passed |
| trace-3 | [[], [0], True] | [[], [0], True] | Passed |
| trace-4 | [[], [0, 1], True] | [['inside'], [], False] | Failed |
| trace-5 | [[], [], False] | [[], [], False] | Passed |
| trace-6 | [[], [], False] | [[], [], False] | Passed |
| trace-7 | [['x'], [], False] | [['x'], [], False] | Passed |
| trace-8 | [[], [0], True] | [[], [0], True] | Passed |
SHA-256 / 25eda76fa91c48ae50e64db94bf5c4b2c091085cfd8c3a0a619279ddf6d2b63d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
count=0; pieces={}; opened=False; spoken=[]
for e in events:
if e[0]=='begin':
count=e[1]
pieces.clear()
opened=True
elif e[0]=='put':
if not opened: continue
if e[1]<0: continue
pieces[e[1]]=e[2]
elif e[0]=='cancel': pieces.clear(); opened=False
elif e[0]=='seal':
if not opened: continue
if len(pieces)!=count: continue
if count: spoken.append(' '.join(pieces[i] for i in range(count)))
pieces.clear(); opened=False
return [spoken, sorted(pieces), opened]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',2],['put',1,'two'*N],['put',0,'one'],['seal'],['seal']]", "[['begin',2],['put',0,'old'],['put',0,'new'*N],['put',1,'end'],['seal']]", "[['begin',2],['put',1,'old'],['begin',2],['put',0,'fresh'*N],['seal']]", "[['begin',1],['put',1,'outside'*N],['put',0,'inside'],['seal']]", "[['begin',N],['put',0,'x'],['cancel'],['put',0,'late']]", "[['begin',0],['seal'],['seal']]", "[['begin',1],['put',0,'x'*N],['seal']]", "[['begin',2],['put',0,'partial'*N],['seal']]"]
expected = {1: [[['one two'], [], False], [['new end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['x'], [], False], [[], [0], True]], 2: [[['one twotwo'], [], False], [['newnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xx'], [], False], [[], [0], True]], 3: [[['one twotwotwo'], [], False], [['newnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxx'], [], False], [[], [0], True]], 4: [[['one twotwotwotwo'], [], False], [['newnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxx'], [], False], [[], [0], True]], 5: [[['one twotwotwotwotwo'], [], False], [['newnewnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxxx'], [], False], [[], [0], True]]}[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 | [['one two'], [], False] | [['one two'], [], False] | Passed |
| trace-2 | [['new end'], [], False] | [['new end'], [], False] | Passed |
| trace-3 | [[], [0], True] | [[], [0], True] | Passed |
| trace-4 | [[], [0, 1], True] | [['inside'], [], False] | Failed |
| trace-5 | [[], [], False] | [[], [], False] | Passed |
| trace-6 | [[], [], False] | [[], [], False] | Passed |
| trace-7 | [['x'], [], False] | [['x'], [], False] | Passed |
| trace-8 | [[], [0], True] | [[], [0], True] | Passed |
SHA-256 / 422c8e6052753f9ed008fc991bdc0967539c7f1703180d63411891b18e78574a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
count=0; pieces={}; opened=False; spoken=[]
for e in events:
if e[0]=='begin':
count=e[1]
pieces.clear()
opened=True
elif e[0]=='put':
if not opened: continue
if not 0<=e[1]<count: continue
pieces[e[1]]=e[2]
elif e[0]=='cancel': pieces.clear(); opened=False
elif e[0]=='seal':
if not opened: continue
if len(pieces)!=count: continue
if count: spoken.append(' '.join(pieces[i] for i in range(count)))
pieces.clear(); opened=False
return [spoken, sorted(pieces), opened]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['begin',2],['put',1,'two'*N],['put',0,'one'],['seal'],['seal']]", "[['begin',2],['put',0,'old'],['put',0,'new'*N],['put',1,'end'],['seal']]", "[['begin',2],['put',1,'old'],['begin',2],['put',0,'fresh'*N],['seal']]", "[['begin',1],['put',1,'outside'*N],['put',0,'inside'],['seal']]", "[['begin',N],['put',0,'x'],['cancel'],['put',0,'late']]", "[['begin',0],['seal'],['seal']]", "[['begin',1],['put',0,'x'*N],['seal']]", "[['begin',2],['put',0,'partial'*N],['seal']]"]
expected = {1: [[['one two'], [], False], [['new end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['x'], [], False], [[], [0], True]], 2: [[['one twotwo'], [], False], [['newnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xx'], [], False], [[], [0], True]], 3: [[['one twotwotwo'], [], False], [['newnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxx'], [], False], [[], [0], True]], 4: [[['one twotwotwotwo'], [], False], [['newnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxx'], [], False], [[], [0], True]], 5: [[['one twotwotwotwotwo'], [], False], [['newnewnewnewnew end'], [], False], [[], [0], True], [['inside'], [], False], [[], [], False], [[], [], False], [['xxxxx'], [], False], [[], [0], True]]}[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 | [['one two'], [], False] | [['one two'], [], False] | Passed |
| trace-2 | [['new end'], [], False] | [['new end'], [], False] | Passed |
| trace-3 | [[], [0], True] | [[], [0], True] | Passed |
| trace-4 | [['inside'], [], False] | [['inside'], [], False] | Passed |
| trace-5 | [[], [], False] | [[], [], False] | Passed |
| trace-6 | [[], [], False] | [[], [], False] | Passed |
| trace-7 | [['x'], [], False] | [['x'], [], False] | Passed |
| trace-8 | [[], [0], True] | [[], [0], True] | Passed |
SHA-256 / 487859558e9ea4f960034fbbe63d30f2c3627975329046abbffd800b5318da5f
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:19.206765+00:00.
Case digest / 8da119a2876c09aa14c87c3475a04e130d9d19a4a82f9b78399a4fab8bb1dfa5