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

N = 1
observations = []
def solve(r):
    return (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-read-index

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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 read index operation is admitted even though a leader reads before committing an entry in its term.

Return a Boolean admission decision for serve a linearizable read at a confirmed index. The record r must satisfy all of: r['current_term_commit'][0] == r['current_term_commit'][1]; len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]; r['applied_floor'][0] >= r['applied_floor'][1]; r['context_binding'][0] == r['context_binding'][1]; r['term_stability'][0] == r['term_stability'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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

evaluation_group: xd-read-index

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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 read index operation is admitted even though a read uses a response set lacking a voting majority.

Return a Boolean admission decision for serve a linearizable read at a confirmed index. The record r must satisfy all of: r['current_term_commit'][0] == r['current_term_commit'][1]; len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]; r['applied_floor'][0] >= r['applied_floor'][1]; r['context_binding'][0] == r['context_binding'][1]; r['term_stability'][0] == r['term_stability'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-read-index

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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 read index operation is admitted even though the state machine has not applied the confirmed read index.

Return a Boolean admission decision for serve a linearizable read at a confirmed index. The record r must satisfy all of: r['current_term_commit'][0] == r['current_term_commit'][1]; len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]; r['applied_floor'][0] >= r['applied_floor'][1]; r['context_binding'][0] == r['context_binding'][1]; r['term_stability'][0] == r['term_stability'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-read-index

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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 read index operation is admitted even though a delayed response confirms another read request.

Return a Boolean admission decision for serve a linearizable read at a confirmed index. The record r must satisfy all of: r['current_term_commit'][0] == r['current_term_commit'][1]; len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]; r['applied_floor'][0] >= r['applied_floor'][1]; r['context_binding'][0] == r['context_binding'][1]; r['term_stability'][0] == r['term_stability'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['current_term_commit'][0] == r['current_term_commit'][1]) and (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-read-index

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

N = 1
observations = []
def solve(r):
    return (len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]) and (r['applied_floor'][0] >= r['applied_floor'][1]) and (r['context_binding'][0] == r['context_binding'][1]) and (r['term_stability'][0] == r['term_stability'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'current_term_commit': [5, 5], 'quorum_confirmation': [[1, 2], 3], 'applied_floor': [9, 9], 'context_binding': ['r2', 'r2'], 'term_stability': [5, 5]}
check('valid operation', solve(r), True)
check('A leader reads before committing an entry in its term', solve(dict(r, **{'current_term_commit': [4, 5]})), False)
check('A read uses a response set lacking a voting majority', solve(dict(r, **{'quorum_confirmation': [[1], 3]})), False)
check('The state machine has not applied the confirmed read index', solve(dict(r, **{'applied_floor': [8, 9]})), False)
check('A delayed response confirms another read request', solve(dict(r, **{'context_binding': ['r1', 'r2']})), False)
check('A read completes after the leader observed a higher term', solve(dict(r, **{'term_stability': [5, 6]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'current_term_commit': [4, 5], 'quorum_confirmation': [[1], 3], 'applied_floor': [8, 9], 'context_binding': ['r1', 'r2'], 'term_stability': [5, 6]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 read index operation is admitted even though a read completes after the leader observed a higher term.

Return a Boolean admission decision for serve a linearizable read at a confirmed index. The record r must satisfy all of: r['current_term_commit'][0] == r['current_term_commit'][1]; len(set(r['quorum_confirmation'][0])) * 2 > r['quorum_confirmation'][1]; r['applied_floor'][0] >= r['applied_floor'][1]; r['context_binding'][0] == r['context_binding'][1]; r['term_stability'][0] == r['term_stability'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-prepare

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor prepare operation is admitted even though an acceptor promises a ballot below its durable promise.

Return a Boolean admission decision for promise a proposal ballot. The record r must satisfy all of: tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1]); r['slot_scope'][0] == r['slot_scope'][1]; r['promise_durable'] is True; r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]; r['configuration_epoch'][0] == r['configuration_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-prepare

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor prepare operation is admitted even though a prepare message targets a different consensus instance.

Return a Boolean admission decision for promise a proposal ballot. The record r must satisfy all of: tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1]); r['slot_scope'][0] == r['slot_scope'][1]; r['promise_durable'] is True; r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]; r['configuration_epoch'][0] == r['configuration_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-prepare

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor prepare operation is admitted even though a promise response escapes before its durable write.

Return a Boolean admission decision for promise a proposal ballot. The record r must satisfy all of: tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1]); r['slot_scope'][0] == r['slot_scope'][1]; r['promise_durable'] is True; r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]; r['configuration_epoch'][0] == r['configuration_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-prepare

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor prepare operation is admitted even though the response omits an already accepted value.

Return a Boolean admission decision for promise a proposal ballot. The record r must satisfy all of: tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1]); r['slot_scope'][0] == r['slot_scope'][1]; r['promise_durable'] is True; r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]; r['configuration_epoch'][0] == r['configuration_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1])) and (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-prepare

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

N = 1
observations = []
def solve(r):
    return (r['slot_scope'][0] == r['slot_scope'][1]) and (r['promise_durable'] is True) and (r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]) and (r['configuration_epoch'][0] == r['configuration_epoch'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_floor': [[5, 2], [5, 1]], 'slot_scope': ['s1', 's1'], 'promise_durable': True, 'accepted_attached': ['chosen', 'chosen'], 'configuration_epoch': [3, 3]}
check('valid operation', solve(r), True)
check('An acceptor promises a ballot below its durable promise', solve(dict(r, **{'ballot_floor': [[4, 9], [5, 1]]})), False)
check('A prepare message targets a different consensus instance', solve(dict(r, **{'slot_scope': ['s2', 's1']})), False)
check('A promise response escapes before its durable write', solve(dict(r, **{'promise_durable': False})), False)
check('The response omits an already accepted value', solve(dict(r, **{'accepted_attached': ['chosen', None]})), False)
check('A prepare is counted under the wrong voting epoch', solve(dict(r, **{'configuration_epoch': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_floor': [[4, 9], [5, 1]], 'slot_scope': ['s2', 's1'], 'promise_durable': False, 'accepted_attached': ['chosen', None], 'configuration_epoch': [2, 3]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor prepare operation is admitted even though a prepare is counted under the wrong voting epoch.

Return a Boolean admission decision for promise a proposal ballot. The record r must satisfy all of: tuple(r['ballot_floor'][0]) >= tuple(r['ballot_floor'][1]); r['slot_scope'][0] == r['slot_scope'][1]; r['promise_durable'] is True; r['accepted_attached'][0] is None or r['accepted_attached'][1] == r['accepted_attached'][0]; r['configuration_epoch'][0] == r['configuration_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-accept

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor accept operation is admitted even though a value is accepted below the promised ballot.

Return a Boolean admission decision for accept a proposal value. The record r must satisfy all of: tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1]); r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]; r['slot_untrimmed'][0] > r['slot_untrimmed'][1]; len(r['value_length'][0]) <= r['value_length'][1]; r['accept_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-accept

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor accept operation is admitted even though the same ballot accepts two different values.

Return a Boolean admission decision for accept a proposal value. The record r must satisfy all of: tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1]); r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]; r['slot_untrimmed'][0] > r['slot_untrimmed'][1]; len(r['value_length'][0]) <= r['value_length'][1]; r['accept_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-accept

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor accept operation is admitted even though a forgotten slot is reopened without its chosen evidence.

Return a Boolean admission decision for accept a proposal value. The record r must satisfy all of: tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1]); r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]; r['slot_untrimmed'][0] > r['slot_untrimmed'][1]; len(r['value_length'][0]) <= r['value_length'][1]; r['accept_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-accept

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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor accept operation is admitted even though an accept request bypasses the bounded value envelope.

Return a Boolean admission decision for accept a proposal value. The record r must satisfy all of: tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1]); r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]; r['slot_untrimmed'][0] > r['slot_untrimmed'][1]; len(r['value_length'][0]) <= r['value_length'][1]; r['accept_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1])) and (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-acceptor-accept

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

N = 1
observations = []
def solve(r):
    return (r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]) and (r['slot_untrimmed'][0] > r['slot_untrimmed'][1]) and (len(r['value_length'][0]) <= r['value_length'][1]) and (r['accept_persisted'] is True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'ballot_promised': [[6, 1], [5, 2]], 'ballot_value_unique': ['x', 'x'], 'slot_untrimmed': [11, 10], 'value_length': ['abc', 3], 'accept_persisted': True}
check('valid operation', solve(r), True)
check('A value is accepted below the promised ballot', solve(dict(r, **{'ballot_promised': [[5, 1], [5, 2]]})), False)
check('The same ballot accepts two different values', solve(dict(r, **{'ballot_value_unique': ['x', 'y']})), False)
check('A forgotten slot is reopened without its chosen evidence', solve(dict(r, **{'slot_untrimmed': [10, 10]})), False)
check('An accept request bypasses the bounded value envelope', solve(dict(r, **{'value_length': ['abcd', 3]})), False)
check('An accept acknowledgement precedes durable acceptance', solve(dict(r, **{'accept_persisted': False})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'ballot_promised': [[5, 1], [5, 2]], 'ballot_value_unique': ['x', 'y'], 'slot_untrimmed': [10, 10], 'value_length': ['abcd', 3], 'accept_persisted': False}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 acceptor accept operation is admitted even though an accept acknowledgement precedes durable acceptance.

Return a Boolean admission decision for accept a proposal value. The record r must satisfy all of: tuple(r['ballot_promised'][0]) >= tuple(r['ballot_promised'][1]); r['ballot_value_unique'][0] is None or r['ballot_value_unique'][0] == r['ballot_value_unique'][1]; r['slot_untrimmed'][0] > r['slot_untrimmed'][1]; len(r['value_length'][0]) <= r['value_length'][1]; r['accept_persisted'] is True. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-proposal-adoption

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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 proposal adoption operation is admitted even though a proposer proceeds with too few distinct promises.

Return a Boolean admission decision for choose a value after prepare responses. The record r must satisfy all of: len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]; r['highest_accepted'][0] == max(r['highest_accepted'][1]); r['accepted_value'][0] == r['accepted_value'][1]; all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]); len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])). Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-proposal-adoption

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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 proposal adoption operation is admitted even though a proposer ignores the highest previously accepted ballot.

Return a Boolean admission decision for choose a value after prepare responses. The record r must satisfy all of: len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]; r['highest_accepted'][0] == max(r['highest_accepted'][1]); r['accepted_value'][0] == r['accepted_value'][1]; all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]); len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])). Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-proposal-adoption

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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 proposal adoption operation is admitted even though a proposer replaces the adopted value with its client value.

Return a Boolean admission decision for choose a value after prepare responses. The record r must satisfy all of: len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]; r['highest_accepted'][0] == max(r['highest_accepted'][1]); r['accepted_value'][0] == r['accepted_value'][1]; all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]); len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])). Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-proposal-adoption

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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 proposal adoption operation is admitted even though prepare responses from different ballots are combined.

Return a Boolean admission decision for choose a value after prepare responses. The record r must satisfy all of: len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]; r['highest_accepted'][0] == max(r['highest_accepted'][1]); r['accepted_value'][0] == r['accepted_value'][1]; all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]); len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])). Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


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

N = 1
observations = []
def solve(r):
    return (len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]) and (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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)

evaluation_group: xd-proposal-adoption

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

N = 1
observations = []
def solve(r):
    return (r['highest_accepted'][0] == max(r['highest_accepted'][1])) and (r['accepted_value'][0] == r['accepted_value'][1]) and (all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1])) and (len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'promise_quorum': [[1, 2], 2], 'highest_accepted': [7, [2, 7, 5]], 'accepted_value': ['old', 'old'], 'responses_ballot': [8, [8, 8]], 'ballot_identity': [[8, 'a'], [8, 'b']]}
check('valid operation', solve(r), True)
check('A proposer proceeds with too few distinct promises', solve(dict(r, **{'promise_quorum': [[1, 1], 2]})), False)
check('A proposer ignores the highest previously accepted ballot', solve(dict(r, **{'highest_accepted': [5, [2, 7, 5]]})), False)
check('A proposer replaces the adopted value with its client value', solve(dict(r, **{'accepted_value': ['new', 'old']})), False)
check('Prepare responses from different ballots are combined', solve(dict(r, **{'responses_ballot': [8, [7, 8]]})), False)
check('Two proposers reuse one ballot identity', solve(dict(r, **{'ballot_identity': [[8, 'a'], [8, 'a']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'promise_quorum': [[1, 1], 2], 'highest_accepted': [5, [2, 7, 5]], 'accepted_value': ['new', 'old'], 'responses_ballot': [8, [7, 8]], 'ballot_identity': [[8, 'a'], [8, 'a']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 proposal adoption operation is admitted even though two proposers reuse one ballot identity.

Return a Boolean admission decision for choose a value after prepare responses. The record r must satisfy all of: len(set(r['promise_quorum'][0])) >= r['promise_quorum'][1]; r['highest_accepted'][0] == max(r['highest_accepted'][1]); r['accepted_value'][0] == r['accepted_value'][1]; all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]); len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])). Extra tracing fields are ignored; validation does not mutate the record.

split: open-access