FA-4626 / Iterator consumption / Open access
Any short circuit consumption · case 01
The operation returns a result or retained state that violates this contract: Apply any to a one-pass stream and return [truth result,unconsumed suffix].
ROOT CAUSE
Materializing input eagerly defeats short-circuit consumption.
THE FAILURE
Materializing input eagerly defeats short-circuit consumption.
Unsuccessful approach: Inspecting only the first value misses later truthy values.
Case contract
Apply any to a one-pass stream and return [truth result,unconsumed suffix]. 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):
g=iter(x); a=any(list(g)); return [a,list(g)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first true stops', solve([False, True, False]), [True, [False]])
check('initial true', solve([True, False]), [True, [False]])
check('all false', solve([False, False]), [False, []])
check('empty', solve([]), [False, []])
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 |
|---|---|---|---|
| first true stops | [True, []] | [True, [False]] | Failed |
| initial true | [True, []] | [True, [False]] | Failed |
| all false | [False, []] | [False, []] | Passed |
| empty | [False, []] | [False, []] | Passed |
SHA-256 / 0f62e8c16924d3f53bcdfae61a4b30519fb832729bd9f1e70d8814892074167f
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):
g=iter(x); a=bool(next(g,False)); return [a,list(g)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first true stops', solve([False, True, False]), [True, [False]])
check('initial true', solve([True, False]), [True, [False]])
check('all false', solve([False, False]), [False, []])
check('empty', solve([]), [False, []])
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 |
|---|---|---|---|
| first true stops | [False, [True, False]] | [True, [False]] | Failed |
| initial true | [True, [False]] | [True, [False]] | Passed |
| all false | [False, [False]] | [False, []] | Failed |
| empty | [False, []] | [False, []] | Passed |
SHA-256 / ecffdf0b2843d8b608f7844484e110edd5f5c0795842c8ce38e5cc092c2b5aff
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:41.278108+00:00.
Case digest / b45b62dfae153497fcce7eab3512ae8a9770d9015872de9be683eea924f4f8e5