FA-611 / Replication / Open access
Persist a replication resume checkpoint: The checkpoint exceeds durable destination progress · case 01
The replication checkpoint operation is admitted even though the checkpoint exceeds durable destination progress.
ROOT CAUSE
The admission path omits the durable destination invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['durable_destination'][0] <= r['durable_destination'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the durable destination check repairs the reported defect, but replacing the adjacent transaction boundary check loses that independent invariant.
Case contract
Return a Boolean admission decision for persist a replication resume checkpoint. The record r must satisfy all of: all(x in r['contiguous_applied'][1] for x in range(r['contiguous_applied'][0]+1)); r['source_incarnation'][0] == r['source_incarnation'][1]; r['durable_destination'][0] <= r['durable_destination'][1]; r['transaction_boundary'][0] in r['transaction_boundary'][1]; r['checkpoint_monotonic'][0] >= r['checkpoint_monotonic'][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(x in r['contiguous_applied'][1] for x in range(r['contiguous_applied'][0]+1))) and (r['source_incarnation'][0] == r['source_incarnation'][1]) and (r['transaction_boundary'][0] in r['transaction_boundary'][1]) and (r['checkpoint_monotonic'][0] >= r['checkpoint_monotonic'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'contiguous_applied': [3, [0, 1, 2, 3]], 'source_incarnation': ['g2', 'g2'], 'durable_destination': [7, 7], 'transaction_boundary': [8, [4, 8, 12]], 'checkpoint_monotonic': [9, 8]}
check('valid operation', solve(r), True)
check('The resume point crosses an unapplied sequence gap', solve(dict(r, **{'contiguous_applied': [3, [0, 1, 3]]})), False)
check('A checkpoint is reused after the source log is recreated', solve(dict(r, **{'source_incarnation': ['g1', 'g2']})), False)
check('The checkpoint exceeds durable destination progress', solve(dict(r, **{'durable_destination': [8, 7]})), False)
check('A resume point splits a source transaction', solve(dict(r, **{'transaction_boundary': [7, [4, 8, 12]]})), False)
check('A delayed checkpoint regresses persisted progress', solve(dict(r, **{'checkpoint_monotonic': [7, 8]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'contiguous_applied': [3, [0, 1, 3]], 'source_incarnation': ['g1', 'g2'], 'durable_destination': [8, 7], 'transaction_boundary': [7, [4, 8, 12]], 'checkpoint_monotonic': [7, 8]}
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 |
| The resume point crosses an unapplied sequence gap | False | False | Passed |
| A checkpoint is reused after the source log is recreated | False | False | Passed |
| The checkpoint exceeds durable destination progress | True | False | Failed |
| A resume point splits a source transaction | False | False | Passed |
| A delayed checkpoint regresses persisted progress | 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 / 9325dd2b724ae9ad8d9932338e436866ae28781e1ac531f8f1d653a0c86ae951
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (all(x in r['contiguous_applied'][1] for x in range(r['contiguous_applied'][0]+1))) and (r['source_incarnation'][0] == r['source_incarnation'][1]) and (r['durable_destination'][0] <= r['durable_destination'][1]) and (r['checkpoint_monotonic'][0] >= r['checkpoint_monotonic'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'contiguous_applied': [3, [0, 1, 2, 3]], 'source_incarnation': ['g2', 'g2'], 'durable_destination': [7, 7], 'transaction_boundary': [8, [4, 8, 12]], 'checkpoint_monotonic': [9, 8]}
check('valid operation', solve(r), True)
check('The resume point crosses an unapplied sequence gap', solve(dict(r, **{'contiguous_applied': [3, [0, 1, 3]]})), False)
check('A checkpoint is reused after the source log is recreated', solve(dict(r, **{'source_incarnation': ['g1', 'g2']})), False)
check('The checkpoint exceeds durable destination progress', solve(dict(r, **{'durable_destination': [8, 7]})), False)
check('A resume point splits a source transaction', solve(dict(r, **{'transaction_boundary': [7, [4, 8, 12]]})), False)
check('A delayed checkpoint regresses persisted progress', solve(dict(r, **{'checkpoint_monotonic': [7, 8]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'contiguous_applied': [3, [0, 1, 3]], 'source_incarnation': ['g1', 'g2'], 'durable_destination': [8, 7], 'transaction_boundary': [7, [4, 8, 12]], 'checkpoint_monotonic': [7, 8]}
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 |
| The resume point crosses an unapplied sequence gap | False | False | Passed |
| A checkpoint is reused after the source log is recreated | False | False | Passed |
| The checkpoint exceeds durable destination progress | False | False | Passed |
| A resume point splits a source transaction | True | False | Failed |
| A delayed checkpoint regresses persisted progress | 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 / 95b9178c3341a2d0c629bfc14b08a4b8d0dfbe3b0bd99d5f873f6c93544f18a8
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (all(x in r['contiguous_applied'][1] for x in range(r['contiguous_applied'][0]+1))) and (r['source_incarnation'][0] == r['source_incarnation'][1]) and (r['durable_destination'][0] <= r['durable_destination'][1]) and (r['transaction_boundary'][0] in r['transaction_boundary'][1]) and (r['checkpoint_monotonic'][0] >= r['checkpoint_monotonic'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'contiguous_applied': [3, [0, 1, 2, 3]], 'source_incarnation': ['g2', 'g2'], 'durable_destination': [7, 7], 'transaction_boundary': [8, [4, 8, 12]], 'checkpoint_monotonic': [9, 8]}
check('valid operation', solve(r), True)
check('The resume point crosses an unapplied sequence gap', solve(dict(r, **{'contiguous_applied': [3, [0, 1, 3]]})), False)
check('A checkpoint is reused after the source log is recreated', solve(dict(r, **{'source_incarnation': ['g1', 'g2']})), False)
check('The checkpoint exceeds durable destination progress', solve(dict(r, **{'durable_destination': [8, 7]})), False)
check('A resume point splits a source transaction', solve(dict(r, **{'transaction_boundary': [7, [4, 8, 12]]})), False)
check('A delayed checkpoint regresses persisted progress', solve(dict(r, **{'checkpoint_monotonic': [7, 8]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'contiguous_applied': [3, [0, 1, 3]], 'source_incarnation': ['g1', 'g2'], 'durable_destination': [8, 7], 'transaction_boundary': [7, [4, 8, 12]], 'checkpoint_monotonic': [7, 8]}
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 |
| The resume point crosses an unapplied sequence gap | False | False | Passed |
| A checkpoint is reused after the source log is recreated | False | False | Passed |
| The checkpoint exceeds durable destination progress | False | False | Passed |
| A resume point splits a source transaction | False | False | Passed |
| A delayed checkpoint regresses persisted progress | 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 / 4587535ff7d136d91d32baecb3f787994644e06afeb88ee13ab465fdf281e443
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.304043+00:00.
Case digest / bf7382895339b755033d6cdacba14dee0203bd5a23c6cedc11b4fe3525dd78a5