FAILURE MAP
← Case archive

FA-21176 / Assistive announcements / Open access

Emergency message is lost while quiet is active · case 01

The announcement trace violates the stated quiet-session contract.

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

ROOT CAUSE

Fault site: if e[3]=='emergency': out.append([e[1],e[2],1]) is implemented as if e[3]=='emergency': pass

VERIFIED REPAIR

Restore the stated transition: if e[3]=='emergency': out.append([e[1],e[2],1])

Unsuccessful approach: The attempted repair substitutes if e[3]=='emergency' and not depth: out.append([e[1],e[2],1]) and still violates a regression oracle.

Case contract

Quiet nesting is a counter. Enter increments; leave decrements without going negative. Ordinary messages during quiet replace a per-topic summary [latest,count], emergency speech always emits immediately. Final leave emits summaries in topic first-seen order as [topic,latest,count]. Remove-topic discards only that summary. Reset quiet silently discards backlog. Ordinary speech outside quiet emits directly with count1. Report output, nesting and pending summaries.

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):
    depth=0; pending={}; out=[]
    for e in events:
        if e[0]=='enter': depth+=1
        elif e[0]=='leave':
            was=depth; depth=max(0,depth-1)
            if was>0 and depth==0:
                out.extend([[k,v[0],v[1]] for k,v in pending.items()])
                pending.clear()
        elif e[0]=='reset': depth=0; pending.clear()
        elif e[0]=='remove': pending.pop(e[1],None)
        elif e[0]=='message':
            if e[3]=='emergency': pass
            elif depth:
                old=pending.get(e[1],['',0])
                pending[e[1]]=[e[2],old[1]+1]
            else: out.append([e[1],e[2],1])
    return [out,depth,[[k]+v for k,v in pending.items()]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['enter'],['enter'],['message','a','first'*N,'normal'],['leave']]", "[['enter'],['message','z','old','normal'],['message','a','a'*N,'normal'],['message','z','new','normal'],['leave'],['enter'],['leave']]", "[['enter'],['message','a','urgent'*N,'emergency']]", "[['enter'],['message','a','urgent'*N,'emergency'],['message','b','deferred','normal'],['leave']]", "[['enter'],['message','a','a'*N,'normal'],['message','b','b','normal'],['remove','a']]", "[['enter'],['message','a','x'*N,'normal'],['reset']]", "[['message','a','direct'*N,'normal'],['leave'],['leave']]", "[['enter'],['message','a','x'*N,'normal'],['leave'],['leave']]"]
expected = {1: [[[], 1, [['a', 'first', 1]]], [[['z', 'new', 2], ['a', 'a', 1]], 0, []], [[['a', 'urgent', 1]], 1, []], [[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'direct', 1]], 0, []], [[['a', 'x', 1]], 0, []]], 2: [[[], 1, [['a', 'firstfirst', 1]]], [[['z', 'new', 2], ['a', 'aa', 1]], 0, []], [[['a', 'urgenturgent', 1]], 1, []], [[['a', 'urgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirect', 1]], 0, []], [[['a', 'xx', 1]], 0, []]], 3: [[[], 1, [['a', 'firstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaa', 1]], 0, []], [[['a', 'urgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirect', 1]], 0, []], [[['a', 'xxx', 1]], 0, []]], 4: [[[], 1, [['a', 'firstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirect', 1]], 0, []], [[['a', 'xxxx', 1]], 0, []]], 5: [[[], 1, [['a', 'firstfirstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirectdirect', 1]], 0, []], [[['a', 'xxxxx', 1]], 0, []]]}[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[[], 1, [['a', 'first', 1]]][[], 1, [['a', 'first', 1]]]Passed
trace-2[[['z', 'new', 2], ['a', 'a', 1]], 0, []][[['z', 'new', 2], ['a', 'a', 1]], 0, []]Passed
trace-3[[], 1, []][[['a', 'urgent', 1]], 1, []]Failed
trace-4[[['b', 'deferred', 1]], 0, []][[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []]Failed
trace-5[[], 1, [['b', 'b', 1]]][[], 1, [['b', 'b', 1]]]Passed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[['a', 'direct', 1]], 0, []][[['a', 'direct', 1]], 0, []]Passed
trace-8[[['a', 'x', 1]], 0, []][[['a', 'x', 1]], 0, []]Passed

SHA-256 / 95f4f53649f4d38971ae02ef0d9ceb649e2bab6cf7a1a2c3c43599266ed30282

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    depth=0; pending={}; out=[]
    for e in events:
        if e[0]=='enter': depth+=1
        elif e[0]=='leave':
            was=depth; depth=max(0,depth-1)
            if was>0 and depth==0:
                out.extend([[k,v[0],v[1]] for k,v in pending.items()])
                pending.clear()
        elif e[0]=='reset': depth=0; pending.clear()
        elif e[0]=='remove': pending.pop(e[1],None)
        elif e[0]=='message':
            if e[3]=='emergency' and not depth: out.append([e[1],e[2],1])
            elif depth:
                old=pending.get(e[1],['',0])
                pending[e[1]]=[e[2],old[1]+1]
            else: out.append([e[1],e[2],1])
    return [out,depth,[[k]+v for k,v in pending.items()]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['enter'],['enter'],['message','a','first'*N,'normal'],['leave']]", "[['enter'],['message','z','old','normal'],['message','a','a'*N,'normal'],['message','z','new','normal'],['leave'],['enter'],['leave']]", "[['enter'],['message','a','urgent'*N,'emergency']]", "[['enter'],['message','a','urgent'*N,'emergency'],['message','b','deferred','normal'],['leave']]", "[['enter'],['message','a','a'*N,'normal'],['message','b','b','normal'],['remove','a']]", "[['enter'],['message','a','x'*N,'normal'],['reset']]", "[['message','a','direct'*N,'normal'],['leave'],['leave']]", "[['enter'],['message','a','x'*N,'normal'],['leave'],['leave']]"]
expected = {1: [[[], 1, [['a', 'first', 1]]], [[['z', 'new', 2], ['a', 'a', 1]], 0, []], [[['a', 'urgent', 1]], 1, []], [[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'direct', 1]], 0, []], [[['a', 'x', 1]], 0, []]], 2: [[[], 1, [['a', 'firstfirst', 1]]], [[['z', 'new', 2], ['a', 'aa', 1]], 0, []], [[['a', 'urgenturgent', 1]], 1, []], [[['a', 'urgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirect', 1]], 0, []], [[['a', 'xx', 1]], 0, []]], 3: [[[], 1, [['a', 'firstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaa', 1]], 0, []], [[['a', 'urgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirect', 1]], 0, []], [[['a', 'xxx', 1]], 0, []]], 4: [[[], 1, [['a', 'firstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirect', 1]], 0, []], [[['a', 'xxxx', 1]], 0, []]], 5: [[[], 1, [['a', 'firstfirstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirectdirect', 1]], 0, []], [[['a', 'xxxxx', 1]], 0, []]]}[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[[], 1, [['a', 'first', 1]]][[], 1, [['a', 'first', 1]]]Passed
trace-2[[['z', 'new', 2], ['a', 'a', 1]], 0, []][[['z', 'new', 2], ['a', 'a', 1]], 0, []]Passed
trace-3[[], 1, [['a', 'urgent', 1]]][[['a', 'urgent', 1]], 1, []]Failed
trace-4[[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []][[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []]Passed
trace-5[[], 1, [['b', 'b', 1]]][[], 1, [['b', 'b', 1]]]Passed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[['a', 'direct', 1]], 0, []][[['a', 'direct', 1]], 0, []]Passed
trace-8[[['a', 'x', 1]], 0, []][[['a', 'x', 1]], 0, []]Passed

SHA-256 / e951bfb16aec879ad1c2d8690b64b8335002a8250e1737e7967115b0b8f5692b

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    depth=0; pending={}; out=[]
    for e in events:
        if e[0]=='enter': depth+=1
        elif e[0]=='leave':
            was=depth; depth=max(0,depth-1)
            if was>0 and depth==0:
                out.extend([[k,v[0],v[1]] for k,v in pending.items()])
                pending.clear()
        elif e[0]=='reset': depth=0; pending.clear()
        elif e[0]=='remove': pending.pop(e[1],None)
        elif e[0]=='message':
            if e[3]=='emergency': out.append([e[1],e[2],1])
            elif depth:
                old=pending.get(e[1],['',0])
                pending[e[1]]=[e[2],old[1]+1]
            else: out.append([e[1],e[2],1])
    return [out,depth,[[k]+v for k,v in pending.items()]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['enter'],['enter'],['message','a','first'*N,'normal'],['leave']]", "[['enter'],['message','z','old','normal'],['message','a','a'*N,'normal'],['message','z','new','normal'],['leave'],['enter'],['leave']]", "[['enter'],['message','a','urgent'*N,'emergency']]", "[['enter'],['message','a','urgent'*N,'emergency'],['message','b','deferred','normal'],['leave']]", "[['enter'],['message','a','a'*N,'normal'],['message','b','b','normal'],['remove','a']]", "[['enter'],['message','a','x'*N,'normal'],['reset']]", "[['message','a','direct'*N,'normal'],['leave'],['leave']]", "[['enter'],['message','a','x'*N,'normal'],['leave'],['leave']]"]
expected = {1: [[[], 1, [['a', 'first', 1]]], [[['z', 'new', 2], ['a', 'a', 1]], 0, []], [[['a', 'urgent', 1]], 1, []], [[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'direct', 1]], 0, []], [[['a', 'x', 1]], 0, []]], 2: [[[], 1, [['a', 'firstfirst', 1]]], [[['z', 'new', 2], ['a', 'aa', 1]], 0, []], [[['a', 'urgenturgent', 1]], 1, []], [[['a', 'urgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirect', 1]], 0, []], [[['a', 'xx', 1]], 0, []]], 3: [[[], 1, [['a', 'firstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaa', 1]], 0, []], [[['a', 'urgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirect', 1]], 0, []], [[['a', 'xxx', 1]], 0, []]], 4: [[[], 1, [['a', 'firstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirect', 1]], 0, []], [[['a', 'xxxx', 1]], 0, []]], 5: [[[], 1, [['a', 'firstfirstfirstfirstfirst', 1]]], [[['z', 'new', 2], ['a', 'aaaaa', 1]], 0, []], [[['a', 'urgenturgenturgenturgenturgent', 1]], 1, []], [[['a', 'urgenturgenturgenturgenturgent', 1], ['b', 'deferred', 1]], 0, []], [[], 1, [['b', 'b', 1]]], [[], 0, []], [[['a', 'directdirectdirectdirectdirect', 1]], 0, []], [[['a', 'xxxxx', 1]], 0, []]]}[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[[], 1, [['a', 'first', 1]]][[], 1, [['a', 'first', 1]]]Passed
trace-2[[['z', 'new', 2], ['a', 'a', 1]], 0, []][[['z', 'new', 2], ['a', 'a', 1]], 0, []]Passed
trace-3[[['a', 'urgent', 1]], 1, []][[['a', 'urgent', 1]], 1, []]Passed
trace-4[[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []][[['a', 'urgent', 1], ['b', 'deferred', 1]], 0, []]Passed
trace-5[[], 1, [['b', 'b', 1]]][[], 1, [['b', 'b', 1]]]Passed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[['a', 'direct', 1]], 0, []][[['a', 'direct', 1]], 0, []]Passed
trace-8[[['a', 'x', 1]], 0, []][[['a', 'x', 1]], 0, []]Passed

SHA-256 / 1031369a1981ec50576770d1159fc7128c41c2f8c089569f3676f2f11a9da2b7

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

Case digest / 1db55b5b40dd24a3de7a109116504534f53bde079bd03d774a34b44269f8beb3