FA-4356 / Container mutation / Open access
Extended slice assignment stride · case 01
The operation returns a result or retained state that violates this contract: Replace values at the selected positive stride positions; replacement length matches selected length.
ROOT CAUSE
A contiguous assignment overwrites intervening positions outside the stride.
VERIFIED REPAIR
Replace values at the selected positive stride positions; replacement length matches selected length.
Unsuccessful approach: Beginning the stride at position one shifts every replacement target.
Case contract
Replace values at the selected positive stride positions; replacement length matches selected length. 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[:len(y[1])]=y[1]; return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('alternating positions', solve(['a', 'b', 'c', 'd'], [2, ['x', 'y']]), ['x', 'b', 'y', 'd'])
check('stride one', solve(['a', 'b'], [1, ['x', 'y']]), ['x', 'y'])
check('empty selection', solve([], [2, []]), [])
check('large stride', solve(['a', 'b'], [8, ['x']]), ['x', 'b'])
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 |
|---|---|---|---|
| alternating positions | ['x', 'y', 'c', 'd'] | ['x', 'b', 'y', 'd'] | Failed |
| stride one | ['x', 'y'] | ['x', 'y'] | Passed |
| empty selection | [] | [] | Passed |
| large stride | ['x', 'b'] | ['x', 'b'] | Passed |
SHA-256 / b4457f1f55abb66736627adb6110ff7351dcfa6f6c76a76546242c5c372b2483
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[1::y[0]]=y[1][:len(a[1::y[0]])]; return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('alternating positions', solve(['a', 'b', 'c', 'd'], [2, ['x', 'y']]), ['x', 'b', 'y', 'd'])
check('stride one', solve(['a', 'b'], [1, ['x', 'y']]), ['x', 'y'])
check('empty selection', solve([], [2, []]), [])
check('large stride', solve(['a', 'b'], [8, ['x']]), ['x', 'b'])
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 |
|---|---|---|---|
| alternating positions | ['a', 'x', 'c', 'y'] | ['x', 'b', 'y', 'd'] | Failed |
| stride one | ['a', 'x'] | ['x', 'y'] | Failed |
| empty selection | [] | [] | Passed |
| large stride | ['a', 'x'] | ['x', 'b'] | Failed |
SHA-256 / bdd3c1387d0f186d306870098b767578ed7a19b288ddf28472c88691b9ab19ed
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); a[::y[0]]=y[1]; return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('alternating positions', solve(['a', 'b', 'c', 'd'], [2, ['x', 'y']]), ['x', 'b', 'y', 'd'])
check('stride one', solve(['a', 'b'], [1, ['x', 'y']]), ['x', 'y'])
check('empty selection', solve([], [2, []]), [])
check('large stride', solve(['a', 'b'], [8, ['x']]), ['x', 'b'])
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 |
|---|---|---|---|
| alternating positions | ['x', 'b', 'y', 'd'] | ['x', 'b', 'y', 'd'] | Passed |
| stride one | ['x', 'y'] | ['x', 'y'] | Passed |
| empty selection | [] | [] | Passed |
| large stride | ['x', 'b'] | ['x', 'b'] | Passed |
SHA-256 / d1b4ceb33f98c9d8dfcca3ee5bdba7a983318550a96eae4298e607205fb4b88c
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.349479+00:00.
Case digest / a871eae9ad7fb235cf5943ec422c0e094a40ef5c206098611780caba899a2329