FAILURE MAP
← Case archive

FA-20546 / Assistive announcements / Open access

Re-registration preserves text from the previous lease · case 01

The announcement trace violates the stated context-lease contract.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Fault site: leases[e[1]]=[epochs[e[1]],''] is implemented as leases[e[1]]=[epochs[e[1]],leases.get(e[1],[0,''])[1]]

VERIFIED REPAIR

Restore the stated transition: leases[e[1]]=[epochs[e[1]],'']

Unsuccessful approach: The attempted repair substitutes leases[e[1]]=[epochs[e[1]],e[1]] and still violates a regression oracle.

Case contract

Announcement context leases map source to [epoch,text]. Register increments the source epoch and clears its text; publish requires a live source and matching epoch. Queue snapshots text plus source epoch. Drain speaks only still-live matching leases. Remove revokes source. Rename transfers a source lease and invalidates queued old-source messages. Report spoken and queue depth.

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):
    leases={}; epochs={}; queue=[]; spoken=[]
    for e in events:
        if e[0]=='register':
            epochs[e[1]]=epochs.get(e[1],0)+1
            leases[e[1]]=[epochs[e[1]],leases.get(e[1],[0,''])[1]]
        elif e[0]=='publish':
            if e[1] not in leases: continue
            if e[2]!=leases[e[1]][0]: continue
            leases[e[1]][1]=e[3]
        elif e[0]=='queue' and e[1] in leases:
            queue.append([e[1],leases[e[1]][0],leases[e[1]][1]])
        elif e[0]=='remove': leases.pop(e[1],None)
        elif e[0]=='rename' and e[1] in leases:
            leases[e[2]]=leases.pop(e[1])
        elif e[0]=='drain':
            for source,epoch,text in queue:
                if source not in leases: continue
                if leases[source][0]!=epoch: continue
                if text: spoken.append(text)
            queue.clear()
    return [spoken,len(queue),sorted((k,v) for k,v in leases.items())]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['register','a'],['publish','a',1,'old'*N],['queue','a'],['publish','a',1,'new'],['drain'],['drain']]", "[['register','a'],['publish','a',1,'old'],['queue','a'],['register','a'],['publish','a',1,'stale'*N],['queue','a'],['drain']]", "[['register','a'],['register','b'],['publish','b',1,'keep'*N],['remove','a'],['queue','b'],['drain']]", "[['register','a'],['publish','a',1,'hello'*N],['queue','a'],['rename','a','b'],['queue','b'],['drain']]", "[['register','a'],['queue','a'],['drain'],['publish','a',1,'  x  '*N],['queue','a'],['drain']]", "[['publish','missing',1,'x'*N],['remove','missing'],['drain']]", "[['register','a'],['publish','a',1,'x'*N],['queue','a'],['remove','a'],['drain']]"]
expected = {1: [[['old'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keep'], 0, [('b', [1, 'keep'])]], [['hello'], 0, [('b', [1, 'hello'])]], [['  x  '], 0, [('a', [1, '  x  '])]], [[], 0, []], [[], 0, []]], 2: [[['oldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeep'], 0, [('b', [1, 'keepkeep'])]], [['hellohello'], 0, [('b', [1, 'hellohello'])]], [['  x    x  '], 0, [('a', [1, '  x    x  '])]], [[], 0, []], [[], 0, []]], 3: [[['oldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeep'], 0, [('b', [1, 'keepkeepkeep'])]], [['hellohellohello'], 0, [('b', [1, 'hellohellohello'])]], [['  x    x    x  '], 0, [('a', [1, '  x    x    x  '])]], [[], 0, []], [[], 0, []]], 4: [[['oldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeep'])]], [['hellohellohellohello'], 0, [('b', [1, 'hellohellohellohello'])]], [['  x    x    x    x  '], 0, [('a', [1, '  x    x    x    x  '])]], [[], 0, []], [[], 0, []]], 5: [[['oldoldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeepkeep'])]], [['hellohellohellohellohello'], 0, [('b', [1, 'hellohellohellohellohello'])]], [['  x    x    x    x    x  '], 0, [('a', [1, '  x    x    x    x    x  '])]], [[], 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 fixtureActualExpectedOutcome
trace-1[['old'], 0, [['a', [1, 'new']]]][['old'], 0, [['a', [1, 'new']]]]Passed
trace-2[['old'], 0, [['a', [2, 'old']]]][[], 0, [['a', [2, '']]]]Failed
trace-3[['keep'], 0, [['b', [1, 'keep']]]][['keep'], 0, [['b', [1, 'keep']]]]Passed
trace-4[['hello'], 0, [['b', [1, 'hello']]]][['hello'], 0, [['b', [1, 'hello']]]]Passed
trace-5[[' x '], 0, [['a', [1, ' x ']]]][[' x '], 0, [['a', [1, ' x ']]]]Passed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[], 0, []][[], 0, []]Passed

SHA-256 / 4fa205bb3ff80b874a95622034cd3ccc2a2858ec6aa57a2bdf5ef1feb7211094

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    leases={}; epochs={}; queue=[]; spoken=[]
    for e in events:
        if e[0]=='register':
            epochs[e[1]]=epochs.get(e[1],0)+1
            leases[e[1]]=[epochs[e[1]],e[1]]
        elif e[0]=='publish':
            if e[1] not in leases: continue
            if e[2]!=leases[e[1]][0]: continue
            leases[e[1]][1]=e[3]
        elif e[0]=='queue' and e[1] in leases:
            queue.append([e[1],leases[e[1]][0],leases[e[1]][1]])
        elif e[0]=='remove': leases.pop(e[1],None)
        elif e[0]=='rename' and e[1] in leases:
            leases[e[2]]=leases.pop(e[1])
        elif e[0]=='drain':
            for source,epoch,text in queue:
                if source not in leases: continue
                if leases[source][0]!=epoch: continue
                if text: spoken.append(text)
            queue.clear()
    return [spoken,len(queue),sorted((k,v) for k,v in leases.items())]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['register','a'],['publish','a',1,'old'*N],['queue','a'],['publish','a',1,'new'],['drain'],['drain']]", "[['register','a'],['publish','a',1,'old'],['queue','a'],['register','a'],['publish','a',1,'stale'*N],['queue','a'],['drain']]", "[['register','a'],['register','b'],['publish','b',1,'keep'*N],['remove','a'],['queue','b'],['drain']]", "[['register','a'],['publish','a',1,'hello'*N],['queue','a'],['rename','a','b'],['queue','b'],['drain']]", "[['register','a'],['queue','a'],['drain'],['publish','a',1,'  x  '*N],['queue','a'],['drain']]", "[['publish','missing',1,'x'*N],['remove','missing'],['drain']]", "[['register','a'],['publish','a',1,'x'*N],['queue','a'],['remove','a'],['drain']]"]
expected = {1: [[['old'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keep'], 0, [('b', [1, 'keep'])]], [['hello'], 0, [('b', [1, 'hello'])]], [['  x  '], 0, [('a', [1, '  x  '])]], [[], 0, []], [[], 0, []]], 2: [[['oldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeep'], 0, [('b', [1, 'keepkeep'])]], [['hellohello'], 0, [('b', [1, 'hellohello'])]], [['  x    x  '], 0, [('a', [1, '  x    x  '])]], [[], 0, []], [[], 0, []]], 3: [[['oldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeep'], 0, [('b', [1, 'keepkeepkeep'])]], [['hellohellohello'], 0, [('b', [1, 'hellohellohello'])]], [['  x    x    x  '], 0, [('a', [1, '  x    x    x  '])]], [[], 0, []], [[], 0, []]], 4: [[['oldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeep'])]], [['hellohellohellohello'], 0, [('b', [1, 'hellohellohellohello'])]], [['  x    x    x    x  '], 0, [('a', [1, '  x    x    x    x  '])]], [[], 0, []], [[], 0, []]], 5: [[['oldoldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeepkeep'])]], [['hellohellohellohellohello'], 0, [('b', [1, 'hellohellohellohellohello'])]], [['  x    x    x    x    x  '], 0, [('a', [1, '  x    x    x    x    x  '])]], [[], 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 fixtureActualExpectedOutcome
trace-1[['old'], 0, [['a', [1, 'new']]]][['old'], 0, [['a', [1, 'new']]]]Passed
trace-2[['a'], 0, [['a', [2, 'a']]]][[], 0, [['a', [2, '']]]]Failed
trace-3[['keep'], 0, [['b', [1, 'keep']]]][['keep'], 0, [['b', [1, 'keep']]]]Passed
trace-4[['hello'], 0, [['b', [1, 'hello']]]][['hello'], 0, [['b', [1, 'hello']]]]Passed
trace-5[['a', ' x '], 0, [['a', [1, ' x ']]]][[' x '], 0, [['a', [1, ' x ']]]]Failed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[], 0, []][[], 0, []]Passed

SHA-256 / 38d34c24e55686ad0554299a43e0fb0f287ed7bdebc79ecac01c202e2b507232

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    leases={}; epochs={}; queue=[]; spoken=[]
    for e in events:
        if e[0]=='register':
            epochs[e[1]]=epochs.get(e[1],0)+1
            leases[e[1]]=[epochs[e[1]],'']
        elif e[0]=='publish':
            if e[1] not in leases: continue
            if e[2]!=leases[e[1]][0]: continue
            leases[e[1]][1]=e[3]
        elif e[0]=='queue' and e[1] in leases:
            queue.append([e[1],leases[e[1]][0],leases[e[1]][1]])
        elif e[0]=='remove': leases.pop(e[1],None)
        elif e[0]=='rename' and e[1] in leases:
            leases[e[2]]=leases.pop(e[1])
        elif e[0]=='drain':
            for source,epoch,text in queue:
                if source not in leases: continue
                if leases[source][0]!=epoch: continue
                if text: spoken.append(text)
            queue.clear()
    return [spoken,len(queue),sorted((k,v) for k,v in leases.items())]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['register','a'],['publish','a',1,'old'*N],['queue','a'],['publish','a',1,'new'],['drain'],['drain']]", "[['register','a'],['publish','a',1,'old'],['queue','a'],['register','a'],['publish','a',1,'stale'*N],['queue','a'],['drain']]", "[['register','a'],['register','b'],['publish','b',1,'keep'*N],['remove','a'],['queue','b'],['drain']]", "[['register','a'],['publish','a',1,'hello'*N],['queue','a'],['rename','a','b'],['queue','b'],['drain']]", "[['register','a'],['queue','a'],['drain'],['publish','a',1,'  x  '*N],['queue','a'],['drain']]", "[['publish','missing',1,'x'*N],['remove','missing'],['drain']]", "[['register','a'],['publish','a',1,'x'*N],['queue','a'],['remove','a'],['drain']]"]
expected = {1: [[['old'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keep'], 0, [('b', [1, 'keep'])]], [['hello'], 0, [('b', [1, 'hello'])]], [['  x  '], 0, [('a', [1, '  x  '])]], [[], 0, []], [[], 0, []]], 2: [[['oldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeep'], 0, [('b', [1, 'keepkeep'])]], [['hellohello'], 0, [('b', [1, 'hellohello'])]], [['  x    x  '], 0, [('a', [1, '  x    x  '])]], [[], 0, []], [[], 0, []]], 3: [[['oldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeep'], 0, [('b', [1, 'keepkeepkeep'])]], [['hellohellohello'], 0, [('b', [1, 'hellohellohello'])]], [['  x    x    x  '], 0, [('a', [1, '  x    x    x  '])]], [[], 0, []], [[], 0, []]], 4: [[['oldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeep'])]], [['hellohellohellohello'], 0, [('b', [1, 'hellohellohellohello'])]], [['  x    x    x    x  '], 0, [('a', [1, '  x    x    x    x  '])]], [[], 0, []], [[], 0, []]], 5: [[['oldoldoldoldold'], 0, [('a', [1, 'new'])]], [[], 0, [('a', [2, ''])]], [['keepkeepkeepkeepkeep'], 0, [('b', [1, 'keepkeepkeepkeepkeep'])]], [['hellohellohellohellohello'], 0, [('b', [1, 'hellohellohellohellohello'])]], [['  x    x    x    x    x  '], 0, [('a', [1, '  x    x    x    x    x  '])]], [[], 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 fixtureActualExpectedOutcome
trace-1[['old'], 0, [['a', [1, 'new']]]][['old'], 0, [['a', [1, 'new']]]]Passed
trace-2[[], 0, [['a', [2, '']]]][[], 0, [['a', [2, '']]]]Passed
trace-3[['keep'], 0, [['b', [1, 'keep']]]][['keep'], 0, [['b', [1, 'keep']]]]Passed
trace-4[['hello'], 0, [['b', [1, 'hello']]]][['hello'], 0, [['b', [1, 'hello']]]]Passed
trace-5[[' x '], 0, [['a', [1, ' x ']]]][[' x '], 0, [['a', [1, ' x ']]]]Passed
trace-6[[], 0, []][[], 0, []]Passed
trace-7[[], 0, []][[], 0, []]Passed

SHA-256 / f1ab57995f15cbc8b447b4338b46bdd28756bfd55cb0d36cd48aca7b65a69243

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:19.964512+00:00.

Case digest / 91335dc509477c42d07d65f358d3902166ee2c516de11baa867dd6bb6a3caa6f