FA-4136 / Sequence semantics / Open access
Drop first not all matching · case 01
The operation returns a result or retained state that violates this contract: Remove exactly the first positional element.
ROOT CAUSE
Value-based filtering removes later elements equal to the first.
VERIFIED REPAIR
Remove exactly the first positional element.
Unsuccessful approach: Deduplicating the suffix removes legitimate repeated survivors.
Case contract
Remove exactly the first positional element. 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 [v for v in x if v != x[0]] if x else []
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', 'b', 'c'])
check('duplicate suffix is retained', solve(['c','b','b']), ['b','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'] | ['b'] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'c'] | ['a', 'b', 'c'] | Failed |
| duplicate suffix is retained | ['b', 'b'] | ['b', 'b'] | Passed |
SHA-256 / deae9487337f095e1d0bd85a60c9ab3ed1d48b2c782fc80574f192e0adc7b94d
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 list(dict.fromkeys(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', 'b', 'c'])
check('duplicate suffix is retained', solve(['c','b','b']), ['b','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'] | ['b'] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| duplicate suffix is retained | ['b'] | ['b', 'b'] | Failed |
SHA-256 / f4b466ec401b54953d3a93b93e0ca937fd3edd455b195e766397f11a2380280e
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:]
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', 'b', 'c'])
check('duplicate suffix is retained', solve(['c','b','b']), ['b','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'] | ['b'] | Passed |
| nonadjacent duplicate and unsorted order | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| duplicate suffix is retained | ['b', 'b'] | ['b', 'b'] | Passed |
SHA-256 / 83cae5255b9300c7debb5f0eaf6ae7143c2c89d36433f0b726f7642aa69c7907
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.172257+00:00.
Case digest / a30bd3a8308c113d2f134c874d16a88513a53c3794315563a72d1aa6724eef91