FAILURE MAP
← Case archive

FA-546 / Consensus / Open access

Choose a value after prepare responses: Two proposers reuse one ballot identity · case 01

The proposal adoption operation is admitted even though two proposers reuse one ballot identity.

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

ROOT CAUSE

The admission path omits the ballot identity invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require len(r['ballot_identity']) == len(set(tuple(x) for x in r['ballot_identity'])) together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the ballot identity check repairs the reported defect, but replacing the adjacent promise quorum 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 (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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A proposer proceeds with too few distinct promisesFalseFalsePassed
A proposer ignores the highest previously accepted ballotFalseFalsePassed
A proposer replaces the adopted value with its client valueFalseFalsePassed
Prepare responses from different ballots are combinedFalseFalsePassed
Two proposers reuse one ballot identityTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 6b09e8d15c68d7ed6631ae427575c48dcd9e525d890d665046a7499f43aa2b6d

2 / The unsuccessful fix

Exit 1
"""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)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
A proposer proceeds with too few distinct promisesTrueFalseFailed
A proposer ignores the highest previously accepted ballotFalseFalsePassed
A proposer replaces the adopted value with its client valueFalseFalsePassed
Prepare responses from different ballots are combinedFalseFalsePassed
Two proposers reuse one ballot identityFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 6085bdbd881336882776485e356ea1ab839edd3151b33322e90b01f7a868f2f7

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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A proposer proceeds with too few distinct promisesFalseFalsePassed
A proposer ignores the highest previously accepted ballotFalseFalsePassed
A proposer replaces the adopted value with its client valueFalseFalsePassed
Prepare responses from different ballots are combinedFalseFalsePassed
Two proposers reuse one ballot identityFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

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

Case digest / fc930259a0231b00e4b0b2980d9064836ceabffecfab1c74a1f3ebb079bfd33f