FA-561 / Replication / Open access
Promote a bootstrapped replica: Promotion occurs before replay reaches the required watermark · case 01
The replica bootstrap operation is admitted even though promotion occurs before replay reaches the required watermark.
ROOT CAUSE
The admission path omits the replay floor invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['replay_floor'][0] >= r['replay_floor'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the replay floor check repairs the reported defect, but replacing the adjacent schema compatible check loses that independent invariant.
Case contract
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.
Why this case matters
A deterministic local contract for replication. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A replica serves before loading its baseline snapshot | False | False | Passed |
| The retained log starts after the snapshot successor | False | False | Passed |
| Promotion occurs before replay reaches the required watermark | True | False | Failed |
| A replica interprets log records with an unsupported schema | False | False | Passed |
| A snapshot from another cluster is installed | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 449b6ff4a693d9687fdebbb6e274a8064394227ee48a3150f298e34ed664b088
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A replica serves before loading its baseline snapshot | False | False | Passed |
| The retained log starts after the snapshot successor | False | False | Passed |
| Promotion occurs before replay reaches the required watermark | False | False | Passed |
| A replica interprets log records with an unsupported schema | True | False | Failed |
| A snapshot from another cluster is installed | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 25353b4335f733cd3f510b2fd93a4d3dc40b34b2d2e29c57139657b9cb474944
3 / The verified repair
Exit 0"""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]) 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A replica serves before loading its baseline snapshot | False | False | Passed |
| The retained log starts after the snapshot successor | False | False | Passed |
| Promotion occurs before replay reaches the required watermark | False | False | Passed |
| A replica interprets log records with an unsupported schema | False | False | Passed |
| A snapshot from another cluster is installed | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / f50e1762ced7132aae48370c870710e99da7f1d9bd2ed40f6ef19cc2d1a465cf
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:36:54.205846+00:00.
Case digest / afc46ee1a1bd97f7e820e03e5848f28a92afed21c2eeda7e130d8c2e2500829c