FA-1431 / Concurrency / Open access
Apply a remote conditional state update: Delete and recreate produces an ABA match on reused revision · case 01
The compare and swap operation is admitted even though delete and recreate produces an aba match on reused revision.
ROOT CAUSE
The admission path omits the object incarnation invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['object_incarnation'][0] == r['object_incarnation'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the object incarnation check repairs the reported defect, but replacing the adjacent expected existence check loses that independent invariant.
Case contract
Return a Boolean admission decision for apply a remote conditional state update. The record r must satisfy all of: r['revision_match'][0] == r['revision_match'][1]; r['object_incarnation'][0] == r['object_incarnation'][1]; r['expected_existence'] is False; tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][1]]; r['revision_increment'][0] == r['revision_increment'][1]+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 (r['revision_match'][0] == r['revision_match'][1]) and (r['expected_existence'] is False) and (tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][1]]) and (r['revision_increment'][0] == r['revision_increment'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'revision_match': [7, 7], 'object_incarnation': ['g2', 'g2'], 'expected_existence': False, 'transition_allowed': [['open', 'closed'], [['open', 'closed']]], 'revision_increment': [8, 7]}
check('valid operation', solve(r), True)
check('A stale writer replaces a newer revision', solve(dict(r, **{'revision_match': [6, 7]})), False)
check('Delete and recreate produces an ABA match on reused revision', solve(dict(r, **{'object_incarnation': ['g1', 'g2']})), False)
check('A create-only write replaces an existing object', solve(dict(r, **{'expected_existence': True})), False)
check('A conditional update performs an illegal lifecycle transition', solve(dict(r, **{'transition_allowed': [['closed', 'open'], [['open', 'closed']]]})), False)
check('A successful update fails to advance the revision', solve(dict(r, **{'revision_increment': [7, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'revision_match': [6, 7], 'object_incarnation': ['g1', 'g2'], 'expected_existence': True, 'transition_allowed': [['closed', 'open'], [['open', 'closed']]], 'revision_increment': [7, 7]}
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 stale writer replaces a newer revision | False | False | Passed |
| Delete and recreate produces an ABA match on reused revision | True | False | Failed |
| A create-only write replaces an existing object | False | False | Passed |
| A conditional update performs an illegal lifecycle transition | False | False | Passed |
| A successful update fails to advance the revision | 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 / 191c08d458523689984b03879101fb7b231858a0c21fc9d5a93bdcf1c088cf7c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['revision_match'][0] == r['revision_match'][1]) and (r['object_incarnation'][0] == r['object_incarnation'][1]) and (tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][1]]) and (r['revision_increment'][0] == r['revision_increment'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'revision_match': [7, 7], 'object_incarnation': ['g2', 'g2'], 'expected_existence': False, 'transition_allowed': [['open', 'closed'], [['open', 'closed']]], 'revision_increment': [8, 7]}
check('valid operation', solve(r), True)
check('A stale writer replaces a newer revision', solve(dict(r, **{'revision_match': [6, 7]})), False)
check('Delete and recreate produces an ABA match on reused revision', solve(dict(r, **{'object_incarnation': ['g1', 'g2']})), False)
check('A create-only write replaces an existing object', solve(dict(r, **{'expected_existence': True})), False)
check('A conditional update performs an illegal lifecycle transition', solve(dict(r, **{'transition_allowed': [['closed', 'open'], [['open', 'closed']]]})), False)
check('A successful update fails to advance the revision', solve(dict(r, **{'revision_increment': [7, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'revision_match': [6, 7], 'object_incarnation': ['g1', 'g2'], 'expected_existence': True, 'transition_allowed': [['closed', 'open'], [['open', 'closed']]], 'revision_increment': [7, 7]}
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 stale writer replaces a newer revision | False | False | Passed |
| Delete and recreate produces an ABA match on reused revision | False | False | Passed |
| A create-only write replaces an existing object | True | False | Failed |
| A conditional update performs an illegal lifecycle transition | False | False | Passed |
| A successful update fails to advance the revision | 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 / ef54db7488c69e01734de0520d27e67e691f78b4770a052b234f82f539e61f6d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['revision_match'][0] == r['revision_match'][1]) and (r['object_incarnation'][0] == r['object_incarnation'][1]) and (r['expected_existence'] is False) and (tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][1]]) and (r['revision_increment'][0] == r['revision_increment'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'revision_match': [7, 7], 'object_incarnation': ['g2', 'g2'], 'expected_existence': False, 'transition_allowed': [['open', 'closed'], [['open', 'closed']]], 'revision_increment': [8, 7]}
check('valid operation', solve(r), True)
check('A stale writer replaces a newer revision', solve(dict(r, **{'revision_match': [6, 7]})), False)
check('Delete and recreate produces an ABA match on reused revision', solve(dict(r, **{'object_incarnation': ['g1', 'g2']})), False)
check('A create-only write replaces an existing object', solve(dict(r, **{'expected_existence': True})), False)
check('A conditional update performs an illegal lifecycle transition', solve(dict(r, **{'transition_allowed': [['closed', 'open'], [['open', 'closed']]]})), False)
check('A successful update fails to advance the revision', solve(dict(r, **{'revision_increment': [7, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'revision_match': [6, 7], 'object_incarnation': ['g1', 'g2'], 'expected_existence': True, 'transition_allowed': [['closed', 'open'], [['open', 'closed']]], 'revision_increment': [7, 7]}
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 stale writer replaces a newer revision | False | False | Passed |
| Delete and recreate produces an ABA match on reused revision | False | False | Passed |
| A create-only write replaces an existing object | False | False | Passed |
| A conditional update performs an illegal lifecycle transition | False | False | Passed |
| A successful update fails to advance the revision | 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 / ec729cf5227b413021a5648beabc2283556e30e4e77d77a7fdfa98659adebf4b
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.282739+00:00.
Case digest / f2ddbb91ba096434b8a7ea078c3d7e8519cf19346ecf5b376932f383ddfc6a1b