FA-4156 / Sequence semantics / Open access
Odd position selection · case 01
The operation returns a result or retained state that violates this contract: Select positions 1,3,5 and so on.
ROOT CAUSE
The stride begins at the wrong parity.
VERIFIED REPAIR
Select positions 1,3,5 and so on.
Unsuccessful approach: A unit stride keeps even positions after the first selected element.
Case contract
Select positions 1,3,5 and so on. 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):
return x[::2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), ['b'])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | ['a'] | [] | Failed |
| two distinct elements | ['a'] | ['b'] | Failed |
| nonadjacent duplicate and unsorted order | ['b', 'b'] | ['a', 'c'] | Failed |
SHA-256 / dd3af15299a62244aa3506d8d0934e623d59b9670d06d6677c37147e9c85cc09
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:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), ['b'])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | [] | [] | Passed |
| two distinct elements | ['b'] | ['b'] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'b', 'c'] | ['a', 'c'] | Failed |
SHA-256 / 45dc502e505c0b6da94cd199bc917aaaf251f5d22238c481cc5162b55f9e66f2
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return x[1::2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), ['b'])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | [] | [] | Passed |
| two distinct elements | ['b'] | ['b'] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'c'] | ['a', 'c'] | Passed |
SHA-256 / d548edf23d0820bf73d37f6e16a644dcfc6af33e347c3f8b13af28566048af2f
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:36.425579+00:00.
Case digest / c1d12111c131df483911a85eaa1ada576792f5bbeb7a8c18d5fcb9e81a11d457