FA-4271 / Collection algebra / Open access
Zip stops at shorter · case 01
The operation returns a result or retained state that violates this contract: Zip corresponding positions and stop at the shorter operand.
ROOT CAUSE
Each left value is paired with the first right value rather than its positional counterpart.
VERIFIED REPAIR
Zip corresponding positions and stop at the shorter operand.
Unsuccessful approach: Cartesian expansion invents cross-position pairs.
Case contract
Zip corresponding positions and stop at the shorter operand. 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
N = 1
observations = []
def solve(x, y=None):
return [[a,y[0]] for a in x] if y else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('both empty', solve([], []), [])
check('empty right operand', solve(['a'], []), [])
check('empty left operand', solve([], ['b']), [])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
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 |
|---|---|---|---|
| both empty | [] | [] | Passed |
| empty right operand | [] | [] | Passed |
| empty left operand | [] | [] | Passed |
| overlap and multiplicity | [['b', 'b'], ['a', 'b'], ['b', 'b']] | [['b', 'b'], ['a', 'c'], ['b', 'c']] | Failed |
SHA-256 / 6c4f458efa33b2482dbb9008c8211f59dd45c90b8a35a316d7d714e4a996f15b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return [[a,b] for a in x for b in y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('both empty', solve([], []), [])
check('empty right operand', solve(['a'], []), [])
check('empty left operand', solve([], ['b']), [])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
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 |
|---|---|---|---|
| both empty | [] | [] | Passed |
| empty right operand | [] | [] | Passed |
| empty left operand | [] | [] | Passed |
| overlap and multiplicity | [['b', 'b'], ['b', 'c'], ['b', 'c'], ['a', 'b'], ['a', 'c'], ['a', 'c'], ['b', 'b'], ['b', 'c'], ['b', 'c']] | [['b', 'b'], ['a', 'c'], ['b', 'c']] | Failed |
SHA-256 / efebb3f828a029ee74c08ab57cac93cab1d361ecf72077b3308f4eaeef016a3c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return [[a,b] for a,b in zip(x,y)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('both empty', solve([], []), [])
check('empty right operand', solve(['a'], []), [])
check('empty left operand', solve([], ['b']), [])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
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 |
|---|---|---|---|
| both empty | [] | [] | Passed |
| empty right operand | [] | [] | Passed |
| empty left operand | [] | [] | Passed |
| overlap and multiplicity | [['b', 'b'], ['a', 'c'], ['b', 'c']] | [['b', 'b'], ['a', 'c'], ['b', 'c']] | Passed |
SHA-256 / c8c570a595badfd31a30e0df666536c8234666256d17ca7baf110a94162b2599
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:37.455458+00:00.
Case digest / 7f7b8080e7b8d0320b16820aa0b9dbdfc3d683e251bfac7f1cdd147dee9b77a9