FAILURE MAP
← Case archive

FA-45131 / Data systems / Open access

List concatenation repeats each batch initial offset sentinel · case 01

List concatenation repeats each batch initial offset sentinel.

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

ROOT CAUSE

list-child-concatenation: List concatenation repeats each batch initial offset sentinel.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Concatenate offset-based list batches into one compact child buffer. Rebase every row offset, copy only each batch referenced child span, preserve parent validity, and preserve child nulls. Output [offsets,visible-child,parent-validity].

Unsuccessful approach: Replacing the final sentinel with the initial one misstates row boundaries.

Case contract

Concatenate offset-based list batches into one compact child buffer. Rebase every row offset, copy only each batch referenced child span, preserve parent validity, and preserve child nulls. Output [offsets,visible-child,parent-validity].

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:
        out_offsets=[0]; out_child=[]; out_valid=[]
        for offsets,child,child_valid,parent_valid in d:
            start=offsets[0]; stop=offsets[-1]
            base=len(out_child)
            out_child.extend(child[i] if child_valid[i] else None for i in range(start,stop))
            out_offsets.extend(base+x-start for x in offsets)
            out_valid.extend(parent_valid)
        return [out_offsets,out_child,out_valid]
    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('two batches', solve([[[0, 2], [1, 2], [True, True], [True]], [[0, 1], [3], [True], [True]]]), [[0, 2, 3], [1, 2, 3], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 1, 2, 99], [True, True, True, True], [True]]]), [[0, 2], [1, 2], [True]])
    check('null children', solve([[[0, 2], [1, 2], [False, True], [True]]]), [[0, 2], [None, 2], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [1], [True], [False]]]), [[0, 1], [1], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [1], [True], [True]]]), [[0, 1], [1], [True]])
elif N == 2:
    check('two batches', solve([[[0, 2], [2, 3], [True, True], [True]], [[0, 1], [4], [True], [True]]]), [[0, 2, 3], [2, 3, 4], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 2, 3, 99], [True, True, True, True], [True]]]), [[0, 2], [2, 3], [True]])
    check('null children', solve([[[0, 2], [2, 3], [False, True], [True]]]), [[0, 2], [None, 3], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [2], [True], [False]]]), [[0, 1], [2], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [2], [True], [True]]]), [[0, 1], [2], [True]])
elif N == 3:
    check('two batches', solve([[[0, 2], [3, 4], [True, True], [True]], [[0, 1], [5], [True], [True]]]), [[0, 2, 3], [3, 4, 5], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 3, 4, 99], [True, True, True, True], [True]]]), [[0, 2], [3, 4], [True]])
    check('null children', solve([[[0, 2], [3, 4], [False, True], [True]]]), [[0, 2], [None, 4], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [3], [True], [False]]]), [[0, 1], [3], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [3], [True], [True]]]), [[0, 1], [3], [True]])
elif N == 4:
    check('two batches', solve([[[0, 2], [4, 5], [True, True], [True]], [[0, 1], [6], [True], [True]]]), [[0, 2, 3], [4, 5, 6], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 4, 5, 99], [True, True, True, True], [True]]]), [[0, 2], [4, 5], [True]])
    check('null children', solve([[[0, 2], [4, 5], [False, True], [True]]]), [[0, 2], [None, 5], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [4], [True], [False]]]), [[0, 1], [4], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [4], [True], [True]]]), [[0, 1], [4], [True]])
elif N == 5:
    check('two batches', solve([[[0, 2], [5, 6], [True, True], [True]], [[0, 1], [7], [True], [True]]]), [[0, 2, 3], [5, 6, 7], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 5, 6, 99], [True, True, True, True], [True]]]), [[0, 2], [5, 6], [True]])
    check('null children', solve([[[0, 2], [5, 6], [False, True], [True]]]), [[0, 2], [None, 6], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [5], [True], [False]]]), [[0, 1], [5], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [5], [True], [True]]]), [[0, 1], [5], [True]])
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
two batches[[0, 0, 2, 2, 3], [1, 2, 3], [True, True]][[0, 2, 3], [1, 2, 3], [True, True]]Failed
sliced child[[0, 0, 2], [1, 2], [True]][[0, 2], [1, 2], [True]]Failed
null children[[0, 0, 2], [None, 2], [True]][[0, 2], [None, 2], [True]]Failed
empty valid row[[0, 0, 0], [], [True]][[0, 0], [], [True]]Failed
null parent storage[[0, 0, 1], [1], [False]][[0, 1], [1], [False]]Failed
no batches[[0], [], []][[0], [], []]Passed
empty batch then row[[0, 0, 0, 1], [1], [True]][[0, 1], [1], [True]]Failed

SHA-256 / d933e7cf4a68bb7ae91b14ec02354228845866a7300a7f73ea06b0a24dfafb36

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        out_offsets=[0]; out_child=[]; out_valid=[]
        for offsets,child,child_valid,parent_valid in d:
            start=offsets[0]; stop=offsets[-1]
            base=len(out_child)
            out_child.extend(child[i] if child_valid[i] else None for i in range(start,stop))
            out_offsets.extend(base+x-start for x in offsets[:-1])
            out_valid.extend(parent_valid)
        return [out_offsets,out_child,out_valid]
    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('two batches', solve([[[0, 2], [1, 2], [True, True], [True]], [[0, 1], [3], [True], [True]]]), [[0, 2, 3], [1, 2, 3], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 1, 2, 99], [True, True, True, True], [True]]]), [[0, 2], [1, 2], [True]])
    check('null children', solve([[[0, 2], [1, 2], [False, True], [True]]]), [[0, 2], [None, 2], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [1], [True], [False]]]), [[0, 1], [1], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [1], [True], [True]]]), [[0, 1], [1], [True]])
elif N == 2:
    check('two batches', solve([[[0, 2], [2, 3], [True, True], [True]], [[0, 1], [4], [True], [True]]]), [[0, 2, 3], [2, 3, 4], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 2, 3, 99], [True, True, True, True], [True]]]), [[0, 2], [2, 3], [True]])
    check('null children', solve([[[0, 2], [2, 3], [False, True], [True]]]), [[0, 2], [None, 3], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [2], [True], [False]]]), [[0, 1], [2], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [2], [True], [True]]]), [[0, 1], [2], [True]])
elif N == 3:
    check('two batches', solve([[[0, 2], [3, 4], [True, True], [True]], [[0, 1], [5], [True], [True]]]), [[0, 2, 3], [3, 4, 5], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 3, 4, 99], [True, True, True, True], [True]]]), [[0, 2], [3, 4], [True]])
    check('null children', solve([[[0, 2], [3, 4], [False, True], [True]]]), [[0, 2], [None, 4], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [3], [True], [False]]]), [[0, 1], [3], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [3], [True], [True]]]), [[0, 1], [3], [True]])
elif N == 4:
    check('two batches', solve([[[0, 2], [4, 5], [True, True], [True]], [[0, 1], [6], [True], [True]]]), [[0, 2, 3], [4, 5, 6], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 4, 5, 99], [True, True, True, True], [True]]]), [[0, 2], [4, 5], [True]])
    check('null children', solve([[[0, 2], [4, 5], [False, True], [True]]]), [[0, 2], [None, 5], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [4], [True], [False]]]), [[0, 1], [4], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [4], [True], [True]]]), [[0, 1], [4], [True]])
elif N == 5:
    check('two batches', solve([[[0, 2], [5, 6], [True, True], [True]], [[0, 1], [7], [True], [True]]]), [[0, 2, 3], [5, 6, 7], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 5, 6, 99], [True, True, True, True], [True]]]), [[0, 2], [5, 6], [True]])
    check('null children', solve([[[0, 2], [5, 6], [False, True], [True]]]), [[0, 2], [None, 6], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [5], [True], [False]]]), [[0, 1], [5], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [5], [True], [True]]]), [[0, 1], [5], [True]])
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
two batches[[0, 0, 2], [1, 2, 3], [True, True]][[0, 2, 3], [1, 2, 3], [True, True]]Failed
sliced child[[0, 0], [1, 2], [True]][[0, 2], [1, 2], [True]]Failed
null children[[0, 0], [None, 2], [True]][[0, 2], [None, 2], [True]]Failed
empty valid row[[0, 0], [], [True]][[0, 0], [], [True]]Passed
null parent storage[[0, 0], [1], [False]][[0, 1], [1], [False]]Failed
no batches[[0], [], []][[0], [], []]Passed
empty batch then row[[0, 0], [1], [True]][[0, 1], [1], [True]]Failed

SHA-256 / 48798061d2500c7bfba41654cc37974a2dcfa837a57262eb173e549e951ee94e

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    try:
        out_offsets=[0]; out_child=[]; out_valid=[]
        for offsets,child,child_valid,parent_valid in d:
            start=offsets[0]; stop=offsets[-1]
            base=len(out_child)
            out_child.extend(child[i] if child_valid[i] else None for i in range(start,stop))
            out_offsets.extend(base+x-start for x in offsets[1:])
            out_valid.extend(parent_valid)
        return [out_offsets,out_child,out_valid]
    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('two batches', solve([[[0, 2], [1, 2], [True, True], [True]], [[0, 1], [3], [True], [True]]]), [[0, 2, 3], [1, 2, 3], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 1, 2, 99], [True, True, True, True], [True]]]), [[0, 2], [1, 2], [True]])
    check('null children', solve([[[0, 2], [1, 2], [False, True], [True]]]), [[0, 2], [None, 2], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [1], [True], [False]]]), [[0, 1], [1], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [1], [True], [True]]]), [[0, 1], [1], [True]])
elif N == 2:
    check('two batches', solve([[[0, 2], [2, 3], [True, True], [True]], [[0, 1], [4], [True], [True]]]), [[0, 2, 3], [2, 3, 4], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 2, 3, 99], [True, True, True, True], [True]]]), [[0, 2], [2, 3], [True]])
    check('null children', solve([[[0, 2], [2, 3], [False, True], [True]]]), [[0, 2], [None, 3], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [2], [True], [False]]]), [[0, 1], [2], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [2], [True], [True]]]), [[0, 1], [2], [True]])
elif N == 3:
    check('two batches', solve([[[0, 2], [3, 4], [True, True], [True]], [[0, 1], [5], [True], [True]]]), [[0, 2, 3], [3, 4, 5], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 3, 4, 99], [True, True, True, True], [True]]]), [[0, 2], [3, 4], [True]])
    check('null children', solve([[[0, 2], [3, 4], [False, True], [True]]]), [[0, 2], [None, 4], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [3], [True], [False]]]), [[0, 1], [3], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [3], [True], [True]]]), [[0, 1], [3], [True]])
elif N == 4:
    check('two batches', solve([[[0, 2], [4, 5], [True, True], [True]], [[0, 1], [6], [True], [True]]]), [[0, 2, 3], [4, 5, 6], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 4, 5, 99], [True, True, True, True], [True]]]), [[0, 2], [4, 5], [True]])
    check('null children', solve([[[0, 2], [4, 5], [False, True], [True]]]), [[0, 2], [None, 5], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [4], [True], [False]]]), [[0, 1], [4], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [4], [True], [True]]]), [[0, 1], [4], [True]])
elif N == 5:
    check('two batches', solve([[[0, 2], [5, 6], [True, True], [True]], [[0, 1], [7], [True], [True]]]), [[0, 2, 3], [5, 6, 7], [True, True]])
    check('sliced child', solve([[[1, 3], [0, 5, 6, 99], [True, True, True, True], [True]]]), [[0, 2], [5, 6], [True]])
    check('null children', solve([[[0, 2], [5, 6], [False, True], [True]]]), [[0, 2], [None, 6], [True]])
    check('empty valid row', solve([[[0, 0], [], [], [True]]]), [[0, 0], [], [True]])
    check('null parent storage', solve([[[0, 1], [5], [True], [False]]]), [[0, 1], [5], [False]])
    check('no batches', solve([]), [[0], [], []])
    check('empty batch then row', solve([[[0], [], [], []], [[0, 1], [5], [True], [True]]]), [[0, 1], [5], [True]])
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
two batches[[0, 2, 3], [1, 2, 3], [True, True]][[0, 2, 3], [1, 2, 3], [True, True]]Passed
sliced child[[0, 2], [1, 2], [True]][[0, 2], [1, 2], [True]]Passed
null children[[0, 2], [None, 2], [True]][[0, 2], [None, 2], [True]]Passed
empty valid row[[0, 0], [], [True]][[0, 0], [], [True]]Passed
null parent storage[[0, 1], [1], [False]][[0, 1], [1], [False]]Passed
no batches[[0], [], []][[0], [], []]Passed
empty batch then row[[0, 1], [1], [True]][[0, 1], [1], [True]]Passed

SHA-256 / 32650eed22c840753293bda7e50e40c49e947ec273e55c86ee57addc9cf76730

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:19.074982+00:00.

Case digest / f294c0aa5f1019068b4ffcd7fff82ea71809be13f17c56c72fe3afc5ed74e296