FA-20631 / Assistive announcements / Open access
Dispatch reports queue metadata instead of spoken content · case 01
The announcement trace violates the stated deadline-scheduler contract.
ROOT CAUSE
Fault site: spoken.append(chosen[:2]) is implemented as spoken.append(chosen[1:3])
THE FAILURE
Fault site: spoken.append(chosen[:2]) is implemented as spoken.append(chosen[1:3])
Unsuccessful approach: The attempted repair substitutes spoken.append(chosen[:1]) and still violates a regression oracle.
Case contract
Enqueue [id,text,ready,expiry,priority]. Cancel removes all matching IDs. Tick sets monotonic clock; dispatch at most one eligible unexpired item, highest priority then earliest enqueue. Expiry is exclusive. Future items remain. Expired items are purged even without ready work. Successful dispatch removes precisely that entry. Clock reset clears queue. Report spoken IDs/text, pending IDs and clock.
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):
q=[]; spoken=[]; now=0; seq=0
for e in events:
if e[0]=='enqueue':
seq+=1
q.append([e[1],e[2],e[3],e[4],e[5],seq])
elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
elif e[0]=='reset': now=0; q.clear()
elif e[0]=='tick':
now=max(now,e[1])
q=[x for x in q if x[3]>now]
eligible=[x for x in q if x[2]<=now]
if eligible:
chosen=min(eligible,key=lambda x:(-x[4],x[5]))
spoken.append(chosen[1:3])
q.remove(chosen)
return [spoken,[x[0] for x in q],now]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['enqueue','a','a'*N,0,100,1],['enqueue','b','b'*N,0,100,3],['enqueue','c','c',0,100,3],['tick',N],['tick',N],['tick',N]]", "[['enqueue','a','wait'*N,N+1,N+5,1],['tick',N]]", "[['enqueue','a','wait'*N,N+1,N+5,1],['tick',N],['tick',N+1]]", "[['enqueue','a','expired'*N,0,N,1],['tick',N]]", "[['enqueue','a','gone',0,100,1],['enqueue','b','keep'*N,0,100,2],['cancel','missing'],['cancel','a'],['tick',N]]", "[['tick',N+5],['tick',N]]", "[['tick',N+5],['tick',N],['enqueue','a','old',0,100,1],['reset']]", '[]', "[['enqueue','r','first',N,100,1],['enqueue','s','second',0,100,1],['tick',N]]", "[['enqueue','z','first',0,100,1],['enqueue','a','second'*N,0,100,1],['tick',N]]"]
expected = {1: [[[['b', 'b'], ['c', 'c'], ['a', 'a']], [], 1], [[], ['a'], 1], [[['a', 'wait']], [], 2], [[], [], 1], [[['b', 'keep']], [], 1], [[], [], 6], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 1], [[['z', 'first']], ['a'], 1]], 2: [[[['b', 'bb'], ['c', 'c'], ['a', 'aa']], [], 2], [[], ['a'], 2], [[['a', 'waitwait']], [], 3], [[], [], 2], [[['b', 'keepkeep']], [], 2], [[], [], 7], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 2], [[['z', 'first']], ['a'], 2]], 3: [[[['b', 'bbb'], ['c', 'c'], ['a', 'aaa']], [], 3], [[], ['a'], 3], [[['a', 'waitwaitwait']], [], 4], [[], [], 3], [[['b', 'keepkeepkeep']], [], 3], [[], [], 8], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 3], [[['z', 'first']], ['a'], 3]], 4: [[[['b', 'bbbb'], ['c', 'c'], ['a', 'aaaa']], [], 4], [[], ['a'], 4], [[['a', 'waitwaitwaitwait']], [], 5], [[], [], 4], [[['b', 'keepkeepkeepkeep']], [], 4], [[], [], 9], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 4], [[['z', 'first']], ['a'], 4]], 5: [[[['b', 'bbbbb'], ['c', 'c'], ['a', 'aaaaa']], [], 5], [[], ['a'], 5], [[['a', 'waitwaitwaitwaitwait']], [], 6], [[], [], 5], [[['b', 'keepkeepkeepkeepkeep']], [], 5], [[], [], 10], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 5], [[['z', 'first']], ['a'], 5]]}[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 | [[['b', 0], ['c', 0], ['a', 0]], [], 1] | [[['b', 'b'], ['c', 'c'], ['a', 'a']], [], 1] | Failed |
| trace-2 | [[], ['a'], 1] | [[], ['a'], 1] | Passed |
| trace-3 | [[['wait', 2]], [], 2] | [[['a', 'wait']], [], 2] | Failed |
| trace-4 | [[], [], 1] | [[], [], 1] | Passed |
| trace-5 | [[['keep', 0]], [], 1] | [[['b', 'keep']], [], 1] | Failed |
| trace-6 | [[], [], 6] | [[], [], 6] | Passed |
| trace-7 | [[], [], 0] | [[], [], 0] | Passed |
| trace-8 | [[], [], 0] | [[], [], 0] | Passed |
| trace-9 | [[['first', 1]], ['s'], 1] | [[['r', 'first']], ['s'], 1] | Failed |
| trace-10 | [[['first', 0]], ['a'], 1] | [[['z', 'first']], ['a'], 1] | Failed |
SHA-256 / 185da9a1239736b5c72f3fc5f3c038f0f81cdd0e546f0cae403e99f3bee300bb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
q=[]; spoken=[]; now=0; seq=0
for e in events:
if e[0]=='enqueue':
seq+=1
q.append([e[1],e[2],e[3],e[4],e[5],seq])
elif e[0]=='cancel': q=[x for x in q if x[0]!=e[1]]
elif e[0]=='reset': now=0; q.clear()
elif e[0]=='tick':
now=max(now,e[1])
q=[x for x in q if x[3]>now]
eligible=[x for x in q if x[2]<=now]
if eligible:
chosen=min(eligible,key=lambda x:(-x[4],x[5]))
spoken.append(chosen[:1])
q.remove(chosen)
return [spoken,[x[0] for x in q],now]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['enqueue','a','a'*N,0,100,1],['enqueue','b','b'*N,0,100,3],['enqueue','c','c',0,100,3],['tick',N],['tick',N],['tick',N]]", "[['enqueue','a','wait'*N,N+1,N+5,1],['tick',N]]", "[['enqueue','a','wait'*N,N+1,N+5,1],['tick',N],['tick',N+1]]", "[['enqueue','a','expired'*N,0,N,1],['tick',N]]", "[['enqueue','a','gone',0,100,1],['enqueue','b','keep'*N,0,100,2],['cancel','missing'],['cancel','a'],['tick',N]]", "[['tick',N+5],['tick',N]]", "[['tick',N+5],['tick',N],['enqueue','a','old',0,100,1],['reset']]", '[]', "[['enqueue','r','first',N,100,1],['enqueue','s','second',0,100,1],['tick',N]]", "[['enqueue','z','first',0,100,1],['enqueue','a','second'*N,0,100,1],['tick',N]]"]
expected = {1: [[[['b', 'b'], ['c', 'c'], ['a', 'a']], [], 1], [[], ['a'], 1], [[['a', 'wait']], [], 2], [[], [], 1], [[['b', 'keep']], [], 1], [[], [], 6], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 1], [[['z', 'first']], ['a'], 1]], 2: [[[['b', 'bb'], ['c', 'c'], ['a', 'aa']], [], 2], [[], ['a'], 2], [[['a', 'waitwait']], [], 3], [[], [], 2], [[['b', 'keepkeep']], [], 2], [[], [], 7], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 2], [[['z', 'first']], ['a'], 2]], 3: [[[['b', 'bbb'], ['c', 'c'], ['a', 'aaa']], [], 3], [[], ['a'], 3], [[['a', 'waitwaitwait']], [], 4], [[], [], 3], [[['b', 'keepkeepkeep']], [], 3], [[], [], 8], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 3], [[['z', 'first']], ['a'], 3]], 4: [[[['b', 'bbbb'], ['c', 'c'], ['a', 'aaaa']], [], 4], [[], ['a'], 4], [[['a', 'waitwaitwaitwait']], [], 5], [[], [], 4], [[['b', 'keepkeepkeepkeep']], [], 4], [[], [], 9], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 4], [[['z', 'first']], ['a'], 4]], 5: [[[['b', 'bbbbb'], ['c', 'c'], ['a', 'aaaaa']], [], 5], [[], ['a'], 5], [[['a', 'waitwaitwaitwaitwait']], [], 6], [[], [], 5], [[['b', 'keepkeepkeepkeepkeep']], [], 5], [[], [], 10], [[], [], 0], [[], [], 0], [[['r', 'first']], ['s'], 5], [[['z', 'first']], ['a'], 5]]}[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 | [[['b'], ['c'], ['a']], [], 1] | [[['b', 'b'], ['c', 'c'], ['a', 'a']], [], 1] | Failed |
| trace-2 | [[], ['a'], 1] | [[], ['a'], 1] | Passed |
| trace-3 | [[['a']], [], 2] | [[['a', 'wait']], [], 2] | Failed |
| trace-4 | [[], [], 1] | [[], [], 1] | Passed |
| trace-5 | [[['b']], [], 1] | [[['b', 'keep']], [], 1] | Failed |
| trace-6 | [[], [], 6] | [[], [], 6] | Passed |
| trace-7 | [[], [], 0] | [[], [], 0] | Passed |
| trace-8 | [[], [], 0] | [[], [], 0] | Passed |
| trace-9 | [[['r']], ['s'], 1] | [[['r', 'first']], ['s'], 1] | Failed |
| trace-10 | [[['z']], ['a'], 1] | [[['z', 'first']], ['a'], 1] | Failed |
SHA-256 / 4a5731f04905a2a94dad7e951ca7afe9f0c908309cfac0827387e3dfe9af057f
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:20.858621+00:00.
Case digest / 6b698262bb021fdcee7f52ee76e200e80162a12b9008d779c5c8e33a8d65263b