FAILURE MAP
← Case archive

FA-1446 / Concurrency / Open access

Apply a remote conditional state update: A successful update fails to advance the revision · case 01

The compare and swap operation is admitted even though a successful update fails to advance the revision.

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

ROOT CAUSE

The admission path omits the revision increment invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['revision_increment'][0] == r['revision_increment'][1]+1 together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the revision increment check repairs the reported defect, but replacing the adjacent revision match 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 (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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A stale writer replaces a newer revisionFalseFalsePassed
Delete and recreate produces an ABA match on reused revisionFalseFalsePassed
A create-only write replaces an existing objectFalseFalsePassed
A conditional update performs an illegal lifecycle transitionFalseFalsePassed
A successful update fails to advance the revisionTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / a6b1b2bf1d76567ef022c5a379c5052bf6d27c2c5f705791636f715fbaf57d54

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A stale writer replaces a newer revisionTrueFalseFailed
Delete and recreate produces an ABA match on reused revisionFalseFalsePassed
A create-only write replaces an existing objectFalseFalsePassed
A conditional update performs an illegal lifecycle transitionFalseFalsePassed
A successful update fails to advance the revisionFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / e2df964727d783f5b20119c97a96069686d50a303bea28825201d8bc67aadf45

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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A stale writer replaces a newer revisionFalseFalsePassed
Delete and recreate produces an ABA match on reused revisionFalseFalsePassed
A create-only write replaces an existing objectFalseFalsePassed
A conditional update performs an illegal lifecycle transitionFalseFalsePassed
A successful update fails to advance the revisionFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

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

Case digest / 61f2c6b2b9e24fdfcac1182562ad28f00e9fce7ae2d27273185a958be2a8ebdb