FA-1461 / Concurrency / Open access
Commit a two-phase transaction: Commit messages precede the durable coordinator decision · case 01
The distributed transaction operation is admitted even though commit messages precede the durable coordinator decision.
ROOT CAUSE
The admission path omits the decision durable invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['decision_durable'] is True together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the decision durable check repairs the reported defect, but replacing the adjacent participant set check loses that independent invariant.
Case contract
Return a Boolean admission decision for commit a two-phase transaction. The record r must satisfy all of: all(x == 'prepared' for x in r['all_prepared']); 'abort' not in r['no_abort_vote']; r['decision_durable'] is True; set(r['participant_set'][0]) == set(r['participant_set'][1]); r['coordinator_epoch'][0] == r['coordinator_epoch'][1]. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
A deterministic local contract for concurrency. 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 (all(x == 'prepared' for x in r['all_prepared'])) and ('abort' not in r['no_abort_vote']) and (set(r['participant_set'][0]) == set(r['participant_set'][1])) and (r['coordinator_epoch'][0] == r['coordinator_epoch'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'all_prepared': ['prepared', 'prepared'], 'no_abort_vote': ['yes', 'yes'], 'decision_durable': True, 'participant_set': [['a', 'b'], ['a', 'b']], 'coordinator_epoch': [5, 5]}
check('valid operation', solve(r), True)
check('Commit proceeds while a participant has not prepared', solve(dict(r, **{'all_prepared': ['prepared', 'working']})), False)
check('A participant abort vote is ignored', solve(dict(r, **{'no_abort_vote': ['yes', 'abort']})), False)
check('Commit messages precede the durable coordinator decision', solve(dict(r, **{'decision_durable': False})), False)
check('A newly enlisted participant is omitted from the decision', solve(dict(r, **{'participant_set': [['a', 'b'], ['a']]})), False)
check('A recovered coordinator accepts the prior instance decision', solve(dict(r, **{'coordinator_epoch': [4, 5]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'all_prepared': ['prepared', 'working'], 'no_abort_vote': ['yes', 'abort'], 'decision_durable': False, 'participant_set': [['a', 'b'], ['a']], 'coordinator_epoch': [4, 5]}
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 |
| Commit proceeds while a participant has not prepared | False | False | Passed |
| A participant abort vote is ignored | False | False | Passed |
| Commit messages precede the durable coordinator decision | True | False | Failed |
| A newly enlisted participant is omitted from the decision | False | False | Passed |
| A recovered coordinator accepts the prior instance decision | 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 / ffc67acbeabaf56721aa7ef1c2217cc6e05918097716f1887daa8f65cd3a1159
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (all(x == 'prepared' for x in r['all_prepared'])) and ('abort' not in r['no_abort_vote']) and (r['decision_durable'] is True) and (r['coordinator_epoch'][0] == r['coordinator_epoch'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'all_prepared': ['prepared', 'prepared'], 'no_abort_vote': ['yes', 'yes'], 'decision_durable': True, 'participant_set': [['a', 'b'], ['a', 'b']], 'coordinator_epoch': [5, 5]}
check('valid operation', solve(r), True)
check('Commit proceeds while a participant has not prepared', solve(dict(r, **{'all_prepared': ['prepared', 'working']})), False)
check('A participant abort vote is ignored', solve(dict(r, **{'no_abort_vote': ['yes', 'abort']})), False)
check('Commit messages precede the durable coordinator decision', solve(dict(r, **{'decision_durable': False})), False)
check('A newly enlisted participant is omitted from the decision', solve(dict(r, **{'participant_set': [['a', 'b'], ['a']]})), False)
check('A recovered coordinator accepts the prior instance decision', solve(dict(r, **{'coordinator_epoch': [4, 5]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'all_prepared': ['prepared', 'working'], 'no_abort_vote': ['yes', 'abort'], 'decision_durable': False, 'participant_set': [['a', 'b'], ['a']], 'coordinator_epoch': [4, 5]}
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 |
| Commit proceeds while a participant has not prepared | False | False | Passed |
| A participant abort vote is ignored | False | False | Passed |
| Commit messages precede the durable coordinator decision | False | False | Passed |
| A newly enlisted participant is omitted from the decision | True | False | Failed |
| A recovered coordinator accepts the prior instance decision | 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 / 0f55dc2beff71a9b74690eeb4053848bfe4d64ace9f616b55968fcbfa43c5865
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (all(x == 'prepared' for x in r['all_prepared'])) and ('abort' not in r['no_abort_vote']) and (r['decision_durable'] is True) and (set(r['participant_set'][0]) == set(r['participant_set'][1])) and (r['coordinator_epoch'][0] == r['coordinator_epoch'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'all_prepared': ['prepared', 'prepared'], 'no_abort_vote': ['yes', 'yes'], 'decision_durable': True, 'participant_set': [['a', 'b'], ['a', 'b']], 'coordinator_epoch': [5, 5]}
check('valid operation', solve(r), True)
check('Commit proceeds while a participant has not prepared', solve(dict(r, **{'all_prepared': ['prepared', 'working']})), False)
check('A participant abort vote is ignored', solve(dict(r, **{'no_abort_vote': ['yes', 'abort']})), False)
check('Commit messages precede the durable coordinator decision', solve(dict(r, **{'decision_durable': False})), False)
check('A newly enlisted participant is omitted from the decision', solve(dict(r, **{'participant_set': [['a', 'b'], ['a']]})), False)
check('A recovered coordinator accepts the prior instance decision', solve(dict(r, **{'coordinator_epoch': [4, 5]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'all_prepared': ['prepared', 'working'], 'no_abort_vote': ['yes', 'abort'], 'decision_durable': False, 'participant_set': [['a', 'b'], ['a']], 'coordinator_epoch': [4, 5]}
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 |
| Commit proceeds while a participant has not prepared | False | False | Passed |
| A participant abort vote is ignored | False | False | Passed |
| Commit messages precede the durable coordinator decision | False | False | Passed |
| A newly enlisted participant is omitted from the decision | False | False | Passed |
| A recovered coordinator accepts the prior instance decision | 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 / 94e1a49da4a6a7d3f634fc190726bb5ed57954c5c46cf0ab258b7cacc624f2ab
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:37:02.417793+00:00.
Case digest / 7d2508fa28371655b144dc1b7e2fa59f431123ffbd2d51745cc80cafd2967977