FA-20851 / Assistive announcements / Open access
Pump takes the most recently queued speech · case 01
The announcement trace violates the stated speech-backpressure contract.
ROOT CAUSE
Fault site: ident,text=q.pop(0) is implemented as ident,text=q.pop()
THE FAILURE
Fault site: ident,text=q.pop(0) is implemented as ident,text=q.pop()
Unsuccessful approach: The attempted repair substitutes ident,text=q.pop(0); text=text[:1] and still violates a regression oracle.
Case contract
Transport starts with two credits. Queue appends speech. Pump sends up to available credits, records inflight IDs and consumes credit. Acknowledge known inflight ID releases exactly one credit; unknown ACK does nothing. Window sets nonnegative capacity and credit to max(0,capacity-inflight). Disconnect moves inflight messages before queued ones in original send order and restores credits; cancel removes only queued matching IDs. Return sent text trace, inflight IDs, queue IDs and credit.
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):
capacity=2; credit=2; q=[]; flying={}; sent=[]
for e in events:
if e[0]=='queue': q.append([e[1],e[2]])
elif e[0]=='pump':
while q and credit>0:
ident,text=q.pop()
flying[ident]=text
sent.append(text)
credit-=1
elif e[0]=='ack' and e[1] in flying:
del flying[e[1]]
credit=max(0,capacity-len(flying))
elif e[0]=='window':
capacity=max(0,e[1]); credit=max(0,capacity-len(flying))
elif e[0]=='disconnect':
q=[[k,v] for k,v in flying.items()]+q
flying.clear(); credit=capacity
elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
return [sent,list(flying),[x[0] for x in q],credit]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['ack','a']]", "[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['disconnect'],['pump']]", "[['window',0],['queue','a','x'*N],['pump']]", "[['window',N+2],['queue','a','alpha'],['pump'],['ack','a'],['ack','a']]", "[['queue','a','x'*N],['queue','b','y'],['cancel','b']]", "[['ack','missing'],['pump']]", "[['queue','a','x'*N],['queue','b','y'],['pump'],['window',1],['ack','a'],['pump']]"]
expected = {1: [[['alpha', 'beta'], ['b'], ['c'], 1], [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 3], [[], [], ['a'], 2], [[], [], [], 2], [['x', 'y'], ['b'], [], 0]], 2: [[['alphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalpha', 'beta', 'alphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 4], [[], [], ['a'], 2], [[], [], [], 2], [['xx', 'y'], ['b'], [], 0]], 3: [[['alphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalpha', 'beta', 'alphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 5], [[], [], ['a'], 2], [[], [], [], 2], [['xxx', 'y'], ['b'], [], 0]], 4: [[['alphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalpha', 'beta', 'alphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 6], [[], [], ['a'], 2], [[], [], [], 2], [['xxxx', 'y'], ['b'], [], 0]], 5: [[['alphaalphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalphaalpha', 'beta', 'alphaalphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 7], [[], [], ['a'], 2], [[], [], [], 2], [['xxxxx', 'y'], ['b'], [], 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 | [['gamma', 'beta'], ['c', 'b'], ['a'], 0] | [['alpha', 'beta'], ['b'], ['c'], 1] | Failed |
| trace-2 | [['gamma', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0] | [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0] | Failed |
| trace-3 | [[], [], ['a'], 0] | [[], [], ['a'], 0] | Passed |
| trace-4 | [['alpha'], [], [], 3] | [['alpha'], [], [], 3] | Passed |
| trace-5 | [[], [], ['a'], 2] | [[], [], ['a'], 2] | Passed |
| trace-6 | [[], [], [], 2] | [[], [], [], 2] | Passed |
| trace-7 | [['y', 'x'], ['b'], [], 0] | [['x', 'y'], ['b'], [], 0] | Failed |
SHA-256 / 00c409f531f0b7274628f2aefccc42ed87240b62d71f4a56ccfcc0f6c9351f00
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
capacity=2; credit=2; q=[]; flying={}; sent=[]
for e in events:
if e[0]=='queue': q.append([e[1],e[2]])
elif e[0]=='pump':
while q and credit>0:
ident,text=q.pop(0); text=text[:1]
flying[ident]=text
sent.append(text)
credit-=1
elif e[0]=='ack' and e[1] in flying:
del flying[e[1]]
credit=max(0,capacity-len(flying))
elif e[0]=='window':
capacity=max(0,e[1]); credit=max(0,capacity-len(flying))
elif e[0]=='disconnect':
q=[[k,v] for k,v in flying.items()]+q
flying.clear(); credit=capacity
elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
return [sent,list(flying),[x[0] for x in q],credit]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['ack','a']]", "[['queue','a','alpha'*N],['queue','b','beta'],['queue','c','gamma'],['pump'],['disconnect'],['pump']]", "[['window',0],['queue','a','x'*N],['pump']]", "[['window',N+2],['queue','a','alpha'],['pump'],['ack','a'],['ack','a']]", "[['queue','a','x'*N],['queue','b','y'],['cancel','b']]", "[['ack','missing'],['pump']]", "[['queue','a','x'*N],['queue','b','y'],['pump'],['window',1],['ack','a'],['pump']]"]
expected = {1: [[['alpha', 'beta'], ['b'], ['c'], 1], [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 3], [[], [], ['a'], 2], [[], [], [], 2], [['x', 'y'], ['b'], [], 0]], 2: [[['alphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalpha', 'beta', 'alphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 4], [[], [], ['a'], 2], [[], [], [], 2], [['xx', 'y'], ['b'], [], 0]], 3: [[['alphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalpha', 'beta', 'alphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 5], [[], [], ['a'], 2], [[], [], [], 2], [['xxx', 'y'], ['b'], [], 0]], 4: [[['alphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalpha', 'beta', 'alphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 6], [[], [], ['a'], 2], [[], [], [], 2], [['xxxx', 'y'], ['b'], [], 0]], 5: [[['alphaalphaalphaalphaalpha', 'beta'], ['b'], ['c'], 1], [['alphaalphaalphaalphaalpha', 'beta', 'alphaalphaalphaalphaalpha', 'beta'], ['a', 'b'], ['c'], 0], [[], [], ['a'], 0], [['alpha'], [], [], 7], [[], [], ['a'], 2], [[], [], [], 2], [['xxxxx', 'y'], ['b'], [], 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 | [['a', 'b'], ['b'], ['c'], 1] | [['alpha', 'beta'], ['b'], ['c'], 1] | Failed |
| trace-2 | [['a', 'b', 'a', 'b'], ['a', 'b'], ['c'], 0] | [['alpha', 'beta', 'alpha', 'beta'], ['a', 'b'], ['c'], 0] | Failed |
| trace-3 | [[], [], ['a'], 0] | [[], [], ['a'], 0] | Passed |
| trace-4 | [['a'], [], [], 3] | [['alpha'], [], [], 3] | Failed |
| trace-5 | [[], [], ['a'], 2] | [[], [], ['a'], 2] | Passed |
| trace-6 | [[], [], [], 2] | [[], [], [], 2] | Passed |
| trace-7 | [['x', 'y'], ['b'], [], 0] | [['x', 'y'], ['b'], [], 0] | Passed |
SHA-256 / 4b902688aeaace732c20bd9e3a72a2828387835f9e86f33ada05b7579454ad5a
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:23.293643+00:00.
Case digest / 8fa00ed82131d319113b8940e18e8052cc9c6096a62404b7418d56c566f18fc9