FA-20536 / Assistive announcements / Open access
Flush leaks uncommitted announcement text · case 01
The announcement trace violates the stated announcement-transaction contract.
ROOT CAUSE
Fault site: elif op=='flush': pass is implemented as elif op=='flush': spoken.extend(x for f in frames for x in f)
VERIFIED REPAIR
Restore the stated transition: elif op=='flush': pass
Unsuccessful approach: The attempted repair substitutes elif op=='flush': spoken.extend(frames[-1] if frames else []) and still violates a regression oracle.
Case contract
Nested announcement transactions stage text. Begin pushes a frame; append outside a frame speaks immediately. Commit merges into parent or speaks outer contents in order; rollback discards only the top frame. Replace edits only last staged item or appends when empty. Clear empties top frame. Flush cannot expose staged text. Report spoken and nested staged frames.
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):
frames=[]; spoken=[]
for e in events:
op=e[0]
if op=='begin': frames.append([])
elif op=='append':
if frames: frames[-1].append(e[1])
else: spoken.append(e[1])
elif op=='commit' and frames:
batch=frames.pop()
if frames: frames[-1].extend(batch)
else: spoken.extend(batch)
elif op=='rollback' and frames: frames.pop()
elif op=='replace' and frames:
if frames[-1]: frames[-1][-1]=e[1]
else: frames[-1].append(e[1])
elif op=='clear' and frames: frames[-1].clear()
elif op=='flush': spoken.extend(x for f in frames for x in f)
return [spoken,frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['append','outside'*N],['append','second'],['begin'],['append','first'],['append','second'],['replace','fixed'*N],['flush'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['commit'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['rollback'],['commit']]", "[['append','spoken'*N],['begin'],['append','hidden'],['clear'],['append','new'],['commit']]", "[['begin'],['replace','new'*N],['commit']]", "[['begin'],['append','x'*N],['clear']]", "[['commit'],['rollback'],['clear'],['flush']]", "[['begin'],['append','a'*N],['begin'],['append','b']]"]
expected = {1: [[['outside', 'second', 'first', 'fixed'], []], [['outer', 'inner'], []], [['outer'], []], [['spoken', 'new'], []], [['new'], []], [[], [[]]], [[], []], [[], [['a'], ['b']]]], 2: [[['outsideoutside', 'second', 'first', 'fixedfixed'], []], [['outerouter', 'inner'], []], [['outerouter'], []], [['spokenspoken', 'new'], []], [['newnew'], []], [[], [[]]], [[], []], [[], [['aa'], ['b']]]], 3: [[['outsideoutsideoutside', 'second', 'first', 'fixedfixedfixed'], []], [['outerouterouter', 'inner'], []], [['outerouterouter'], []], [['spokenspokenspoken', 'new'], []], [['newnewnew'], []], [[], [[]]], [[], []], [[], [['aaa'], ['b']]]], 4: [[['outsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixed'], []], [['outerouterouterouter', 'inner'], []], [['outerouterouterouter'], []], [['spokenspokenspokenspoken', 'new'], []], [['newnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaa'], ['b']]]], 5: [[['outsideoutsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixedfixed'], []], [['outerouterouterouterouter', 'inner'], []], [['outerouterouterouterouter'], []], [['spokenspokenspokenspokenspoken', 'new'], []], [['newnewnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaaa'], ['b']]]]}[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 | [['outside', 'second', 'first', 'fixed', 'first', 'fixed'], []] | [['outside', 'second', 'first', 'fixed'], []] | Failed |
| trace-2 | [['outer', 'inner'], []] | [['outer', 'inner'], []] | Passed |
| trace-3 | [['outer'], []] | [['outer'], []] | Passed |
| trace-4 | [['spoken', 'new'], []] | [['spoken', 'new'], []] | Passed |
| trace-5 | [['new'], []] | [['new'], []] | Passed |
| trace-6 | [[], [[]]] | [[], [[]]] | Passed |
| trace-7 | [[], []] | [[], []] | Passed |
| trace-8 | [[], [['a'], ['b']]] | [[], [['a'], ['b']]] | Passed |
SHA-256 / be2792d35689737cb60428ca5901af1a173b6e653e7be27247ae3b36f4d6d3c7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
frames=[]; spoken=[]
for e in events:
op=e[0]
if op=='begin': frames.append([])
elif op=='append':
if frames: frames[-1].append(e[1])
else: spoken.append(e[1])
elif op=='commit' and frames:
batch=frames.pop()
if frames: frames[-1].extend(batch)
else: spoken.extend(batch)
elif op=='rollback' and frames: frames.pop()
elif op=='replace' and frames:
if frames[-1]: frames[-1][-1]=e[1]
else: frames[-1].append(e[1])
elif op=='clear' and frames: frames[-1].clear()
elif op=='flush': spoken.extend(frames[-1] if frames else [])
return [spoken,frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['append','outside'*N],['append','second'],['begin'],['append','first'],['append','second'],['replace','fixed'*N],['flush'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['commit'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['rollback'],['commit']]", "[['append','spoken'*N],['begin'],['append','hidden'],['clear'],['append','new'],['commit']]", "[['begin'],['replace','new'*N],['commit']]", "[['begin'],['append','x'*N],['clear']]", "[['commit'],['rollback'],['clear'],['flush']]", "[['begin'],['append','a'*N],['begin'],['append','b']]"]
expected = {1: [[['outside', 'second', 'first', 'fixed'], []], [['outer', 'inner'], []], [['outer'], []], [['spoken', 'new'], []], [['new'], []], [[], [[]]], [[], []], [[], [['a'], ['b']]]], 2: [[['outsideoutside', 'second', 'first', 'fixedfixed'], []], [['outerouter', 'inner'], []], [['outerouter'], []], [['spokenspoken', 'new'], []], [['newnew'], []], [[], [[]]], [[], []], [[], [['aa'], ['b']]]], 3: [[['outsideoutsideoutside', 'second', 'first', 'fixedfixedfixed'], []], [['outerouterouter', 'inner'], []], [['outerouterouter'], []], [['spokenspokenspoken', 'new'], []], [['newnewnew'], []], [[], [[]]], [[], []], [[], [['aaa'], ['b']]]], 4: [[['outsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixed'], []], [['outerouterouterouter', 'inner'], []], [['outerouterouterouter'], []], [['spokenspokenspokenspoken', 'new'], []], [['newnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaa'], ['b']]]], 5: [[['outsideoutsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixedfixed'], []], [['outerouterouterouterouter', 'inner'], []], [['outerouterouterouterouter'], []], [['spokenspokenspokenspokenspoken', 'new'], []], [['newnewnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaaa'], ['b']]]]}[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 | [['outside', 'second', 'first', 'fixed', 'first', 'fixed'], []] | [['outside', 'second', 'first', 'fixed'], []] | Failed |
| trace-2 | [['outer', 'inner'], []] | [['outer', 'inner'], []] | Passed |
| trace-3 | [['outer'], []] | [['outer'], []] | Passed |
| trace-4 | [['spoken', 'new'], []] | [['spoken', 'new'], []] | Passed |
| trace-5 | [['new'], []] | [['new'], []] | Passed |
| trace-6 | [[], [[]]] | [[], [[]]] | Passed |
| trace-7 | [[], []] | [[], []] | Passed |
| trace-8 | [[], [['a'], ['b']]] | [[], [['a'], ['b']]] | Passed |
SHA-256 / fef2a3629c02ca86a0f58ff22ea02311f22aae1b095f77eb470991752c0d5c4f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
frames=[]; spoken=[]
for e in events:
op=e[0]
if op=='begin': frames.append([])
elif op=='append':
if frames: frames[-1].append(e[1])
else: spoken.append(e[1])
elif op=='commit' and frames:
batch=frames.pop()
if frames: frames[-1].extend(batch)
else: spoken.extend(batch)
elif op=='rollback' and frames: frames.pop()
elif op=='replace' and frames:
if frames[-1]: frames[-1][-1]=e[1]
else: frames[-1].append(e[1])
elif op=='clear' and frames: frames[-1].clear()
elif op=='flush': pass
return [spoken,frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['append','outside'*N],['append','second'],['begin'],['append','first'],['append','second'],['replace','fixed'*N],['flush'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['commit'],['commit']]", "[['begin'],['append','outer'*N],['begin'],['append','inner'],['rollback'],['commit']]", "[['append','spoken'*N],['begin'],['append','hidden'],['clear'],['append','new'],['commit']]", "[['begin'],['replace','new'*N],['commit']]", "[['begin'],['append','x'*N],['clear']]", "[['commit'],['rollback'],['clear'],['flush']]", "[['begin'],['append','a'*N],['begin'],['append','b']]"]
expected = {1: [[['outside', 'second', 'first', 'fixed'], []], [['outer', 'inner'], []], [['outer'], []], [['spoken', 'new'], []], [['new'], []], [[], [[]]], [[], []], [[], [['a'], ['b']]]], 2: [[['outsideoutside', 'second', 'first', 'fixedfixed'], []], [['outerouter', 'inner'], []], [['outerouter'], []], [['spokenspoken', 'new'], []], [['newnew'], []], [[], [[]]], [[], []], [[], [['aa'], ['b']]]], 3: [[['outsideoutsideoutside', 'second', 'first', 'fixedfixedfixed'], []], [['outerouterouter', 'inner'], []], [['outerouterouter'], []], [['spokenspokenspoken', 'new'], []], [['newnewnew'], []], [[], [[]]], [[], []], [[], [['aaa'], ['b']]]], 4: [[['outsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixed'], []], [['outerouterouterouter', 'inner'], []], [['outerouterouterouter'], []], [['spokenspokenspokenspoken', 'new'], []], [['newnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaa'], ['b']]]], 5: [[['outsideoutsideoutsideoutsideoutside', 'second', 'first', 'fixedfixedfixedfixedfixed'], []], [['outerouterouterouterouter', 'inner'], []], [['outerouterouterouterouter'], []], [['spokenspokenspokenspokenspoken', 'new'], []], [['newnewnewnewnew'], []], [[], [[]]], [[], []], [[], [['aaaaa'], ['b']]]]}[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 | [['outside', 'second', 'first', 'fixed'], []] | [['outside', 'second', 'first', 'fixed'], []] | Passed |
| trace-2 | [['outer', 'inner'], []] | [['outer', 'inner'], []] | Passed |
| trace-3 | [['outer'], []] | [['outer'], []] | Passed |
| trace-4 | [['spoken', 'new'], []] | [['spoken', 'new'], []] | Passed |
| trace-5 | [['new'], []] | [['new'], []] | Passed |
| trace-6 | [[], [[]]] | [[], [[]]] | Passed |
| trace-7 | [[], []] | [[], []] | Passed |
| trace-8 | [[], [['a'], ['b']]] | [[], [['a'], ['b']]] | Passed |
SHA-256 / d38baf42f9a61e99864633304e128c1c8fb82295908cdfd1ed2de46bf72bd410
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.914603+00:00.
Case digest / bb608163ddf811fe075ab66c0bcf1a0dcedc3fcf45f2680b916bc64e09519f5c