FA-45491 / Data systems / Open access
Position deletes number rows after previous deletions · case 01
Position deletes number rows after previous deletions.
ROOT CAUSE
position-delete-scan: Position deletes number rows after previous deletions.
THE FAILURE
position-delete-scan: Position deletes number rows after previous deletions.
Unsuccessful approach: Using surviving rows still shifts addresses after an earlier deletion.
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+sum(r[0]==file for r in out)
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]] | 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 / 71cb5b622607135b6c630df7cbe9a7f911dea8be60979b475a518e5eea4cfd32
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+len([r for r in out if r[0]==file and r[1]>=base])
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]] | 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 / dfb4b5732b09c28d235598a6d75b8ec5427bb1b2aec76771e924a73254590bbf
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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
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.967771+00:00.
Case digest / e4947a152159da33db9bd7df39fad29d0b21d7bebf1db680ded11779ea9085a3