FAILURE MAP
← Case archive

FA-716 / Replication / Open access

Acknowledge a replicated write concern: Replica acknowledgements refer to another write · case 01

The write concern operation is admitted even though replica acknowledgements refer to another write.

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

ROOT CAUSE

The admission path omits the write binding invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require all(x == r['write_binding'][0] for x in r['write_binding'][1]) together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the write binding check repairs the reported defect, but replacing the adjacent ack deadline check loses that independent invariant.

Case contract

Return a Boolean admission decision for acknowledge a replicated write concern. The record r must satisfy all of: len(set(r['distinct_replicas'][0])) >= r['distinct_replicas'][1]; sum(r['durable_acks'][0]) >= r['durable_acks'][1]; len(set(r['failure_domains'][0])) >= r['failure_domains'][1]; all(x == r['write_binding'][0] for x in r['write_binding'][1]); r['ack_deadline'][0] < r['ack_deadline'][1]. Extra tracing fields are ignored; validation does not mutate the record.

Why this case matters

A deterministic local contract for replication. 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 (len(set(r['distinct_replicas'][0])) >= r['distinct_replicas'][1]) and (sum(r['durable_acks'][0]) >= r['durable_acks'][1]) and (len(set(r['failure_domains'][0])) >= r['failure_domains'][1]) and (r['ack_deadline'][0] < r['ack_deadline'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'distinct_replicas': [['a', 'b'], 2], 'durable_acks': [[True, True, False], 2], 'failure_domains': [['z1', 'z2'], 2], 'write_binding': ['w2', ['w2', 'w2']], 'ack_deadline': [9, 10]}
check('valid operation', solve(r), True)
check('Repeated acknowledgements count as separate replicas', solve(dict(r, **{'distinct_replicas': [['a', 'a'], 2]})), False)
check('Volatile receipt acknowledgements satisfy durable concern', solve(dict(r, **{'durable_acks': [[True, False, False], 2]})), False)
check('Multiple copies in one failure domain satisfy zone concern', solve(dict(r, **{'failure_domains': [['z1', 'z1'], 2]})), False)
check('Replica acknowledgements refer to another write', solve(dict(r, **{'write_binding': ['w2', ['w1', 'w2']]})), False)
check('A write is reported successful after its response deadline', solve(dict(r, **{'ack_deadline': [10, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'distinct_replicas': [['a', 'a'], 2], 'durable_acks': [[True, False, False], 2], 'failure_domains': [['z1', 'z1'], 2], 'write_binding': ['w2', ['w1', 'w2']], 'ack_deadline': [10, 10]}
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
Repeated acknowledgements count as separate replicasFalseFalsePassed
Volatile receipt acknowledgements satisfy durable concernFalseFalsePassed
Multiple copies in one failure domain satisfy zone concernFalseFalsePassed
Replica acknowledgements refer to another writeTrueFalseFailed
A write is reported successful after its response deadlineFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / ff86455c1df88840192766cd1648cf63cdf30527b0a32292a5b26bb8e962aad8

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(r):
    return (len(set(r['distinct_replicas'][0])) >= r['distinct_replicas'][1]) and (sum(r['durable_acks'][0]) >= r['durable_acks'][1]) and (len(set(r['failure_domains'][0])) >= r['failure_domains'][1]) and (all(x == r['write_binding'][0] for x in r['write_binding'][1]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'distinct_replicas': [['a', 'b'], 2], 'durable_acks': [[True, True, False], 2], 'failure_domains': [['z1', 'z2'], 2], 'write_binding': ['w2', ['w2', 'w2']], 'ack_deadline': [9, 10]}
check('valid operation', solve(r), True)
check('Repeated acknowledgements count as separate replicas', solve(dict(r, **{'distinct_replicas': [['a', 'a'], 2]})), False)
check('Volatile receipt acknowledgements satisfy durable concern', solve(dict(r, **{'durable_acks': [[True, False, False], 2]})), False)
check('Multiple copies in one failure domain satisfy zone concern', solve(dict(r, **{'failure_domains': [['z1', 'z1'], 2]})), False)
check('Replica acknowledgements refer to another write', solve(dict(r, **{'write_binding': ['w2', ['w1', 'w2']]})), False)
check('A write is reported successful after its response deadline', solve(dict(r, **{'ack_deadline': [10, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'distinct_replicas': [['a', 'a'], 2], 'durable_acks': [[True, False, False], 2], 'failure_domains': [['z1', 'z1'], 2], 'write_binding': ['w2', ['w1', 'w2']], 'ack_deadline': [10, 10]}
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
Repeated acknowledgements count as separate replicasFalseFalsePassed
Volatile receipt acknowledgements satisfy durable concernFalseFalsePassed
Multiple copies in one failure domain satisfy zone concernFalseFalsePassed
Replica acknowledgements refer to another writeFalseFalsePassed
A write is reported successful after its response deadlineTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / ae6c980e568814019de56069de85c91e2c175755d05ac919fad0291139e62cf5

3 / The verified repair

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

N = 1
observations = []
def solve(r):
    return (len(set(r['distinct_replicas'][0])) >= r['distinct_replicas'][1]) and (sum(r['durable_acks'][0]) >= r['durable_acks'][1]) and (len(set(r['failure_domains'][0])) >= r['failure_domains'][1]) and (all(x == r['write_binding'][0] for x in r['write_binding'][1])) and (r['ack_deadline'][0] < r['ack_deadline'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'distinct_replicas': [['a', 'b'], 2], 'durable_acks': [[True, True, False], 2], 'failure_domains': [['z1', 'z2'], 2], 'write_binding': ['w2', ['w2', 'w2']], 'ack_deadline': [9, 10]}
check('valid operation', solve(r), True)
check('Repeated acknowledgements count as separate replicas', solve(dict(r, **{'distinct_replicas': [['a', 'a'], 2]})), False)
check('Volatile receipt acknowledgements satisfy durable concern', solve(dict(r, **{'durable_acks': [[True, False, False], 2]})), False)
check('Multiple copies in one failure domain satisfy zone concern', solve(dict(r, **{'failure_domains': [['z1', 'z1'], 2]})), False)
check('Replica acknowledgements refer to another write', solve(dict(r, **{'write_binding': ['w2', ['w1', 'w2']]})), False)
check('A write is reported successful after its response deadline', solve(dict(r, **{'ack_deadline': [10, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'distinct_replicas': [['a', 'a'], 2], 'durable_acks': [[True, False, False], 2], 'failure_domains': [['z1', 'z1'], 2], 'write_binding': ['w2', ['w1', 'w2']], 'ack_deadline': [10, 10]}
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
Repeated acknowledgements count as separate replicasFalseFalsePassed
Volatile receipt acknowledgements satisfy durable concernFalseFalsePassed
Multiple copies in one failure domain satisfy zone concernFalseFalsePassed
Replica acknowledgements refer to another writeFalseFalsePassed
A write is reported successful after its response deadlineFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / db9f09117c9c355156490a5d2d48c5add06f61edc801b1cbadee59668a6c1532

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

Case digest / c063d86f46906cc74ce75739d868f755119c40e33f96ca0b57c983f772ce7ff7