FAILURE MAP
← Case archive

FA-4581 / Iterator consumption / Open access

Cycle caches entire first pass · case 01

The operation returns a result or retained state that violates this contract: Emit n cyclic values from a finite input, or no values for empty input.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The output is capped at source length rather than requested length.

THE FAILURE

The output is capped at source length rather than requested length.

Unsuccessful approach: Repeating only the first item loses the rest of the cyclic order.

Case contract

Emit n cyclic values from a finite input, or no values for empty input. 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 (x*y)[:len(x)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cycles order', solve(['a', 'b'], 5), ['a', 'b', 'a', 'b', 'a'])
check('partial cycle', solve(['a', 'b', 'c'], 2), ['a', 'b'])
check('empty input', solve([], 3), [])
check('zero requested', solve(['a'], 0), [])
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 fixtureActualExpectedOutcome
cycles order['a', 'b']['a', 'b', 'a', 'b', 'a']Failed
partial cycle['a', 'b', 'c']['a', 'b']Failed
empty input[][]Passed
zero requested[][]Passed

SHA-256 / 16f8ff8ed05fcffe3b3a86f536f2ce4ef532ea6cab8f64e0e8e38e49d3c33af6

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 (x[:1]*y)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cycles order', solve(['a', 'b'], 5), ['a', 'b', 'a', 'b', 'a'])
check('partial cycle', solve(['a', 'b', 'c'], 2), ['a', 'b'])
check('empty input', solve([], 3), [])
check('zero requested', solve(['a'], 0), [])
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 fixtureActualExpectedOutcome
cycles order['a', 'a', 'a', 'a', 'a']['a', 'b', 'a', 'b', 'a']Failed
partial cycle['a', 'a']['a', 'b']Failed
empty input[][]Passed
zero requested[][]Passed

SHA-256 / 661e24b60723172d44f0819ce698cf9983abb5faac859644d16a8ed21cb00e8a

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:40.808203+00:00.

Case digest / 577f0f7c2fbb37094b7cead0074bf8cbbd3db3a637bea88ed71ee482be7be234