broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

evaluation_group: xd-replica-bootstrap

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

prompt:
The replica bootstrap operation is admitted even though a replica serves before loading its baseline snapshot.

Return a Boolean admission decision for promote a bootstrapped replica. The record r must satisfy all of: r['snapshot_ready'] is True; r['wal_bridge'][0] <= r['wal_bridge'][1]+1; r['replay_floor'][0] >= r['replay_floor'][1]; r['schema_compatible'][0] in r['schema_compatible'][1]; r['cluster_identity'][0] == r['cluster_identity'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

evaluation_group: xd-replica-bootstrap

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

prompt:
The replica bootstrap operation is admitted even though the retained log starts after the snapshot successor.

Return a Boolean admission decision for promote a bootstrapped replica. The record r must satisfy all of: r['snapshot_ready'] is True; r['wal_bridge'][0] <= r['wal_bridge'][1]+1; r['replay_floor'][0] >= r['replay_floor'][1]; r['schema_compatible'][0] in r['schema_compatible'][1]; r['cluster_identity'][0] == r['cluster_identity'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

evaluation_group: xd-replica-bootstrap

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

prompt:
The replica bootstrap operation is admitted even though promotion occurs before replay reaches the required watermark.

Return a Boolean admission decision for promote a bootstrapped replica. The record r must satisfy all of: r['snapshot_ready'] is True; r['wal_bridge'][0] <= r['wal_bridge'][1]+1; r['replay_floor'][0] >= r['replay_floor'][1]; r['schema_compatible'][0] in r['schema_compatible'][1]; r['cluster_identity'][0] == r['cluster_identity'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

evaluation_group: xd-replica-bootstrap

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

prompt:
The replica bootstrap operation is admitted even though a replica interprets log records with an unsupported schema.

Return a Boolean admission decision for promote a bootstrapped replica. The record r must satisfy all of: r['snapshot_ready'] is True; r['wal_bridge'][0] <= r['wal_bridge'][1]+1; r['replay_floor'][0] >= r['replay_floor'][1]; r['schema_compatible'][0] in r['schema_compatible'][1]; r['cluster_identity'][0] == r['cluster_identity'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['snapshot_ready'] is True) and (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

evaluation_group: xd-replica-bootstrap

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['wal_bridge'][0] <= r['wal_bridge'][1]+1) and (r['replay_floor'][0] >= r['replay_floor'][1]) and (r['schema_compatible'][0] in r['schema_compatible'][1]) and (r['cluster_identity'][0] == r['cluster_identity'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'snapshot_ready': True, 'wal_bridge': [11, 10], 'replay_floor': [20, 20], 'schema_compatible': [3, [2, 3]], 'cluster_identity': ['east', 'east']}
check('valid operation', solve(r), True)
check('A replica serves before loading its baseline snapshot', solve(dict(r, **{'snapshot_ready': False})), False)
check('The retained log starts after the snapshot successor', solve(dict(r, **{'wal_bridge': [12, 10]})), False)
check('Promotion occurs before replay reaches the required watermark', solve(dict(r, **{'replay_floor': [19, 20]})), False)
check('A replica interprets log records with an unsupported schema', solve(dict(r, **{'schema_compatible': [4, [2, 3]]})), False)
check('A snapshot from another cluster is installed', solve(dict(r, **{'cluster_identity': ['west', 'east']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'snapshot_ready': False, 'wal_bridge': [12, 10], 'replay_floor': [19, 20], 'schema_compatible': [4, [2, 3]], 'cluster_identity': ['west', 'east']}
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)

prompt:
The replica bootstrap operation is admitted even though a snapshot from another cluster is installed.

Return a Boolean admission decision for promote a bootstrapped replica. The record r must satisfy all of: r['snapshot_ready'] is True; r['wal_bridge'][0] <= r['wal_bridge'][1]+1; r['replay_floor'][0] >= r['replay_floor'][1]; r['schema_compatible'][0] in r['schema_compatible'][1]; r['cluster_identity'][0] == r['cluster_identity'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (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)

evaluation_group: xd-anti-entropy-repair

source:
"""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['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)

prompt:
The anti entropy repair operation is admitted even though a repair writes keys outside the receiver owned range.

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.

split: open-access


broken_source:
"""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['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)

evaluation_group: xd-anti-entropy-repair

source:
"""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)

prompt:
The anti entropy repair operation is admitted even though repair overwrites a record with an older revision.

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.

split: open-access


broken_source:
"""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)

evaluation_group: xd-anti-entropy-repair

source:
"""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)

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

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.

split: open-access


broken_source:
"""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)

evaluation_group: xd-anti-entropy-repair

source:
"""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])
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)

prompt:
The anti entropy repair operation is admitted even though compared digests describe different snapshot generations.

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.

split: open-access


broken_source:
"""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])
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)

evaluation_group: xd-anti-entropy-repair

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (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)

prompt:
The anti entropy repair operation is admitted even though a partial range response is marked fully repaired.

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.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (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)

evaluation_group: xd-replication-checkpoint

source:
"""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['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)

prompt:
The replication checkpoint operation is admitted even though the resume point crosses an unapplied sequence gap.

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.

split: open-access


broken_source:
"""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['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)

evaluation_group: xd-replication-checkpoint

source:
"""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)

prompt:
The replication checkpoint operation is admitted even though a checkpoint is reused after the source log is recreated.

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.

split: open-access


broken_source:
"""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)

evaluation_group: xd-replication-checkpoint

source:
"""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)

prompt:
The replication checkpoint operation is admitted even though the checkpoint exceeds durable destination progress.

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.

split: open-access


broken_source:
"""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)

evaluation_group: xd-replication-checkpoint

source:
"""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])
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)

prompt:
The replication checkpoint operation is admitted even though a resume point splits a source transaction.

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.

split: open-access


broken_source:
"""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])
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)

evaluation_group: xd-replication-checkpoint

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (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)

prompt:
The replication checkpoint operation is admitted even though a delayed checkpoint regresses persisted progress.

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.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

evaluation_group: xd-conflict-resolution

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

prompt:
The conflict resolution operation is admitted even though the resolution omits a known conflicting parent.

Return a Boolean admission decision for admit a conflict resolution result. The record r must satisfy all of: set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1]); all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1])); len(set(r['resolver_version'])) == 1; tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]; r['result_domain'] >= 0. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

evaluation_group: xd-conflict-resolution

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

prompt:
The conflict resolution operation is admitted even though the resolved clock regresses a parent component.

Return a Boolean admission decision for admit a conflict resolution result. The record r must satisfy all of: set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1]); all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1])); len(set(r['resolver_version'])) == 1; tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]; r['result_domain'] >= 0. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

evaluation_group: xd-conflict-resolution

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

prompt:
The conflict resolution operation is admitted even though replicas execute different resolver versions.

Return a Boolean admission decision for admit a conflict resolution result. The record r must satisfy all of: set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1]); all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1])); len(set(r['resolver_version'])) == 1; tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]; r['result_domain'] >= 0. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

evaluation_group: xd-conflict-resolution

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

prompt:
The conflict resolution operation is admitted even though resolution reuses an existing causal operation dot.

Return a Boolean admission decision for admit a conflict resolution result. The record r must satisfy all of: set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1]); all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1])); len(set(r['resolver_version'])) == 1; tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]; r['result_domain'] >= 0. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1])) and (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

evaluation_group: xd-conflict-resolution

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1]))) and (len(set(r['resolver_version'])) == 1) and (tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]) and (r['result_domain'] >= 0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'parent_coverage': [['a', 'b'], ['a', 'b', 'c']], 'clock_dominance': [[3, 4], [2, 4]], 'resolver_version': [3, 3, 3], 'new_dot': [['a', 4], [['a', 3]]], 'result_domain': 0}
check('valid operation', solve(r), True)
check('The resolution omits a known conflicting parent', solve(dict(r, **{'parent_coverage': [['a', 'b'], ['a']]})), False)
check('The resolved clock regresses a parent component', solve(dict(r, **{'clock_dominance': [[3, 3], [2, 4]]})), False)
check('Replicas execute different resolver versions', solve(dict(r, **{'resolver_version': [3, 2, 3]})), False)
check('Resolution reuses an existing causal operation dot', solve(dict(r, **{'new_dot': [['a', 3], [['a', 3]]]})), False)
check('A merge result violates the application value constraint', solve(dict(r, **{'result_domain': -1})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'parent_coverage': [['a', 'b'], ['a']], 'clock_dominance': [[3, 3], [2, 4]], 'resolver_version': [3, 2, 3], 'new_dot': [['a', 3], [['a', 3]]], 'result_domain': -1}
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)

prompt:
The conflict resolution operation is admitted even though a merge result violates the application value constraint.

Return a Boolean admission decision for admit a conflict resolution result. The record r must satisfy all of: set(r['parent_coverage'][0]) <= set(r['parent_coverage'][1]); all(a >= b for a,b in zip(r['clock_dominance'][0],r['clock_dominance'][1])); len(set(r['resolver_version'])) == 1; tuple(r['new_dot'][0]) not in [tuple(x) for x in r['new_dot'][1]]; r['result_domain'] >= 0. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['replacement_durable'] is True) and (len(r['handoff_complete']) == 0) and (r['reader_drain'] == 0) and (r['membership_commit'][0] <= r['membership_commit'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'replacement_count': [4, 3], 'replacement_durable': True, 'handoff_complete': [], 'reader_drain': 0, 'membership_commit': [20, 20]}
check('valid operation', solve(r), True)
check('Retirement leaves fewer copies than the required factor', solve(dict(r, **{'replacement_count': [3, 3]})), False)
check('The replacement has only volatile copied state', solve(dict(r, **{'replacement_durable': False})), False)
check('Keys still assigned to the retiring replica are lost', solve(dict(r, **{'handoff_complete': ['key-7']})), False)
check('Active snapshot readers lose their pinned source', solve(dict(r, **{'reader_drain': 2})), False)
check('Physical removal precedes committed membership removal', solve(dict(r, **{'membership_commit': [21, 20]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'replacement_count': [3, 3], 'replacement_durable': False, 'handoff_complete': ['key-7'], 'reader_drain': 2, 'membership_commit': [21, 20]}
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)

evaluation_group: xd-replica-removal

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['replacement_count'][0]-1 >= r['replacement_count'][1]) and (len(r['handoff_complete']) == 0) and (r['reader_drain'] == 0) and (r['membership_commit'][0] <= r['membership_commit'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'replacement_count': [4, 3], 'replacement_durable': True, 'handoff_complete': [], 'reader_drain': 0, 'membership_commit': [20, 20]}
check('valid operation', solve(r), True)
check('Retirement leaves fewer copies than the required factor', solve(dict(r, **{'replacement_count': [3, 3]})), False)
check('The replacement has only volatile copied state', solve(dict(r, **{'replacement_durable': False})), False)
check('Keys still assigned to the retiring replica are lost', solve(dict(r, **{'handoff_complete': ['key-7']})), False)
check('Active snapshot readers lose their pinned source', solve(dict(r, **{'reader_drain': 2})), False)
check('Physical removal precedes committed membership removal', solve(dict(r, **{'membership_commit': [21, 20]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'replacement_count': [3, 3], 'replacement_durable': False, 'handoff_complete': ['key-7'], 'reader_drain': 2, 'membership_commit': [21, 20]}
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)

prompt:
The replica removal operation is admitted even though retirement leaves fewer copies than the required factor.

Return a Boolean admission decision for retire a replica and discard its data. The record r must satisfy all of: r['replacement_count'][0]-1 >= r['replacement_count'][1]; r['replacement_durable'] is True; len(r['handoff_complete']) == 0; r['reader_drain'] == 0; r['membership_commit'][0] <= r['membership_commit'][1]. Extra tracing fields are ignored; validation does not mutate the record.

split: open-access