FA-21771 / Assistive announcements / Open access
Seal toggles immutability and a repeated call reopens bundle · case 01
The announcement trace violates the stated utterance-bundle contract.
ROOT CAUSE
Fault site: elif e[0]=='seal': bundles[e[1]][1]=True is implemented as elif e[0]=='seal': bundles[e[1]][1]=not sealed
VERIFIED REPAIR
Restore the stated transition: elif e[0]=='seal': bundles[e[1]][1]=True
Unsuccessful approach: The attempted repair substitutes elif e[0]=='seal': bundles[e[1]][1]=bool(parts) and still violates a regression oracle.
Case contract
Bundles are atomic ordered speech segments. Open initializes unsealed bundle; part appends [label,text] while unsealed; replace edits matching label only. Seal marks immutable. Dispatch requires sealed and nonempty, emits a single joined label:text string, removes bundle and records delivered ID. Reopen delivered ID clears delivery receipt. Retract drops bundle and receipt. Rename updates label preserving text. Limit truncates number of pending segments from end. Return speech and pending bundle segments/sealed status.
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):
bundles={}; delivered=set(); out=[]
for e in events:
if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
elif len(e)>1 and e[1] in bundles:
parts,sealed=bundles[e[1]]
if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
elif e[0]=='replace' and not sealed:
for p in parts:
if p[0]==e[2]: p[1]=e[3]
elif e[0]=='rename' and not sealed:
for p in parts:
if p[0]==e[2]: p[0]=e[3]
elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
elif e[0]=='seal': bundles[e[1]][1]=not sealed
elif e[0]=='dispatch':
if not sealed or not parts: continue
if e[1] in delivered: continue
out.append(' | '.join(label+': '+text for label,text in parts))
delivered.add(e[1]); del bundles[e[1]]
return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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 | [['Name: New | Total: 2'], [], ['a']] | [['Name: New | Total: 2'], [], ['a']] | Passed |
| trace-2 | [[], [['a', [['One', 'x']], False]], []] | [['One: x'], [], ['a']] | Failed |
| trace-3 | [['One: x | Two: y'], [], ['a']] | [['One: x | Two: y'], [], ['a']] | Passed |
| trace-4 | [['One: x', 'Again: y'], [], ['a']] | [['One: x', 'Again: y'], [], ['a']] | Passed |
| trace-5 | [['One: x'], [], ['a']] | [['One: x'], [], ['a']] | Passed |
| trace-6 | [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []] | [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []] | Passed |
| trace-7 | [[], [['a', [], False]], []] | [[], [['a', [], False]], []] | Passed |
SHA-256 / af131bba67b2b7e79ed4ad00a53ca0b866f9b6236d4752cb260c66bd5f84974a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
bundles={}; delivered=set(); out=[]
for e in events:
if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
elif len(e)>1 and e[1] in bundles:
parts,sealed=bundles[e[1]]
if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
elif e[0]=='replace' and not sealed:
for p in parts:
if p[0]==e[2]: p[1]=e[3]
elif e[0]=='rename' and not sealed:
for p in parts:
if p[0]==e[2]: p[0]=e[3]
elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
elif e[0]=='seal': bundles[e[1]][1]=bool(parts)
elif e[0]=='dispatch':
if not sealed or not parts: continue
if e[1] in delivered: continue
out.append(' | '.join(label+': '+text for label,text in parts))
delivered.add(e[1]); del bundles[e[1]]
return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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 | [['Name: New | Total: 2'], [], ['a']] | [['Name: New | Total: 2'], [], ['a']] | Passed |
| trace-2 | [['One: x'], [], ['a']] | [['One: x'], [], ['a']] | Passed |
| trace-3 | [['One: x | Two: y'], [], ['a']] | [['One: x | Two: y'], [], ['a']] | Passed |
| trace-4 | [['One: x', 'Again: y'], [], ['a']] | [['One: x', 'Again: y'], [], ['a']] | Passed |
| trace-5 | [['One: x'], [], ['a']] | [['One: x'], [], ['a']] | Passed |
| trace-6 | [[], [['a', [['Partial', 'x']], False], ['b', [], False]], []] | [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []] | Failed |
| trace-7 | [[], [['a', [], False]], []] | [[], [['a', [], False]], []] | Passed |
SHA-256 / 69554bde27361a7e3ab074e9018f02b896c5633b2d8550834d1f7d8fd3d582c3
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
bundles={}; delivered=set(); out=[]
for e in events:
if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
elif len(e)>1 and e[1] in bundles:
parts,sealed=bundles[e[1]]
if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
elif e[0]=='replace' and not sealed:
for p in parts:
if p[0]==e[2]: p[1]=e[3]
elif e[0]=='rename' and not sealed:
for p in parts:
if p[0]==e[2]: p[0]=e[3]
elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
elif e[0]=='seal': bundles[e[1]][1]=True
elif e[0]=='dispatch':
if not sealed or not parts: continue
if e[1] in delivered: continue
out.append(' | '.join(label+': '+text for label,text in parts))
delivered.add(e[1]); del bundles[e[1]]
return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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 | [['Name: New | Total: 2'], [], ['a']] | [['Name: New | Total: 2'], [], ['a']] | Passed |
| trace-2 | [['One: x'], [], ['a']] | [['One: x'], [], ['a']] | Passed |
| trace-3 | [['One: x | Two: y'], [], ['a']] | [['One: x | Two: y'], [], ['a']] | Passed |
| trace-4 | [['One: x', 'Again: y'], [], ['a']] | [['One: x', 'Again: y'], [], ['a']] | Passed |
| trace-5 | [['One: x'], [], ['a']] | [['One: x'], [], ['a']] | Passed |
| trace-6 | [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []] | [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []] | Passed |
| trace-7 | [[], [['a', [], False]], []] | [[], [['a', [], False]], []] | Passed |
SHA-256 / 86c069198ee85cd244b7d1d430170264dc61ec85b30f1d1b0ac122f430f084b7
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:32.008919+00:00.
Case digest / d06099f65c0366543a94479e3398e58cd90ba68c02d2a7cf41202ab765fdc273