FA-20471 / Assistive announcements / Open access
Cancel retains a live chunk assembly · case 01
The announcement trace violates the stated chunk-assembly contract.
ROOT CAUSE
Fault site: elif e[0]=='cancel': pieces.clear(); opened=False is implemented as elif e[0]=='cancel': opened=False
VERIFIED REPAIR
Restore the stated transition: elif e[0]=='cancel': pieces.clear(); opened=False
Unsuccessful approach: The attempted repair substitutes elif e[0]=='cancel': pieces.clear() 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': 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 | [[], [0], False] | [[], [], False] | Failed |
| trace-6 | [[], [], False] | [[], [], False] | Passed |
| trace-7 | [['x'], [], False] | [['x'], [], False] | Passed |
| trace-8 | [[], [0], True] | [[], [0], True] | Passed |
SHA-256 / d4b34bdb174ec992649676c9be698aca5f7c403ff7a9e5f49319e9012c6ffd41
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 not 0<=e[1]<count: continue
pieces[e[1]]=e[2]
elif e[0]=='cancel': pieces.clear()
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 | [[], [0], True] | [[], [], False] | Failed |
| trace-6 | [[], [], False] | [[], [], False] | Passed |
| trace-7 | [['x'], [], False] | [['x'], [], False] | Passed |
| trace-8 | [[], [0], True] | [[], [0], True] | Passed |
SHA-256 / 2725b00eaa430dc4efc8e85d9fd1059a9c6719f7824153a67c30ee3f5debafba
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.250420+00:00.
Case digest / 223408340e91b81924858ade1a32db8965191b876d2fcdbac68a7b1a157ce5b9