FA-1441 / Concurrency / Open access
Apply a remote conditional state update: A conditional update performs an illegal lifecycle transition · case 01
The compare and swap operation is admitted even though a conditional update performs an illegal lifecycle transition.
ROOT CAUSE
The admission path omits the transition allowed invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][1]] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the transition allowed check repairs the reported defect, but replacing the adjacent revision increment 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['object_incarnation'][0] == r['object_incarnation'][1]) and (r['expected_existence'] is False) 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 | True | False | Failed |
| 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 / 06518942c24bc1303b69fe6ffb7f6e96fa7b88f68b01a9333692b9337dfeab86
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 (r['expected_existence'] is False) and (tuple(r['transition_allowed'][0]) in [tuple(x) for x in r['transition_allowed'][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 | True | False | Failed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / a6b1b2bf1d76567ef022c5a379c5052bf6d27c2c5f705791636f715fbaf57d54
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.305243+00:00.
Case digest / a785c1b8025b1c1088c0cd2a194d2031fd66eefcaa93bd7987439e126f156fe1