broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=not sealed
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=bool(parts)
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

prompt:
The announcement trace violates the stated utterance-bundle contract.

Bundles are atomic ordered speech segments. Open initializes unsealed bundle; part appends [label,text] while unsealed; replace edits matching label only. Seal marks immutable. Dispatch requires sealed and nonempty, emits a single joined label:text string, removes bundle and records delivered ID. Reopen delivered ID clears delivery receipt. Retract drops bundle and receipt. Rename updates label preserving text. Limit truncates number of pending segments from end. Return speech and pending bundle segments/sealed status.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not sealed: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

prompt:
The announcement trace violates the stated utterance-bundle contract.

Bundles are atomic ordered speech segments. Open initializes unsealed bundle; part appends [label,text] while unsealed; replace edits matching label only. Seal marks immutable. Dispatch requires sealed and nonempty, emits a single joined label:text string, removes bundle and records delivered ID. Reopen delivered ID clears delivery receipt. Retract drops bundle and receipt. Rename updates label preserving text. Limit truncates number of pending segments from end. Return speech and pending bundle segments/sealed status.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(text for label,text in parts))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in reversed(parts)))
                delivered.add(e[1]); del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

prompt:
The announcement trace violates the stated utterance-bundle contract.

Bundles are atomic ordered speech segments. Open initializes unsealed bundle; part appends [label,text] while unsealed; replace edits matching label only. Seal marks immutable. Dispatch requires sealed and nonempty, emits a single joined label:text string, removes bundle and records delivered ID. Reopen delivered ID clears delivery receipt. Retract drops bundle and receipt. Rename updates label preserving text. Limit truncates number of pending segments from end. Return speech and pending bundle segments/sealed status.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                delivered.add(e[1])
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    bundles={}; delivered=set(); out=[]
    for e in events:
        if e[0]=='open': bundles[e[1]]=[[],False]; delivered.discard(e[1])
        elif e[0]=='retract': bundles.pop(e[1],None); delivered.discard(e[1])
        elif len(e)>1 and e[1] in bundles:
            parts,sealed=bundles[e[1]]
            if e[0]=='part' and not sealed: parts.append([e[2],e[3]])
            elif e[0]=='replace' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[1]=e[3]
            elif e[0]=='rename' and not sealed:
                for p in parts:
                    if p[0]==e[2]: p[0]=e[3]
            elif e[0]=='limit' and not sealed: del parts[max(0,e[2]):]
            elif e[0]=='seal': bundles[e[1]][1]=True
            elif e[0]=='dispatch':
                if not sealed or not parts: continue
                if e[1] in delivered: continue
                out.append(' | '.join(label+': '+text for label,text in parts))
                del bundles[e[1]]
    return [out,[[k,v[0],v[1]] for k,v in bundles.items()],sorted(delivered)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['open','a'],['part','a','Name','A'*N],['part','a','Count','2'],['replace','a','Name','New'],['rename','a','Count','Total'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['part','a','Late','no'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['part','a','Two','y'],['part','a','Three','z'],['limit','a',2],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','a'],['part','a','Again','y'],['seal','a'],['dispatch','a']]", "[['open','a'],['part','a','One','x'*N],['seal','a'],['dispatch','a'],['open','b'],['part','b','Two','y'],['retract','b']]", "[['open','a'],['part','a','Partial','x'*N],['dispatch','a'],['open','b'],['seal','b'],['dispatch','b']]", "[['open','a'],['part','a','Old','x'*N],['open','a']]"]
expected = {1: [[['Name: New | Total: 2'], [], ['a']], [['One: x'], [], ['a']], [['One: x | Two: y'], [], ['a']], [['One: x', 'Again: y'], [], ['a']], [['One: x'], [], ['a']], [[], [['a', [['Partial', 'x']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 2: [[['Name: New | Total: 2'], [], ['a']], [['One: xx'], [], ['a']], [['One: xx | Two: y'], [], ['a']], [['One: xx', 'Again: y'], [], ['a']], [['One: xx'], [], ['a']], [[], [['a', [['Partial', 'xx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 3: [[['Name: New | Total: 2'], [], ['a']], [['One: xxx'], [], ['a']], [['One: xxx | Two: y'], [], ['a']], [['One: xxx', 'Again: y'], [], ['a']], [['One: xxx'], [], ['a']], [[], [['a', [['Partial', 'xxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 4: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxx'], [], ['a']], [['One: xxxx | Two: y'], [], ['a']], [['One: xxxx', 'Again: y'], [], ['a']], [['One: xxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]], 5: [[['Name: New | Total: 2'], [], ['a']], [['One: xxxxx'], [], ['a']], [['One: xxxxx | Two: y'], [], ['a']], [['One: xxxxx', 'Again: y'], [], ['a']], [['One: xxxxx'], [], ['a']], [[], [['a', [['Partial', 'xxxxx']], False], ['b', [], True]], []], [[], [['a', [], False]], []]]}[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)

prompt:
The announcement trace violates the stated utterance-bundle contract.

Bundles are atomic ordered speech segments. Open initializes unsealed bundle; part appends [label,text] while unsealed; replace edits matching label only. Seal marks immutable. Dispatch requires sealed and nonempty, emits a single joined label:text string, removes bundle and records delivered ID. Reopen delivered ID clears delivery receipt. Retract drops bundle and receipt. Rename updates label preserving text. Limit truncates number of pending segments from end. Return speech and pending bundle segments/sealed status.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,False]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],not braille,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=True
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False; pending.clear()
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[1]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[1]=True; row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True; pending.clear()
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=False
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.clear()
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pass
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True; row[2]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[2]=True
            elif e[0]=='braille': row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[1]=True; row[2]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    pending={}; braille=True; out=[]
    for e in events:
        if e[0]=='submit': pending[e[1]]=[e[2],False,not braille]
        elif e[0]=='disable-braille':
            braille=False
            for row in pending.values(): row[2]=True
        elif e[0]=='enable-braille': braille=True
        elif e[0]=='cancel': pending.pop(e[1],None)
        elif len(e)>1 and e[1] in pending:
            row=pending[e[1]]
            if e[0]=='speech': row[1]=True
            elif e[0]=='braille': row[1]=True
            elif e[0]=='replace': row[:]=[e[2],False,not braille]
            elif e[0]=='commit':
                if not(row[1] and row[2]): continue
                out.append(row[0])
                del pending[e[1]]
    return [out,[[k]+v for k,v in pending.items()],braille]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = ["[['submit','a','hello'*N],['speech','a'],['commit','a']]", "[['submit','a','hello'*N],['braille','a'],['commit','a']]", "[['submit','a','hello'*N],['speech','a'],['braille','a'],['submit','b','keep'],['commit','a'],['commit','a']]", "[['submit','a','old'],['speech','a'],['braille','a'],['replace','a','new'*N],['commit','a']]", "[['submit','a','pending'*N],['disable-braille'],['commit','a'],['submit','b','future'],['speech','b'],['commit','b'],['enable-braille']]", "[['disable-braille'],['submit','a','new'*N],['commit','a']]", "[['disable-braille'],['submit','a','old'],['replace','a','new'*N],['speech','a'],['commit','a']]", "[['submit','a','a'*N],['submit','b','b'],['cancel','a']]", '[]']
expected = {1: [[[], [['a', 'hello', True, False]], True], [[], [['a', 'hello', False, True]], True], [['hello'], [['b', 'keep', False, False]], True], [[], [['a', 'new', False, False]], True], [['future'], [['a', 'pending', False, True]], True], [[], [['a', 'new', False, True]], False], [['new'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 2: [[[], [['a', 'hellohello', True, False]], True], [[], [['a', 'hellohello', False, True]], True], [['hellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnew', False, False]], True], [['future'], [['a', 'pendingpending', False, True]], True], [[], [['a', 'newnew', False, True]], False], [['newnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 3: [[[], [['a', 'hellohellohello', True, False]], True], [[], [['a', 'hellohellohello', False, True]], True], [['hellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpending', False, True]], True], [[], [['a', 'newnewnew', False, True]], False], [['newnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 4: [[[], [['a', 'hellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohello', False, True]], True], [['hellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnew', False, True]], False], [['newnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]], 5: [[[], [['a', 'hellohellohellohellohello', True, False]], True], [[], [['a', 'hellohellohellohellohello', False, True]], True], [['hellohellohellohellohello'], [['b', 'keep', False, False]], True], [[], [['a', 'newnewnewnewnew', False, False]], True], [['future'], [['a', 'pendingpendingpendingpendingpending', False, True]], True], [[], [['a', 'newnewnewnewnew', False, True]], False], [['newnewnewnewnew'], [], False], [[], [['b', 'b', False, False]], True], [[], [], True]]}[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)

prompt:
The announcement trace violates the stated dual-channel-barrier contract.

An announcement delivery couples speech and braille with per-message receipts. Submit creates [text,speechDone=False,brailleDone=False]. Speech and braille ACK set only their channel. Commit emits completion once only when both acknowledged and removes message. Disable-braille marks pending braille complete and affects future submissions; enable only affects future submissions. Replace text resets both receipts according to current enabled channels. Cancel drops one pending item. Report completion text, pending receipts and braille enabled.

split: open-access