FA-4591 / Iterator consumption / Open access
Product zero inputs has empty tuple · case 01
The operation returns a result or retained state that violates this contract: Compute the Cartesian product of the supplied pools, yielding one empty tuple for zero pools.
ROOT CAUSE
Zero pools are treated as an empty result instead of the multiplicative empty-tuple identity.
VERIFIED REPAIR
Compute the Cartesian product of the supplied pools, yielding one empty tuple for zero pools.
Unsuccessful approach: Zipping pools pairs positions instead of enumerating their Cartesian product.
Case contract
Compute the Cartesian product of the supplied pools, yielding one empty tuple for zero pools. 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 [list(v) for v in it.product(*x)] if x else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero pools identity', solve([]), [[]])
check('empty pool annihilates', solve([['a'], []]), [])
check('two pools all pairs', solve([['a', 'b'], ['c']]), [['a', 'c'], ['b', 'c']])
check('one pool', solve([['a', 'b']]), [['a'], ['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 |
|---|---|---|---|
| zero pools identity | [] | [[]] | Failed |
| empty pool annihilates | [] | [] | Passed |
| two pools all pairs | [['a', 'c'], ['b', 'c']] | [['a', 'c'], ['b', 'c']] | Passed |
| one pool | [['a'], ['b']] | [['a'], ['b']] | Passed |
SHA-256 / 9a1f603ce4cd122c4cc1d9bd87e36c6b7a6443a4d88121d2e53dea2ee39068e7
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 [list(v) for v in zip(*x)] if x else [[]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero pools identity', solve([]), [[]])
check('empty pool annihilates', solve([['a'], []]), [])
check('two pools all pairs', solve([['a', 'b'], ['c']]), [['a', 'c'], ['b', 'c']])
check('one pool', solve([['a', 'b']]), [['a'], ['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 |
|---|---|---|---|
| zero pools identity | [[]] | [[]] | Passed |
| empty pool annihilates | [] | [] | Passed |
| two pools all pairs | [['a', 'c']] | [['a', 'c'], ['b', 'c']] | Failed |
| one pool | [['a'], ['b']] | [['a'], ['b']] | Passed |
SHA-256 / 7908b33b3f4c9543459baa227d410e41046df8105fb2b1a55312ed022a8d7e0d
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 [list(v) for v in it.product(*x)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero pools identity', solve([]), [[]])
check('empty pool annihilates', solve([['a'], []]), [])
check('two pools all pairs', solve([['a', 'b'], ['c']]), [['a', 'c'], ['b', 'c']])
check('one pool', solve([['a', 'b']]), [['a'], ['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 |
|---|---|---|---|
| zero pools identity | [[]] | [[]] | Passed |
| empty pool annihilates | [] | [] | Passed |
| two pools all pairs | [['a', 'c'], ['b', 'c']] | [['a', 'c'], ['b', 'c']] | Passed |
| one pool | [['a'], ['b']] | [['a'], ['b']] | Passed |
SHA-256 / 5fec93750693adb7e1c3de5681912b631b66508fe606e58947612e6ad4dd708d
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.807765+00:00.
Case digest / a7fa183ce4b9911309381471abcc4431e176c961ee284299d0dcd1624c77c767