FA-4361 / Container mutation / Open access
Slice deletion does not shift followup indices · case 01
The operation returns a result or retained state that violates this contract: Delete all original positions selected by a positive stride in one operation.
ROOT CAUSE
Repeated forward pops change the meaning of later original indices.
VERIFIED REPAIR
Delete all original positions selected by a positive stride in one operation.
Unsuccessful approach: Selecting only offset-one stride positions loses other surviving positions for larger strides.
Case contract
Delete all original positions selected by a positive stride in one operation. 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)
for i in range(0,len(x),y):
if i<len(a): a.pop(i)
return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positions shift after pop', solve(['a', 'b', 'c', 'd', 'e'], 2), ['b', 'd'])
check('remove all', solve(['a', 'b'], 1), [])
check('empty', solve([], 2), [])
check('large step', solve(['a', 'b', 'c'], 8), ['b', 'c'])
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 |
|---|---|---|---|
| positions shift after pop | ['b', 'c', 'e'] | ['b', 'd'] | Failed |
| remove all | ['b'] | [] | Failed |
| empty | [] | [] | Passed |
| large step | ['b', 'c'] | ['b', 'c'] | Passed |
SHA-256 / 398662963b757ac2c298492904369cb0f467dd80d6a902f956479db1edb1bbb5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return x[1::y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positions shift after pop', solve(['a', 'b', 'c', 'd', 'e'], 2), ['b', 'd'])
check('remove all', solve(['a', 'b'], 1), [])
check('empty', solve([], 2), [])
check('large step', solve(['a', 'b', 'c'], 8), ['b', 'c'])
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 |
|---|---|---|---|
| positions shift after pop | ['b', 'd'] | ['b', 'd'] | Passed |
| remove all | ['b'] | [] | Failed |
| empty | [] | [] | Passed |
| large step | ['b'] | ['b', 'c'] | Failed |
SHA-256 / 0bc69a2d132e0cbdc258378207a86e3a0402546b816ce695320b2b880ea5ca2b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
a=list(x); del a[::y]; return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positions shift after pop', solve(['a', 'b', 'c', 'd', 'e'], 2), ['b', 'd'])
check('remove all', solve(['a', 'b'], 1), [])
check('empty', solve([], 2), [])
check('large step', solve(['a', 'b', 'c'], 8), ['b', 'c'])
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 |
|---|---|---|---|
| positions shift after pop | ['b', 'd'] | ['b', 'd'] | Passed |
| remove all | [] | [] | Passed |
| empty | [] | [] | Passed |
| large step | ['b', 'c'] | ['b', 'c'] | Passed |
SHA-256 / 2da955756b6673af03db3c489bbd4d6359b3a62235e5aa0106c574ae9e69e026
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.429339+00:00.
Case digest / 162ae3b7dad0375164a3bde5d447bba33b76b57d2f133d8454cc8f7b8d55cee8