FA-20361 / Assistive announcements / Open access
An obsolete receipt acknowledges replacement speech · case 01
The announcement trace violates the stated delivery-receipts contract.
ROOT CAUSE
Fault site: if pending[ident][1] != ticket: continue is implemented as if pending[ident][1] < ticket: continue
THE FAILURE
Fault site: if pending[ident][1] != ticket: continue is implemented as if pending[ident][1] < ticket: continue
Unsuccessful approach: The attempted repair substitutes if pending[ident][1] > ticket + 1: continue 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 += 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 | [['new'], 0, 0, 2] | [[], 1, 0, 2] | Failed |
| trace-10 | [[], 0, 0, 0] | [[], 0, 0, 0] | Passed |
SHA-256 / 81a045e3cfae9bbbe92304de1a5f8e560203e91b31446ff48766e68c10cdf9d9
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 + 1: 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 | [['new'], 0, 0, 2] | [[], 1, 0, 2] | Failed |
| trace-10 | [[], 0, 0, 0] | [[], 0, 0, 0] | Passed |
SHA-256 / 6d67f4215e09de395a1b4a473023c405dced7becf68758a2f2a56657da810cbb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 10 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.539254+00:00.
Case digest / 3d3799e05939a436ff65072058e0bad89a0494bd3a79ca343e596058d513a868