FAILURE MAP
← Case archive

FA-4346 / Container mutation / Open access

List splice replaces range · case 01

The operation returns a result or retained state that violates this contract: Replace the half-open positional slice with all supplied elements, allowing length changes.

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

ROOT CAUSE

An inclusive end removes the first unselected suffix element.

THE FAILURE

An inclusive end removes the first unselected suffix element.

Unsuccessful approach: An empty insertion range preserves the old selected content.

Case contract

Replace the half-open positional slice with all supplied elements, allowing length changes. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.

Why this case matters

A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.

1 / The failure

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

N = 1
observations = []
def solve(x, y=None):
    a=list(x); a[y[0]:y[1]+1]=y[2]; return a
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('exclusive end', solve(['a', 'b', 'c'], [1, 2, ['d']]), ['a', 'd', 'c'])
check('insert empty range', solve(['a', 'b'], [1, 1, ['d']]), ['a', 'd', 'b'])
check('delete range', solve(['a', 'b'], [0, 2, []]), [])
check('empty splice', solve([], [0, 0, ['d']]), ['d'])
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
exclusive end['a', 'd']['a', 'd', 'c']Failed
insert empty range['a', 'd']['a', 'd', 'b']Failed
delete range[][]Passed
empty splice['d']['d']Passed

SHA-256 / 3781246151800e9bea7f5aa97c9523c7e24336675a34306dfa4667c99938c64e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x, y=None):
    a=list(x); a[y[0]:y[0]]=y[2]; return a
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('exclusive end', solve(['a', 'b', 'c'], [1, 2, ['d']]), ['a', 'd', 'c'])
check('insert empty range', solve(['a', 'b'], [1, 1, ['d']]), ['a', 'd', 'b'])
check('delete range', solve(['a', 'b'], [0, 2, []]), [])
check('empty splice', solve([], [0, 0, ['d']]), ['d'])
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
exclusive end['a', 'd', 'b', 'c']['a', 'd', 'c']Failed
insert empty range['a', 'd', 'b']['a', 'd', 'b']Passed
delete range['a', 'b'][]Failed
empty splice['d']['d']Passed

SHA-256 / 202f4d74f8f1186d77abd9e61b3d8ac9a38175b1df813e135d346d64f1ba666e

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 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

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

Case digest / 187f75078ad6dfd2cf9304e35408f8395c8b97a0dca54b19339b692c3a3719c8