FAILURE MAP
← Case archive

FA-4606 / Iterator consumption / Open access

Combinations with replacement allows reused position · case 01

The operation returns a result or retained state that violates this contract: Return length-r combinations with replacement, allowing the same input position repeatedly.

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

ROOT CAUSE

Ordinary combinations forbid reusing a source position.

THE FAILURE

Ordinary combinations forbid reusing a source position.

Unsuccessful approach: Cartesian products include decreasing positional orderings that combinations exclude.

Case contract

Return length-r combinations with replacement, allowing the same input position repeatedly. 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.combinations(x,y)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat position', solve(['a', 'b'], 2), [['a', 'a'], ['a', 'b'], ['b', 'b']])
check('one position reused', solve(['a'], 3), [['a', 'a', 'a']])
check('zero choice', solve([], 0), [[]])
check('empty positive choice', solve([], 2), [])
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
repeat position[['a', 'b']][['a', 'a'], ['a', 'b'], ['b', 'b']]Failed
one position reused[][['a', 'a', 'a']]Failed
zero choice[[]][[]]Passed
empty positive choice[][]Passed

SHA-256 / e3edd7cd0e17345426c46a9cb69b2e7d277d5e92a07299329395bdcbf975c4db

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 it.product(x,repeat=y)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat position', solve(['a', 'b'], 2), [['a', 'a'], ['a', 'b'], ['b', 'b']])
check('one position reused', solve(['a'], 3), [['a', 'a', 'a']])
check('zero choice', solve([], 0), [[]])
check('empty positive choice', solve([], 2), [])
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
repeat position[['a', 'a'], ['a', 'b'], ['b', 'a'], ['b', 'b']][['a', 'a'], ['a', 'b'], ['b', 'b']]Failed
one position reused[['a', 'a', 'a']][['a', 'a', 'a']]Passed
zero choice[[]][[]]Passed
empty positive choice[][]Passed

SHA-256 / f4855b9565ddc6a347a0042a1ba05607086ea8aabba7ce25e0b66e68ca2d6847

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

Case digest / d6faa8fc6f71c656df4d55b34be4c57f80e41c4570afec95c902b9aa6af7c3cc