FA-20381 / Assistive announcements / Open access
Reconnect keeps the old receipt namespace · case 01
The announcement trace violates the stated delivery-receipts contract.
ROOT CAUSE
Fault site: generation += 1 is implemented as generation = 0
VERIFIED REPAIR
Restore the stated transition: generation += 1
Unsuccessful approach: The attempted repair substitutes generation = 1 and still violates a regression oracle.
Case contract
A delivery is keyed by (utterance, generation). Submit replaces pending text for that key. A receipt is accepted only for the active generation and exact serial; accepted receipts append spoken text, remove pending, and retire the serial. Disconnect discards pending, increments generation, resets serial. Duplicate receipts do nothing. Report spoken, pending count, generation and next serial.
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):
pending = {}; retired = set(); spoken = []; generation = 0; serial = 0
for e in events:
if e[0] == 'submit':
serial += 1
pending[e[1]] = [generation, serial, e[2]]
elif e[0] == 'receipt':
ident, epoch, ticket = e[1:]
if epoch != generation: continue
if ticket in retired: continue
if ident not in pending: continue
if pending[ident][1] != ticket: continue
spoken.append(pending[ident][2])
del pending[ident]
retired.add(ticket)
elif e[0] == 'disconnect':
pending.clear()
generation = 0
serial = 0
retired.clear()
return [spoken, len(pending), generation, serial]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','word'*N],['submit','b','other'],['receipt','a',0,1],['receipt','b',0,1],['receipt','b',0,2]]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',0,2]]", "[['submit','a','old'],['submit','b','stale'],['disconnect'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',1,1]]", "[['disconnect'],['disconnect'],['submit','a','x'*N],['receipt','a',2,1]]", "[['submit','a','hello'*N],['receipt','a',0,1],['receipt','a',0,1]]", "[['submit','a','hi'*N],['submit','b','bye'],['receipt','a',0,1],['receipt','b',0,2],['disconnect'],['submit','a','new'],['receipt','a',1,1]]", "[['disconnect'],['submit','a','fresh'*N],['receipt','a',0,1]]", "[['submit','a','old'],['submit','b','old'],['disconnect']]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1]]", '[]']
expected = {1: [[['word', 'other'], 0, 0, 2], [['new'], 0, 0, 2], [['new'], 0, 1, 1], [['x'], 0, 2, 1], [['hello'], 0, 0, 1], [['hi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 2: [[['wordword', 'other'], 0, 0, 2], [['newnew'], 0, 0, 2], [['newnew'], 0, 1, 1], [['xx'], 0, 2, 1], [['hellohello'], 0, 0, 1], [['hihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 3: [[['wordwordword', 'other'], 0, 0, 2], [['newnewnew'], 0, 0, 2], [['newnewnew'], 0, 1, 1], [['xxx'], 0, 2, 1], [['hellohellohello'], 0, 0, 1], [['hihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 4: [[['wordwordwordword', 'other'], 0, 0, 2], [['newnewnewnew'], 0, 0, 2], [['newnewnewnew'], 0, 1, 1], [['xxxx'], 0, 2, 1], [['hellohellohellohello'], 0, 0, 1], [['hihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 5: [[['wordwordwordwordword', 'other'], 0, 0, 2], [['newnewnewnewnew'], 0, 0, 2], [['newnewnewnewnew'], 0, 1, 1], [['xxxxx'], 0, 2, 1], [['hellohellohellohellohello'], 0, 0, 1], [['hihihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| trace-1 | [['word', 'other'], 0, 0, 2] | [['word', 'other'], 0, 0, 2] | Passed |
| trace-2 | [['new'], 0, 0, 2] | [['new'], 0, 0, 2] | Passed |
| trace-3 | [['new'], 0, 0, 1] | [['new'], 0, 1, 1] | Failed |
| trace-4 | [[], 1, 0, 1] | [['x'], 0, 2, 1] | Failed |
| trace-5 | [['hello'], 0, 0, 1] | [['hello'], 0, 0, 1] | Passed |
| trace-6 | [['hi', 'bye'], 1, 0, 1] | [['hi', 'bye', 'new'], 0, 1, 1] | Failed |
| trace-7 | [['fresh'], 0, 0, 1] | [[], 1, 1, 1] | Failed |
| trace-8 | [[], 0, 0, 0] | [[], 0, 1, 0] | Failed |
| trace-9 | [[], 1, 0, 2] | [[], 1, 0, 2] | Passed |
| trace-10 | [[], 0, 0, 0] | [[], 0, 0, 0] | Passed |
SHA-256 / 0f57fadd826f6b22da4c4790049d6acabda704e33fdc3cbe10eac38b6fa8d7be
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
pending = {}; retired = set(); spoken = []; generation = 0; serial = 0
for e in events:
if e[0] == 'submit':
serial += 1
pending[e[1]] = [generation, serial, e[2]]
elif e[0] == 'receipt':
ident, epoch, ticket = e[1:]
if epoch != generation: continue
if ticket in retired: continue
if ident not in pending: continue
if pending[ident][1] != ticket: continue
spoken.append(pending[ident][2])
del pending[ident]
retired.add(ticket)
elif e[0] == 'disconnect':
pending.clear()
generation = 1
serial = 0
retired.clear()
return [spoken, len(pending), generation, serial]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','word'*N],['submit','b','other'],['receipt','a',0,1],['receipt','b',0,1],['receipt','b',0,2]]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',0,2]]", "[['submit','a','old'],['submit','b','stale'],['disconnect'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',1,1]]", "[['disconnect'],['disconnect'],['submit','a','x'*N],['receipt','a',2,1]]", "[['submit','a','hello'*N],['receipt','a',0,1],['receipt','a',0,1]]", "[['submit','a','hi'*N],['submit','b','bye'],['receipt','a',0,1],['receipt','b',0,2],['disconnect'],['submit','a','new'],['receipt','a',1,1]]", "[['disconnect'],['submit','a','fresh'*N],['receipt','a',0,1]]", "[['submit','a','old'],['submit','b','old'],['disconnect']]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1]]", '[]']
expected = {1: [[['word', 'other'], 0, 0, 2], [['new'], 0, 0, 2], [['new'], 0, 1, 1], [['x'], 0, 2, 1], [['hello'], 0, 0, 1], [['hi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 2: [[['wordword', 'other'], 0, 0, 2], [['newnew'], 0, 0, 2], [['newnew'], 0, 1, 1], [['xx'], 0, 2, 1], [['hellohello'], 0, 0, 1], [['hihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 3: [[['wordwordword', 'other'], 0, 0, 2], [['newnewnew'], 0, 0, 2], [['newnewnew'], 0, 1, 1], [['xxx'], 0, 2, 1], [['hellohellohello'], 0, 0, 1], [['hihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 4: [[['wordwordwordword', 'other'], 0, 0, 2], [['newnewnewnew'], 0, 0, 2], [['newnewnewnew'], 0, 1, 1], [['xxxx'], 0, 2, 1], [['hellohellohellohello'], 0, 0, 1], [['hihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 5: [[['wordwordwordwordword', 'other'], 0, 0, 2], [['newnewnewnewnew'], 0, 0, 2], [['newnewnewnewnew'], 0, 1, 1], [['xxxxx'], 0, 2, 1], [['hellohellohellohellohello'], 0, 0, 1], [['hihihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| trace-1 | [['word', 'other'], 0, 0, 2] | [['word', 'other'], 0, 0, 2] | Passed |
| trace-2 | [['new'], 0, 0, 2] | [['new'], 0, 0, 2] | Passed |
| trace-3 | [['new'], 0, 1, 1] | [['new'], 0, 1, 1] | Passed |
| trace-4 | [[], 1, 1, 1] | [['x'], 0, 2, 1] | Failed |
| trace-5 | [['hello'], 0, 0, 1] | [['hello'], 0, 0, 1] | Passed |
| trace-6 | [['hi', 'bye', 'new'], 0, 1, 1] | [['hi', 'bye', 'new'], 0, 1, 1] | Passed |
| trace-7 | [[], 1, 1, 1] | [[], 1, 1, 1] | Passed |
| trace-8 | [[], 0, 1, 0] | [[], 0, 1, 0] | Passed |
| trace-9 | [[], 1, 0, 2] | [[], 1, 0, 2] | Passed |
| trace-10 | [[], 0, 0, 0] | [[], 0, 0, 0] | Passed |
SHA-256 / 12e38e0663e605a602eddde60739035ababc49a5e82987a18375ff0d90154c47
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
pending = {}; retired = set(); spoken = []; generation = 0; serial = 0
for e in events:
if e[0] == 'submit':
serial += 1
pending[e[1]] = [generation, serial, e[2]]
elif e[0] == 'receipt':
ident, epoch, ticket = e[1:]
if epoch != generation: continue
if ticket in retired: continue
if ident not in pending: continue
if pending[ident][1] != ticket: continue
spoken.append(pending[ident][2])
del pending[ident]
retired.add(ticket)
elif e[0] == 'disconnect':
pending.clear()
generation += 1
serial = 0
retired.clear()
return [spoken, len(pending), generation, serial]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','word'*N],['submit','b','other'],['receipt','a',0,1],['receipt','b',0,1],['receipt','b',0,2]]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',0,2]]", "[['submit','a','old'],['submit','b','stale'],['disconnect'],['submit','a','new'*N],['receipt','a',0,1],['receipt','a',1,1]]", "[['disconnect'],['disconnect'],['submit','a','x'*N],['receipt','a',2,1]]", "[['submit','a','hello'*N],['receipt','a',0,1],['receipt','a',0,1]]", "[['submit','a','hi'*N],['submit','b','bye'],['receipt','a',0,1],['receipt','b',0,2],['disconnect'],['submit','a','new'],['receipt','a',1,1]]", "[['disconnect'],['submit','a','fresh'*N],['receipt','a',0,1]]", "[['submit','a','old'],['submit','b','old'],['disconnect']]", "[['submit','a','old'],['submit','a','new'*N],['receipt','a',0,1]]", '[]']
expected = {1: [[['word', 'other'], 0, 0, 2], [['new'], 0, 0, 2], [['new'], 0, 1, 1], [['x'], 0, 2, 1], [['hello'], 0, 0, 1], [['hi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 2: [[['wordword', 'other'], 0, 0, 2], [['newnew'], 0, 0, 2], [['newnew'], 0, 1, 1], [['xx'], 0, 2, 1], [['hellohello'], 0, 0, 1], [['hihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 3: [[['wordwordword', 'other'], 0, 0, 2], [['newnewnew'], 0, 0, 2], [['newnewnew'], 0, 1, 1], [['xxx'], 0, 2, 1], [['hellohellohello'], 0, 0, 1], [['hihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 4: [[['wordwordwordword', 'other'], 0, 0, 2], [['newnewnewnew'], 0, 0, 2], [['newnewnewnew'], 0, 1, 1], [['xxxx'], 0, 2, 1], [['hellohellohellohello'], 0, 0, 1], [['hihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 0]], 5: [[['wordwordwordwordword', 'other'], 0, 0, 2], [['newnewnewnewnew'], 0, 0, 2], [['newnewnewnewnew'], 0, 1, 1], [['xxxxx'], 0, 2, 1], [['hellohellohellohellohello'], 0, 0, 1], [['hihihihihi', 'bye', 'new'], 0, 1, 1], [[], 1, 1, 1], [[], 0, 1, 0], [[], 1, 0, 2], [[], 0, 0, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| trace-1 | [['word', 'other'], 0, 0, 2] | [['word', 'other'], 0, 0, 2] | Passed |
| trace-2 | [['new'], 0, 0, 2] | [['new'], 0, 0, 2] | Passed |
| trace-3 | [['new'], 0, 1, 1] | [['new'], 0, 1, 1] | Passed |
| trace-4 | [['x'], 0, 2, 1] | [['x'], 0, 2, 1] | Passed |
| trace-5 | [['hello'], 0, 0, 1] | [['hello'], 0, 0, 1] | Passed |
| trace-6 | [['hi', 'bye', 'new'], 0, 1, 1] | [['hi', 'bye', 'new'], 0, 1, 1] | Passed |
| trace-7 | [[], 1, 1, 1] | [[], 1, 1, 1] | Passed |
| trace-8 | [[], 0, 1, 0] | [[], 0, 1, 0] | Passed |
| trace-9 | [[], 1, 0, 2] | [[], 1, 0, 2] | Passed |
| trace-10 | [[], 0, 0, 0] | [[], 0, 0, 0] | Passed |
SHA-256 / 22dd36c0596f38d0b2a4cbdc0c531fa58c5f44a3a9b9280d55045adee1522a38
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:18.452275+00:00.
Case digest / 9e8b085d2c89e991aa1912b4a2251efd2d00517cd6b0905f625fb6a5628bfa3c