FA-4191 / Sequence semantics / Open access
Enumeration original position · case 01
The operation returns a result or retained state that violates this contract: Pair each element with its original zero-based position.
ROOT CAUSE
Enumeration starts at one although the positional contract starts at zero.
THE FAILURE
Enumeration starts at one although the positional contract starts at zero.
Unsuccessful approach: Value lookup returns the first equal occurrence instead of the current position.
Case contract
Pair each element with its original zero-based position. 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 [[i+1,v] for i,v in enumerate(x)]
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']), [[0, 'a']])
check('two distinct elements', solve(['a', 'b']), [[0, 'a'], [1, 'b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [[0, 'b'], [1, 'a'], [2, 'b'], [3, '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 | [[1, 'a']] | [[0, 'a']] | Failed |
| two distinct elements | [[1, 'a'], [2, 'b']] | [[0, 'a'], [1, 'b']] | Failed |
| nonadjacent duplicate and unsorted order | [[1, 'b'], [2, 'a'], [3, 'b'], [4, 'c']] | [[0, 'b'], [1, 'a'], [2, 'b'], [3, 'c']] | Failed |
SHA-256 / 3b49eb0c6ba48354328cba5aed80d33ad3d8f1ba4ea4981a5ecf8eb43e2ae238
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.index(v),v] for v in x]
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']), [[0, 'a']])
check('two distinct elements', solve(['a', 'b']), [[0, 'a'], [1, 'b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [[0, 'b'], [1, 'a'], [2, 'b'], [3, '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 | [[0, 'a']] | [[0, 'a']] | Passed |
| two distinct elements | [[0, 'a'], [1, 'b']] | [[0, 'a'], [1, 'b']] | Passed |
| nonadjacent duplicate and unsorted order | [[0, 'b'], [1, 'a'], [0, 'b'], [3, 'c']] | [[0, 'b'], [1, 'a'], [2, 'b'], [3, 'c']] | Failed |
SHA-256 / 6e92dd9c7c40c409ff0b708024778460ce979bba96bea9ba364006160db3d560
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.549912+00:00.
Case digest / 885a0807b3d99229b96f6466fa8c5237c4e1b5fa90fcab56b61bf2dd41d95707