FA-681 / Replication / Open access
Delete a write-ahead log segment: A backup still needs the selected log segment · case 01
The wal retention operation is admitted even though a backup still needs the selected log segment.
ROOT CAUSE
The admission path omits the backup pin invariant while validating the other operation preconditions.
THE FAILURE
The admission path omits the backup pin invariant while validating the other operation preconditions.
Unsuccessful approach: Adding the backup pin check repairs the reported defect, but replacing the adjacent archive confirmed check loses that independent invariant.
Case contract
Return a Boolean admission decision for delete a write-ahead log segment. The record r must satisfy all of: r['slowest_replica'][0] < min(r['slowest_replica'][1]); r['backup_pin'][0] not in r['backup_pin'][1]; r['archive_confirmed'] is True; r['segment_sealed'] is True; r['recovery_floor'][0] < r['recovery_floor'][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['slowest_replica'][0] < min(r['slowest_replica'][1])) and (r['archive_confirmed'] is True) and (r['segment_sealed'] is True) and (r['recovery_floor'][0] < r['recovery_floor'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'slowest_replica': [9, [10, 12]], 'backup_pin': [9, [10, 11]], 'archive_confirmed': True, 'segment_sealed': True, 'recovery_floor': [7, 8]}
check('valid operation', solve(r), True)
check('Deletion removes the next segment needed by a lagging replica', solve(dict(r, **{'slowest_replica': [10, [10, 12]]})), False)
check('A backup still needs the selected log segment', solve(dict(r, **{'backup_pin': [10, [10, 11]]})), False)
check('The only recoverable copy is deleted before archival', solve(dict(r, **{'archive_confirmed': False})), False)
check('Garbage collection deletes a segment still accepting writes', solve(dict(r, **{'segment_sealed': False})), False)
check('Deletion crosses the crash recovery replay floor', solve(dict(r, **{'recovery_floor': [8, 8]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'slowest_replica': [10, [10, 12]], 'backup_pin': [10, [10, 11]], 'archive_confirmed': False, 'segment_sealed': False, 'recovery_floor': [8, 8]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Deletion removes the next segment needed by a lagging replica | False | False | Passed |
| A backup still needs the selected log segment | True | False | Failed |
| The only recoverable copy is deleted before archival | False | False | Passed |
| Garbage collection deletes a segment still accepting writes | False | False | Passed |
| Deletion crosses the crash recovery replay floor | 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 / 53f4332c0cab2742a123530c0d142b30199474997791b697c56cf7e014ce92b9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['slowest_replica'][0] < min(r['slowest_replica'][1])) and (r['backup_pin'][0] not in r['backup_pin'][1]) and (r['segment_sealed'] is True) and (r['recovery_floor'][0] < r['recovery_floor'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'slowest_replica': [9, [10, 12]], 'backup_pin': [9, [10, 11]], 'archive_confirmed': True, 'segment_sealed': True, 'recovery_floor': [7, 8]}
check('valid operation', solve(r), True)
check('Deletion removes the next segment needed by a lagging replica', solve(dict(r, **{'slowest_replica': [10, [10, 12]]})), False)
check('A backup still needs the selected log segment', solve(dict(r, **{'backup_pin': [10, [10, 11]]})), False)
check('The only recoverable copy is deleted before archival', solve(dict(r, **{'archive_confirmed': False})), False)
check('Garbage collection deletes a segment still accepting writes', solve(dict(r, **{'segment_sealed': False})), False)
check('Deletion crosses the crash recovery replay floor', solve(dict(r, **{'recovery_floor': [8, 8]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'slowest_replica': [10, [10, 12]], 'backup_pin': [10, [10, 11]], 'archive_confirmed': False, 'segment_sealed': False, 'recovery_floor': [8, 8]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Deletion removes the next segment needed by a lagging replica | False | False | Passed |
| A backup still needs the selected log segment | False | False | Passed |
| The only recoverable copy is deleted before archival | True | False | Failed |
| Garbage collection deletes a segment still accepting writes | False | False | Passed |
| Deletion crosses the crash recovery replay floor | 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 / 85b93e047ab6878c96db6bf6b2584c80cbacd871e39fbe1c9d585bdbf0ad5629
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:55.047494+00:00.
Case digest / df67043b654b40e0737a2e266e25417f96ae38678916e51dc4c2aa78813966d8