FAILURE MAP
← Case archive

FA-586 / Replication / Open access

Apply an anti-entropy repair range: A deletion marker is dropped before repair safety horizon · case 01

The anti entropy repair operation is admitted even though a deletion marker is dropped before repair safety horizon.

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

ROOT CAUSE

The admission path omits the tombstone horizon invariant while validating the other operation preconditions.

VERIFIED REPAIR

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

Unsuccessful approach: Adding the tombstone horizon check repairs the reported defect, but replacing the adjacent merkle generation check loses that independent invariant.

Case contract

Return a Boolean admission decision for apply an anti-entropy repair range. The record r must satisfy all of: all(r['range_ownership'][0] <= x < r['range_ownership'][1] for x in r['range_ownership'][2]); r['version_monotonic'][0] >= r['version_monotonic'][1]; r['tombstone_horizon'][0] >= r['tombstone_horizon'][1]; r['merkle_generation'][0] == r['merkle_generation'][1]; r['range_complete'][0] == r['range_complete'][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 (all(r['range_ownership'][0] <= x < r['range_ownership'][1] for x in r['range_ownership'][2])) and (r['version_monotonic'][0] >= r['version_monotonic'][1]) and (r['merkle_generation'][0] == r['merkle_generation'][1]) and (r['range_complete'][0] == r['range_complete'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'range_ownership': [10, 20, [10, 19]], 'version_monotonic': [7, 6], 'tombstone_horizon': [20, 20], 'merkle_generation': [8, 8], 'range_complete': [100, 100]}
check('valid operation', solve(r), True)
check('A repair writes keys outside the receiver owned range', solve(dict(r, **{'range_ownership': [10, 20, [9, 19]]})), False)
check('Repair overwrites a record with an older revision', solve(dict(r, **{'version_monotonic': [5, 6]})), False)
check('A deletion marker is dropped before repair safety horizon', solve(dict(r, **{'tombstone_horizon': [19, 20]})), False)
check('Compared digests describe different snapshot generations', solve(dict(r, **{'merkle_generation': [7, 8]})), False)
check('A partial range response is marked fully repaired', solve(dict(r, **{'range_complete': [80, 100]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'range_ownership': [10, 20, [9, 19]], 'version_monotonic': [5, 6], 'tombstone_horizon': [19, 20], 'merkle_generation': [7, 8], 'range_complete': [80, 100]}
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 repair writes keys outside the receiver owned rangeFalseFalsePassed
Repair overwrites a record with an older revisionFalseFalsePassed
A deletion marker is dropped before repair safety horizonTrueFalseFailed
Compared digests describe different snapshot generationsFalseFalsePassed
A partial range response is marked fully repairedFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / be3ffe52b4db49e4afeb842af2e1bd759b0b32044816d36288e9c134a4e84a78

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(r):
    return (all(r['range_ownership'][0] <= x < r['range_ownership'][1] for x in r['range_ownership'][2])) and (r['version_monotonic'][0] >= r['version_monotonic'][1]) and (r['tombstone_horizon'][0] >= r['tombstone_horizon'][1]) and (r['range_complete'][0] == r['range_complete'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'range_ownership': [10, 20, [10, 19]], 'version_monotonic': [7, 6], 'tombstone_horizon': [20, 20], 'merkle_generation': [8, 8], 'range_complete': [100, 100]}
check('valid operation', solve(r), True)
check('A repair writes keys outside the receiver owned range', solve(dict(r, **{'range_ownership': [10, 20, [9, 19]]})), False)
check('Repair overwrites a record with an older revision', solve(dict(r, **{'version_monotonic': [5, 6]})), False)
check('A deletion marker is dropped before repair safety horizon', solve(dict(r, **{'tombstone_horizon': [19, 20]})), False)
check('Compared digests describe different snapshot generations', solve(dict(r, **{'merkle_generation': [7, 8]})), False)
check('A partial range response is marked fully repaired', solve(dict(r, **{'range_complete': [80, 100]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'range_ownership': [10, 20, [9, 19]], 'version_monotonic': [5, 6], 'tombstone_horizon': [19, 20], 'merkle_generation': [7, 8], 'range_complete': [80, 100]}
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 repair writes keys outside the receiver owned rangeFalseFalsePassed
Repair overwrites a record with an older revisionFalseFalsePassed
A deletion marker is dropped before repair safety horizonFalseFalsePassed
Compared digests describe different snapshot generationsTrueFalseFailed
A partial range response is marked fully repairedFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 851890b26dfae1434250329b7576418758f6ee469683962746317d3748513dcf

3 / The verified repair

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

N = 1
observations = []
def solve(r):
    return (all(r['range_ownership'][0] <= x < r['range_ownership'][1] for x in r['range_ownership'][2])) and (r['version_monotonic'][0] >= r['version_monotonic'][1]) and (r['tombstone_horizon'][0] >= r['tombstone_horizon'][1]) and (r['merkle_generation'][0] == r['merkle_generation'][1]) and (r['range_complete'][0] == r['range_complete'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'range_ownership': [10, 20, [10, 19]], 'version_monotonic': [7, 6], 'tombstone_horizon': [20, 20], 'merkle_generation': [8, 8], 'range_complete': [100, 100]}
check('valid operation', solve(r), True)
check('A repair writes keys outside the receiver owned range', solve(dict(r, **{'range_ownership': [10, 20, [9, 19]]})), False)
check('Repair overwrites a record with an older revision', solve(dict(r, **{'version_monotonic': [5, 6]})), False)
check('A deletion marker is dropped before repair safety horizon', solve(dict(r, **{'tombstone_horizon': [19, 20]})), False)
check('Compared digests describe different snapshot generations', solve(dict(r, **{'merkle_generation': [7, 8]})), False)
check('A partial range response is marked fully repaired', solve(dict(r, **{'range_complete': [80, 100]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'range_ownership': [10, 20, [9, 19]], 'version_monotonic': [5, 6], 'tombstone_horizon': [19, 20], 'merkle_generation': [7, 8], 'range_complete': [80, 100]}
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 repair writes keys outside the receiver owned rangeFalseFalsePassed
Repair overwrites a record with an older revisionFalseFalsePassed
A deletion marker is dropped before repair safety horizonFalseFalsePassed
Compared digests describe different snapshot generationsFalseFalsePassed
A partial range response is marked fully repairedFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 09ce6c3188d2db387b3f9a90778fba35d021dffcd6fd28d38e4e675e4c7b41be

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

Case digest / d8965db973c22e36c21097d12c95b547267a1b6038808f8ff68e9f6324bcd01c