FA-556 / Replication / Open access
Promote a bootstrapped replica: The retained log starts after the snapshot successor · case 01
The replica bootstrap operation is admitted even though the retained log starts after the snapshot successor.
ROOT CAUSE
The admission path omits the wal bridge invariant while validating the other operation preconditions.
THE FAILURE
The admission path omits the wal bridge invariant while validating the other operation preconditions.
Unsuccessful approach: Adding the wal bridge check repairs the reported defect, but replacing the adjacent replay floor 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['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 | True | False | Failed |
| 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 / 4ed7daccdf80981822d38771a16d7f821cfe893106b1c5bff0dcbcd5a1aa5553
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['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
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.234400+00:00.
Case digest / 317cdc3df84e96ed632578baf643c2cb666461370e1a5af3e6a7d504146b4ae5