FA-4146 / Sequence semantics / Open access
Interior excludes both ends · case 01
The operation returns a result or retained state that violates this contract: Return the positional interior, excluding first and last elements.
ROOT CAUSE
The trailing endpoint remains in the selected interior.
VERIFIED REPAIR
Return the positional interior, excluding first and last elements.
Unsuccessful approach: Removing only the final endpoint leaves the leading endpoint.
Case contract
Return the positional interior, excluding first and last elements. 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[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']), [])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | [] | [] | Passed |
| two distinct elements | ['b'] | [] | Failed |
| nonadjacent duplicate and unsorted order | ['a', 'b', 'c'] | ['a', 'b'] | Failed |
SHA-256 / 49add9dbe2997c910ff811d2e6331de12dffe0cf7adea5addf6c4af53a5bd8b0
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']), [])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | [] | [] | Passed |
| two distinct elements | ['a'] | [] | Failed |
| nonadjacent duplicate and unsorted order | ['b', 'a', 'b'] | ['a', 'b'] | Failed |
SHA-256 / 6284a31bb379c75ebb1cf3c3038a6d38a604d6e7a37f50f140fe62eeded867b8
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:-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']), [])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', '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 |
|---|---|---|---|
| empty collection | [] | [] | Passed |
| singleton collection | [] | [] | Passed |
| two distinct elements | [] | [] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'b'] | ['a', 'b'] | Passed |
SHA-256 / 7fa550bc2ed4620ef11de2bc262f380e66863d1c4dac3451d145840fafb275f8
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.192434+00:00.
Case digest / 2f9eef75eb99c1ae2dfc5346d51560323bd19f431056acf665125790fd41fc41