FAILURE MAP
← Case archive

FA-531 / Consensus / Open access

Choose a value after prepare responses: A proposer ignores the highest previously accepted ballot · case 01

The proposal adoption operation is admitted even though a proposer ignores the highest previously accepted ballot.

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

ROOT CAUSE

The admission path omits the highest accepted invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['highest_accepted'][0] == max(r['highest_accepted'][1]) together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the highest accepted check repairs the reported defect, but replacing the adjacent accepted value 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['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 ballotTrueFalseFailed
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 / d37c62e25fe976956fd4cc540d4e71137b666832b7c4b857df764cc4b8ece289

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 (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 valueTrueFalseFailed
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 / bccf26faec5ef8b2175e2c11e4c9f5cdbcf28a09c6258e075dceb4aba4ca0fbd

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

Case digest / 897cdf31b451c80d412f652c06007735cb672e0d2a413d13edf554e9bc6d987a