FA-461 / Consensus / Open access
Serve a linearizable read at a confirmed index: The state machine has not applied the confirmed read index · case 01
The read index operation is admitted even though the state machine has not applied the confirmed read index.
ROOT CAUSE
The admission path omits the applied floor invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['applied_floor'][0] >= r['applied_floor'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the applied floor check repairs the reported defect, but replacing the adjacent context binding check loses that independent invariant.
Case contract
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.
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 (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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A leader reads before committing an entry in its term | False | False | Passed |
| A read uses a response set lacking a voting majority | False | False | Passed |
| The state machine has not applied the confirmed read index | True | False | Failed |
| A delayed response confirms another read request | False | False | Passed |
| A read completes after the leader observed a higher term | 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 / 6a5f4b551c63d66b89f695c8a49d5fb602c329438d2fb90782c68894ebe6aa9d
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A leader reads before committing an entry in its term | False | False | Passed |
| A read uses a response set lacking a voting majority | False | False | Passed |
| The state machine has not applied the confirmed read index | False | False | Passed |
| A delayed response confirms another read request | True | False | Failed |
| A read completes after the leader observed a higher term | 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 / 8983dd52949d5033cfae6c3db93c5ecb744c9b87dedb4b3d00373657e13bb0dc
3 / The verified repair
Exit 0"""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]) 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A leader reads before committing an entry in its term | False | False | Passed |
| A read uses a response set lacking a voting majority | False | False | Passed |
| The state machine has not applied the confirmed read index | False | False | Passed |
| A delayed response confirms another read request | False | False | Passed |
| A read completes after the leader observed a higher term | 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 / 3ba0ad3cc61c4a29fa15605b0116a26627bdcc2f1c54c1bb7e0968a75e3a0290
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.148899+00:00.
Case digest / 2c35b7ac8621c3c40ebab8a397334d6e2d749fe0933e1e6db935adffe6476f7b