FAILURE MAP
← Case archive

FA-45496 / Data systems / Open access

A repeated position-delete entry cancels itself · case 01

A repeated position-delete entry cancels itself.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

position-delete-scan: A repeated position-delete entry cancels itself.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Scan fragments [file-id,base-row-position,values] applying position-delete pairs [file-id,absolute-row-position]. Deletions are file-scoped and use physical positions before filtering. Return [file-id,absolute-position,value] for surviving rows, including null values.

Unsuccessful approach: Duplicate delete records remain idempotent; dropping repeated entries resurrects rows.

Case contract

Scan fragments [file-id,base-row-position,values] applying position-delete pairs [file-id,absolute-row-position]. Deletions are file-scoped and use physical positions before filtering. Return [file-id,absolute-position,value] for surviving rows, including null values.

Why this case matters

A bounded deterministic data engine model makes representation and changelog faults reproducible.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        fragments,deletes=d
        tombstones={tuple(x) for x in deletes if deletes.count(x)%2}
        out=[]
        for file,base,values in fragments:
            for local,value in enumerate(values):
                position=base+local
                if (file,position) in tombstones: continue
                out.append([file,position,value])
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('file scope', solve([[['b', 0, [1]], ['a', 0, [2]]], [['a', 0]]]), [['b', 0, 1]])
    check('fragment origin', solve([[['a', 5, [1, 2]]], [['a', 5]]]), [['a', 6, 2]])
    check('physical holes', solve([[['a', 0, [1, 2, 3]]], [['a', 0], ['a', 2]]]), [['a', 1, 2]])
    check('repeated tombstone', solve([[['a', 0, [1]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 1]]], []]), [['a', 0, None], ['a', 1, 1]])
    check('fragment order', solve([[['b', 0, [1]], ['a', 0, [2]]], []]), [['b', 0, 1], ['a', 0, 2]])
    check('empty input', solve([[], []]), [])
elif N == 2:
    check('file scope', solve([[['b', 0, [2]], ['a', 0, [3]]], [['a', 0]]]), [['b', 0, 2]])
    check('fragment origin', solve([[['a', 5, [2, 3]]], [['a', 5]]]), [['a', 6, 3]])
    check('physical holes', solve([[['a', 0, [2, 3, 4]]], [['a', 0], ['a', 2]]]), [['a', 1, 3]])
    check('repeated tombstone', solve([[['a', 0, [2]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 2]]], []]), [['a', 0, None], ['a', 1, 2]])
    check('fragment order', solve([[['b', 0, [2]], ['a', 0, [3]]], []]), [['b', 0, 2], ['a', 0, 3]])
    check('empty input', solve([[], []]), [])
elif N == 3:
    check('file scope', solve([[['b', 0, [3]], ['a', 0, [4]]], [['a', 0]]]), [['b', 0, 3]])
    check('fragment origin', solve([[['a', 5, [3, 4]]], [['a', 5]]]), [['a', 6, 4]])
    check('physical holes', solve([[['a', 0, [3, 4, 5]]], [['a', 0], ['a', 2]]]), [['a', 1, 4]])
    check('repeated tombstone', solve([[['a', 0, [3]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 3]]], []]), [['a', 0, None], ['a', 1, 3]])
    check('fragment order', solve([[['b', 0, [3]], ['a', 0, [4]]], []]), [['b', 0, 3], ['a', 0, 4]])
    check('empty input', solve([[], []]), [])
elif N == 4:
    check('file scope', solve([[['b', 0, [4]], ['a', 0, [5]]], [['a', 0]]]), [['b', 0, 4]])
    check('fragment origin', solve([[['a', 5, [4, 5]]], [['a', 5]]]), [['a', 6, 5]])
    check('physical holes', solve([[['a', 0, [4, 5, 6]]], [['a', 0], ['a', 2]]]), [['a', 1, 5]])
    check('repeated tombstone', solve([[['a', 0, [4]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 4]]], []]), [['a', 0, None], ['a', 1, 4]])
    check('fragment order', solve([[['b', 0, [4]], ['a', 0, [5]]], []]), [['b', 0, 4], ['a', 0, 5]])
    check('empty input', solve([[], []]), [])
elif N == 5:
    check('file scope', solve([[['b', 0, [5]], ['a', 0, [6]]], [['a', 0]]]), [['b', 0, 5]])
    check('fragment origin', solve([[['a', 5, [5, 6]]], [['a', 5]]]), [['a', 6, 6]])
    check('physical holes', solve([[['a', 0, [5, 6, 7]]], [['a', 0], ['a', 2]]]), [['a', 1, 6]])
    check('repeated tombstone', solve([[['a', 0, [5]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 5]]], []]), [['a', 0, None], ['a', 1, 5]])
    check('fragment order', solve([[['b', 0, [5]], ['a', 0, [6]]], []]), [['b', 0, 5], ['a', 0, 6]])
    check('empty input', solve([[], []]), [])
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 fixtureActualExpectedOutcome
file scope[['b', 0, 1]][['b', 0, 1]]Passed
fragment origin[['a', 6, 2]][['a', 6, 2]]Passed
physical holes[['a', 1, 2]][['a', 1, 2]]Passed
repeated tombstone[['a', 0, 1]][]Failed
surviving null[['a', 0, None], ['a', 1, 1]][['a', 0, None], ['a', 1, 1]]Passed
fragment order[['b', 0, 1], ['a', 0, 2]][['b', 0, 1], ['a', 0, 2]]Passed
empty input[][]Passed

SHA-256 / 2ca6c130a4a4cddd476e0fdf8ab5eee60b1449ce28cd1f9dcf50583bd3fbdc46

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        fragments,deletes=d
        tombstones={tuple(x) for x in deletes if deletes.count(x)==1}
        out=[]
        for file,base,values in fragments:
            for local,value in enumerate(values):
                position=base+local
                if (file,position) in tombstones: continue
                out.append([file,position,value])
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('file scope', solve([[['b', 0, [1]], ['a', 0, [2]]], [['a', 0]]]), [['b', 0, 1]])
    check('fragment origin', solve([[['a', 5, [1, 2]]], [['a', 5]]]), [['a', 6, 2]])
    check('physical holes', solve([[['a', 0, [1, 2, 3]]], [['a', 0], ['a', 2]]]), [['a', 1, 2]])
    check('repeated tombstone', solve([[['a', 0, [1]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 1]]], []]), [['a', 0, None], ['a', 1, 1]])
    check('fragment order', solve([[['b', 0, [1]], ['a', 0, [2]]], []]), [['b', 0, 1], ['a', 0, 2]])
    check('empty input', solve([[], []]), [])
elif N == 2:
    check('file scope', solve([[['b', 0, [2]], ['a', 0, [3]]], [['a', 0]]]), [['b', 0, 2]])
    check('fragment origin', solve([[['a', 5, [2, 3]]], [['a', 5]]]), [['a', 6, 3]])
    check('physical holes', solve([[['a', 0, [2, 3, 4]]], [['a', 0], ['a', 2]]]), [['a', 1, 3]])
    check('repeated tombstone', solve([[['a', 0, [2]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 2]]], []]), [['a', 0, None], ['a', 1, 2]])
    check('fragment order', solve([[['b', 0, [2]], ['a', 0, [3]]], []]), [['b', 0, 2], ['a', 0, 3]])
    check('empty input', solve([[], []]), [])
elif N == 3:
    check('file scope', solve([[['b', 0, [3]], ['a', 0, [4]]], [['a', 0]]]), [['b', 0, 3]])
    check('fragment origin', solve([[['a', 5, [3, 4]]], [['a', 5]]]), [['a', 6, 4]])
    check('physical holes', solve([[['a', 0, [3, 4, 5]]], [['a', 0], ['a', 2]]]), [['a', 1, 4]])
    check('repeated tombstone', solve([[['a', 0, [3]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 3]]], []]), [['a', 0, None], ['a', 1, 3]])
    check('fragment order', solve([[['b', 0, [3]], ['a', 0, [4]]], []]), [['b', 0, 3], ['a', 0, 4]])
    check('empty input', solve([[], []]), [])
elif N == 4:
    check('file scope', solve([[['b', 0, [4]], ['a', 0, [5]]], [['a', 0]]]), [['b', 0, 4]])
    check('fragment origin', solve([[['a', 5, [4, 5]]], [['a', 5]]]), [['a', 6, 5]])
    check('physical holes', solve([[['a', 0, [4, 5, 6]]], [['a', 0], ['a', 2]]]), [['a', 1, 5]])
    check('repeated tombstone', solve([[['a', 0, [4]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 4]]], []]), [['a', 0, None], ['a', 1, 4]])
    check('fragment order', solve([[['b', 0, [4]], ['a', 0, [5]]], []]), [['b', 0, 4], ['a', 0, 5]])
    check('empty input', solve([[], []]), [])
elif N == 5:
    check('file scope', solve([[['b', 0, [5]], ['a', 0, [6]]], [['a', 0]]]), [['b', 0, 5]])
    check('fragment origin', solve([[['a', 5, [5, 6]]], [['a', 5]]]), [['a', 6, 6]])
    check('physical holes', solve([[['a', 0, [5, 6, 7]]], [['a', 0], ['a', 2]]]), [['a', 1, 6]])
    check('repeated tombstone', solve([[['a', 0, [5]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 5]]], []]), [['a', 0, None], ['a', 1, 5]])
    check('fragment order', solve([[['b', 0, [5]], ['a', 0, [6]]], []]), [['b', 0, 5], ['a', 0, 6]])
    check('empty input', solve([[], []]), [])
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 fixtureActualExpectedOutcome
file scope[['b', 0, 1]][['b', 0, 1]]Passed
fragment origin[['a', 6, 2]][['a', 6, 2]]Passed
physical holes[['a', 1, 2]][['a', 1, 2]]Passed
repeated tombstone[['a', 0, 1]][]Failed
surviving null[['a', 0, None], ['a', 1, 1]][['a', 0, None], ['a', 1, 1]]Passed
fragment order[['b', 0, 1], ['a', 0, 2]][['b', 0, 1], ['a', 0, 2]]Passed
empty input[][]Passed

SHA-256 / 16070c176ab4661a5ffa632a6bdbea470453841a1174ade1429528608ae956cd

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    try:
        fragments,deletes=d
        tombstones=set(tuple(x) for x in deletes)
        out=[]
        for file,base,values in fragments:
            for local,value in enumerate(values):
                position=base+local
                if (file,position) in tombstones: continue
                out.append([file,position,value])
        return out
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('file scope', solve([[['b', 0, [1]], ['a', 0, [2]]], [['a', 0]]]), [['b', 0, 1]])
    check('fragment origin', solve([[['a', 5, [1, 2]]], [['a', 5]]]), [['a', 6, 2]])
    check('physical holes', solve([[['a', 0, [1, 2, 3]]], [['a', 0], ['a', 2]]]), [['a', 1, 2]])
    check('repeated tombstone', solve([[['a', 0, [1]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 1]]], []]), [['a', 0, None], ['a', 1, 1]])
    check('fragment order', solve([[['b', 0, [1]], ['a', 0, [2]]], []]), [['b', 0, 1], ['a', 0, 2]])
    check('empty input', solve([[], []]), [])
elif N == 2:
    check('file scope', solve([[['b', 0, [2]], ['a', 0, [3]]], [['a', 0]]]), [['b', 0, 2]])
    check('fragment origin', solve([[['a', 5, [2, 3]]], [['a', 5]]]), [['a', 6, 3]])
    check('physical holes', solve([[['a', 0, [2, 3, 4]]], [['a', 0], ['a', 2]]]), [['a', 1, 3]])
    check('repeated tombstone', solve([[['a', 0, [2]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 2]]], []]), [['a', 0, None], ['a', 1, 2]])
    check('fragment order', solve([[['b', 0, [2]], ['a', 0, [3]]], []]), [['b', 0, 2], ['a', 0, 3]])
    check('empty input', solve([[], []]), [])
elif N == 3:
    check('file scope', solve([[['b', 0, [3]], ['a', 0, [4]]], [['a', 0]]]), [['b', 0, 3]])
    check('fragment origin', solve([[['a', 5, [3, 4]]], [['a', 5]]]), [['a', 6, 4]])
    check('physical holes', solve([[['a', 0, [3, 4, 5]]], [['a', 0], ['a', 2]]]), [['a', 1, 4]])
    check('repeated tombstone', solve([[['a', 0, [3]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 3]]], []]), [['a', 0, None], ['a', 1, 3]])
    check('fragment order', solve([[['b', 0, [3]], ['a', 0, [4]]], []]), [['b', 0, 3], ['a', 0, 4]])
    check('empty input', solve([[], []]), [])
elif N == 4:
    check('file scope', solve([[['b', 0, [4]], ['a', 0, [5]]], [['a', 0]]]), [['b', 0, 4]])
    check('fragment origin', solve([[['a', 5, [4, 5]]], [['a', 5]]]), [['a', 6, 5]])
    check('physical holes', solve([[['a', 0, [4, 5, 6]]], [['a', 0], ['a', 2]]]), [['a', 1, 5]])
    check('repeated tombstone', solve([[['a', 0, [4]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 4]]], []]), [['a', 0, None], ['a', 1, 4]])
    check('fragment order', solve([[['b', 0, [4]], ['a', 0, [5]]], []]), [['b', 0, 4], ['a', 0, 5]])
    check('empty input', solve([[], []]), [])
elif N == 5:
    check('file scope', solve([[['b', 0, [5]], ['a', 0, [6]]], [['a', 0]]]), [['b', 0, 5]])
    check('fragment origin', solve([[['a', 5, [5, 6]]], [['a', 5]]]), [['a', 6, 6]])
    check('physical holes', solve([[['a', 0, [5, 6, 7]]], [['a', 0], ['a', 2]]]), [['a', 1, 6]])
    check('repeated tombstone', solve([[['a', 0, [5]]], [['a', 0], ['a', 0]]]), [])
    check('surviving null', solve([[['a', 0, [None, 5]]], []]), [['a', 0, None], ['a', 1, 5]])
    check('fragment order', solve([[['b', 0, [5]], ['a', 0, [6]]], []]), [['b', 0, 5], ['a', 0, 6]])
    check('empty input', solve([[], []]), [])
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 fixtureActualExpectedOutcome
file scope[['b', 0, 1]][['b', 0, 1]]Passed
fragment origin[['a', 6, 2]][['a', 6, 2]]Passed
physical holes[['a', 1, 2]][['a', 1, 2]]Passed
repeated tombstone[][]Passed
surviving null[['a', 0, None], ['a', 1, 1]][['a', 0, None], ['a', 1, 1]]Passed
fragment order[['b', 0, 1], ['a', 0, 2]][['b', 0, 1], ['a', 0, 2]]Passed
empty input[][]Passed

SHA-256 / 7592e37b5ed37b83adf08e1480c2be55a352e3dc01a3d815bf08bc1e9c8c01f0

Verification & scope

Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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:44:22.880258+00:00.

Case digest / daa34f31fbc9cf536d20d6b83efbb66722077c98f811e08c0d138618e3cbe1de