FA-44401 / Data systems / Open access
Run decoding rebases positions without rebasing run ends · case 01
Run decoding rebases positions without rebasing run ends.
ROOT CAUSE
run-end-slice: Run decoding rebases positions without rebasing run ends.
THE FAILURE
run-end-slice: Run decoding rebases positions without rebasing run ends.
Unsuccessful approach: Treating length as the absolute stop truncates nonzero slices.
Case contract
Decode a run-end vector into the requested [start,start+length) slice. Run ends are exclusive cumulative positions; values and validity are stored per run. Empty slices return empty.
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:
ends,values,valid,start,length=d
out=[]
for pos in range(length):
r=next(i for i,end in enumerate(ends) if pos < end)
value=values[r]
known=valid[r]
out.append(value if known else None)
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('crossing run boundary', solve([[2, 5], [1, 2], [True, True], 1, 3]), [1, 2, 2])
check('start at boundary', solve([[2, 5], [1, 2], [True, True], 2, 2]), [2, 2])
check('null middle run', solve([[1, 3, 5], [1, 2, 3], [True, False, True], 0, 5]), [1, None, None, 3, 3])
check('null first run', solve([[1, 3], [1, 2], [False, True], 1, 2]), [2, 2])
check('empty slice', solve([[3], [1], [True], 1, 0]), [])
check('single run', solve([[4], [1], [True], 0, 4]), [1, 1, 1, 1])
check('tail slice', solve([[1, 2, 6], [1, 2, 3], [True, True, True], 4, 2]), [3, 3])
elif N == 2:
check('crossing run boundary', solve([[2, 5], [2, 3], [True, True], 1, 3]), [2, 3, 3])
check('start at boundary', solve([[2, 5], [2, 3], [True, True], 2, 2]), [3, 3])
check('null middle run', solve([[1, 3, 5], [2, 3, 4], [True, False, True], 0, 5]), [2, None, None, 4, 4])
check('null first run', solve([[1, 3], [2, 3], [False, True], 1, 2]), [3, 3])
check('empty slice', solve([[3], [2], [True], 1, 0]), [])
check('single run', solve([[4], [2], [True], 0, 4]), [2, 2, 2, 2])
check('tail slice', solve([[1, 2, 6], [2, 3, 4], [True, True, True], 4, 2]), [4, 4])
elif N == 3:
check('crossing run boundary', solve([[2, 5], [3, 4], [True, True], 1, 3]), [3, 4, 4])
check('start at boundary', solve([[2, 5], [3, 4], [True, True], 2, 2]), [4, 4])
check('null middle run', solve([[1, 3, 5], [3, 4, 5], [True, False, True], 0, 5]), [3, None, None, 5, 5])
check('null first run', solve([[1, 3], [3, 4], [False, True], 1, 2]), [4, 4])
check('empty slice', solve([[3], [3], [True], 1, 0]), [])
check('single run', solve([[4], [3], [True], 0, 4]), [3, 3, 3, 3])
check('tail slice', solve([[1, 2, 6], [3, 4, 5], [True, True, True], 4, 2]), [5, 5])
elif N == 4:
check('crossing run boundary', solve([[2, 5], [4, 5], [True, True], 1, 3]), [4, 5, 5])
check('start at boundary', solve([[2, 5], [4, 5], [True, True], 2, 2]), [5, 5])
check('null middle run', solve([[1, 3, 5], [4, 5, 6], [True, False, True], 0, 5]), [4, None, None, 6, 6])
check('null first run', solve([[1, 3], [4, 5], [False, True], 1, 2]), [5, 5])
check('empty slice', solve([[3], [4], [True], 1, 0]), [])
check('single run', solve([[4], [4], [True], 0, 4]), [4, 4, 4, 4])
check('tail slice', solve([[1, 2, 6], [4, 5, 6], [True, True, True], 4, 2]), [6, 6])
elif N == 5:
check('crossing run boundary', solve([[2, 5], [5, 6], [True, True], 1, 3]), [5, 6, 6])
check('start at boundary', solve([[2, 5], [5, 6], [True, True], 2, 2]), [6, 6])
check('null middle run', solve([[1, 3, 5], [5, 6, 7], [True, False, True], 0, 5]), [5, None, None, 7, 7])
check('null first run', solve([[1, 3], [5, 6], [False, True], 1, 2]), [6, 6])
check('empty slice', solve([[3], [5], [True], 1, 0]), [])
check('single run', solve([[4], [5], [True], 0, 4]), [5, 5, 5, 5])
check('tail slice', solve([[1, 2, 6], [5, 6, 7], [True, True, True], 4, 2]), [7, 7])
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 |
|---|---|---|---|
| crossing run boundary | [1, 1, 2] | [1, 2, 2] | Failed |
| start at boundary | [1, 1] | [2, 2] | Failed |
| null middle run | [1, None, None, 3, 3] | [1, None, None, 3, 3] | Passed |
| null first run | [None, 2] | [2, 2] | Failed |
| empty slice | [] | [] | Passed |
| single run | [1, 1, 1, 1] | [1, 1, 1, 1] | Passed |
| tail slice | [1, 2] | [3, 3] | Failed |
SHA-256 / f62180ccb45a9163ea0196fd8fbc59e14b63e329cdfb48b7f2cb22c866bf12b6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
ends,values,valid,start,length=d
out=[]
for pos in range(start,max(start,length)):
r=next(i for i,end in enumerate(ends) if pos < end)
value=values[r]
known=valid[r]
out.append(value if known else None)
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('crossing run boundary', solve([[2, 5], [1, 2], [True, True], 1, 3]), [1, 2, 2])
check('start at boundary', solve([[2, 5], [1, 2], [True, True], 2, 2]), [2, 2])
check('null middle run', solve([[1, 3, 5], [1, 2, 3], [True, False, True], 0, 5]), [1, None, None, 3, 3])
check('null first run', solve([[1, 3], [1, 2], [False, True], 1, 2]), [2, 2])
check('empty slice', solve([[3], [1], [True], 1, 0]), [])
check('single run', solve([[4], [1], [True], 0, 4]), [1, 1, 1, 1])
check('tail slice', solve([[1, 2, 6], [1, 2, 3], [True, True, True], 4, 2]), [3, 3])
elif N == 2:
check('crossing run boundary', solve([[2, 5], [2, 3], [True, True], 1, 3]), [2, 3, 3])
check('start at boundary', solve([[2, 5], [2, 3], [True, True], 2, 2]), [3, 3])
check('null middle run', solve([[1, 3, 5], [2, 3, 4], [True, False, True], 0, 5]), [2, None, None, 4, 4])
check('null first run', solve([[1, 3], [2, 3], [False, True], 1, 2]), [3, 3])
check('empty slice', solve([[3], [2], [True], 1, 0]), [])
check('single run', solve([[4], [2], [True], 0, 4]), [2, 2, 2, 2])
check('tail slice', solve([[1, 2, 6], [2, 3, 4], [True, True, True], 4, 2]), [4, 4])
elif N == 3:
check('crossing run boundary', solve([[2, 5], [3, 4], [True, True], 1, 3]), [3, 4, 4])
check('start at boundary', solve([[2, 5], [3, 4], [True, True], 2, 2]), [4, 4])
check('null middle run', solve([[1, 3, 5], [3, 4, 5], [True, False, True], 0, 5]), [3, None, None, 5, 5])
check('null first run', solve([[1, 3], [3, 4], [False, True], 1, 2]), [4, 4])
check('empty slice', solve([[3], [3], [True], 1, 0]), [])
check('single run', solve([[4], [3], [True], 0, 4]), [3, 3, 3, 3])
check('tail slice', solve([[1, 2, 6], [3, 4, 5], [True, True, True], 4, 2]), [5, 5])
elif N == 4:
check('crossing run boundary', solve([[2, 5], [4, 5], [True, True], 1, 3]), [4, 5, 5])
check('start at boundary', solve([[2, 5], [4, 5], [True, True], 2, 2]), [5, 5])
check('null middle run', solve([[1, 3, 5], [4, 5, 6], [True, False, True], 0, 5]), [4, None, None, 6, 6])
check('null first run', solve([[1, 3], [4, 5], [False, True], 1, 2]), [5, 5])
check('empty slice', solve([[3], [4], [True], 1, 0]), [])
check('single run', solve([[4], [4], [True], 0, 4]), [4, 4, 4, 4])
check('tail slice', solve([[1, 2, 6], [4, 5, 6], [True, True, True], 4, 2]), [6, 6])
elif N == 5:
check('crossing run boundary', solve([[2, 5], [5, 6], [True, True], 1, 3]), [5, 6, 6])
check('start at boundary', solve([[2, 5], [5, 6], [True, True], 2, 2]), [6, 6])
check('null middle run', solve([[1, 3, 5], [5, 6, 7], [True, False, True], 0, 5]), [5, None, None, 7, 7])
check('null first run', solve([[1, 3], [5, 6], [False, True], 1, 2]), [6, 6])
check('empty slice', solve([[3], [5], [True], 1, 0]), [])
check('single run', solve([[4], [5], [True], 0, 4]), [5, 5, 5, 5])
check('tail slice', solve([[1, 2, 6], [5, 6, 7], [True, True, True], 4, 2]), [7, 7])
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 |
|---|---|---|---|
| crossing run boundary | [1, 2] | [1, 2, 2] | Failed |
| start at boundary | [] | [2, 2] | Failed |
| null middle run | [1, None, None, 3, 3] | [1, None, None, 3, 3] | Passed |
| null first run | [2] | [2, 2] | Failed |
| empty slice | [] | [] | Passed |
| single run | [1, 1, 1, 1] | [1, 1, 1, 1] | Passed |
| tail slice | [] | [3, 3] | Failed |
SHA-256 / 6d357933509de198fec429a47fdd01231f5a2ebc38f6de71abab784fb048ec88
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:12.113188+00:00.
Case digest / 31f903f37e307b652ef26a8a57d7b5d446e5432d8e9579dd1d18c582a4d612bb