FA-4636 / Iterator consumption / Open access
Enumerate offset affects index not source · case 01
The operation returns a result or retained state that violates this contract: Enumerate the entire stream starting at the supplied counter value; offset does not skip source values.
ROOT CAUSE
The output counter offset is incorrectly used to skip source positions.
VERIFIED REPAIR
Enumerate the entire stream starting at the supplied counter value; offset does not skip source values.
Unsuccessful approach: Ignoring the configured starting counter produces incorrect labels.
Case contract
Enumerate the entire stream starting at the supplied counter value; offset does not skip source values. 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
import itertools as it
from collections import deque
N = 1
observations = []
def solve(x, y=None):
return [[i,v] for i,v in enumerate(x[y:],y)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive start', solve(['a', 'b'], 3), [[3, 'a'], [4, 'b']])
check('negative start', solve(['a', 'b'], -2), [[-2, 'a'], [-1, 'b']])
check('zero start', solve(['a'], 0), [[0, 'a']])
check('empty', solve([], 4), [])
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 |
|---|---|---|---|
| positive start | [] | [[3, 'a'], [4, 'b']] | Failed |
| negative start | [[-2, 'a'], [-1, 'b']] | [[-2, 'a'], [-1, 'b']] | Passed |
| zero start | [[0, 'a']] | [[0, 'a']] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 90439d311997b284c884b451ddb63d2343ac1c00ab21776bbcd956c77e8a5cfc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import itertools as it
from collections import deque
N = 1
observations = []
def solve(x, y=None):
return [[i,v] for i,v in enumerate(x)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive start', solve(['a', 'b'], 3), [[3, 'a'], [4, 'b']])
check('negative start', solve(['a', 'b'], -2), [[-2, 'a'], [-1, 'b']])
check('zero start', solve(['a'], 0), [[0, 'a']])
check('empty', solve([], 4), [])
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 |
|---|---|---|---|
| positive start | [[0, 'a'], [1, 'b']] | [[3, 'a'], [4, 'b']] | Failed |
| negative start | [[0, 'a'], [1, 'b']] | [[-2, 'a'], [-1, 'b']] | Failed |
| zero start | [[0, 'a']] | [[0, 'a']] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 66038a7a1baed483969aa83086472cf21185afcea1838e7b8cc187446dc59fbd
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import itertools as it
from collections import deque
N = 1
observations = []
def solve(x, y=None):
return [[i,v] for i,v in enumerate(x,y)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('positive start', solve(['a', 'b'], 3), [[3, 'a'], [4, 'b']])
check('negative start', solve(['a', 'b'], -2), [[-2, 'a'], [-1, 'b']])
check('zero start', solve(['a'], 0), [[0, 'a']])
check('empty', solve([], 4), [])
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 |
|---|---|---|---|
| positive start | [[3, 'a'], [4, 'b']] | [[3, 'a'], [4, 'b']] | Passed |
| negative start | [[-2, 'a'], [-1, 'b']] | [[-2, 'a'], [-1, 'b']] | Passed |
| zero start | [[0, 'a']] | [[0, 'a']] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 9ca893a90c8aa4d7ea4bc1110fdefd160ce58beb5f20ab30727a4e7c30b83ccb
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:41.313773+00:00.
Case digest / 18418bbfe23f7a1f5c37b004835f634d70cbc4b5c41b10e9a3302f003b69cb9f