FA-541 / Consensus / Open access
Choose a value after prepare responses: Prepare responses from different ballots are combined · case 01
The proposal adoption operation is admitted even though prepare responses from different ballots are combined.
ROOT CAUSE
The admission path omits the responses ballot invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require all(x == r['responses_ballot'][0] for x in r['responses_ballot'][1]) together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the responses ballot check repairs the reported defect, but replacing the adjacent ballot identity check loses that independent invariant.
Case contract
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.
Why this case matters
A deterministic local contract for consensus. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.
1 / The failure
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A proposer proceeds with too few distinct promises | False | False | Passed |
| A proposer ignores the highest previously accepted ballot | False | False | Passed |
| A proposer replaces the adopted value with its client value | False | False | Passed |
| Prepare responses from different ballots are combined | True | False | Failed |
| Two proposers reuse one ballot identity | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 9160392747f1025eb8ac05acc52030dd782a82ad3d811f0dc62cfbea7ffca4a5
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A proposer proceeds with too few distinct promises | False | False | Passed |
| A proposer ignores the highest previously accepted ballot | False | False | Passed |
| A proposer replaces the adopted value with its client value | False | False | Passed |
| Prepare responses from different ballots are combined | False | False | Passed |
| Two proposers reuse one ballot identity | True | False | Failed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 6b09e8d15c68d7ed6631ae427575c48dcd9e525d890d665046a7499f43aa2b6d
3 / The verified repair
Exit 0"""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])) 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A proposer proceeds with too few distinct promises | False | False | Passed |
| A proposer ignores the highest previously accepted ballot | False | False | Passed |
| A proposer replaces the adopted value with its client value | False | False | Passed |
| Prepare responses from different ballots are combined | False | False | Passed |
| Two proposers reuse one ballot identity | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 85329280e82a2f5e4b2e69296171dd2eb6eb7ec01abf2a8ba66d23cd59063f3f
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:36:53.806865+00:00.
Case digest / fa3942fb7fc1d5fa8354ea3eb95577af7bd46305f9db49c1e519601470f5f463