FAILURE MAP
← Case archive

FA-20516 / Assistive announcements / Open access

Outermost commit reverses spoken message order · case 01

The announcement trace violates the stated announcement-transaction contract.

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

ROOT CAUSE

Fault site: else: spoken.extend(batch) is implemented as else: spoken.extend(reversed(batch))

VERIFIED REPAIR

Restore the stated transition: else: spoken.extend(batch)

Unsuccessful approach: The attempted repair substitutes else: spoken.extend(batch[:1]) 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(reversed(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 fixtureActualExpectedOutcome
trace-1[['outside', 'second', 'fixed', 'first'], []][['outside', 'second', 'first', 'fixed'], []]Failed
trace-2[['inner', 'outer'], []][['outer', 'inner'], []]Failed
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 / 6f63770e4a74179b52116de47741492d8326f2f5c41ea19cc85a297713258dda

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[:1])
        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 fixtureActualExpectedOutcome
trace-1[['outside', 'second', 'first'], []][['outside', 'second', 'first', 'fixed'], []]Failed
trace-2[['outer'], []][['outer', 'inner'], []]Failed
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 / 72af4f4f6314cf6989e2cc2ef1bb016a1c8948766e4399ec26315a639dc3427b

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

Case digest / ed3f55943f717109c9a5a7a8abb1c5fba80bd7208ec378241a3bdfcc67f880c3