FA-45481 / Data systems / Open access
Position deletes erase the same row ordinal in unrelated files · case 01
Position deletes erase the same row ordinal in unrelated files.
ROOT CAUSE
position-delete-scan: Position deletes erase the same row ordinal in unrelated files.
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: OR-ing file and position broadens deletion across both dimensions.
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=set(tuple(x) for x in deletes)
out=[]
for file,base,values in fragments:
for local,value in enumerate(values):
position=base+local
if any(p==position for f,p 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| file scope | [] | [['b', 0, 1]] | Failed |
| 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 / 3a247555dcfbf9914ae92c42e85654e84bdf8ea9931875fa8445fd25c14832a4
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=set(tuple(x) for x in deletes)
out=[]
for file,base,values in fragments:
for local,value in enumerate(values):
position=base+local
if any(f==file or p==position for f,p 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| file scope | [] | [['b', 0, 1]] | Failed |
| fragment origin | [] | [['a', 6, 2]] | Failed |
| physical holes | [] | [['a', 1, 2]] | Failed |
| 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 / 0ab9e3e943fdbc77b9d19c8942bc6d6cd68b3790072a95b1be2137c9b921aad1
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.688176+00:00.
Case digest / c1f0581b2e57c8bd8c2c125d951ea5dc70783f33b7e860f40eae61e07c8ccece