FAILURE MAP
← Case archive

FA-4276 / Collection algebra / Open access

Zip longest explicit padding · case 01

The operation returns a result or retained state that violates this contract: Zip to the longer operand, using None for absent positions.

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

ROOT CAUSE

Ordinary zip truncates the longer input.

VERIFIED REPAIR

Zip to the longer operand, using None for absent positions.

Unsuccessful approach: Cycling the shorter input fabricates values where padding is required.

Case contract

Zip to the longer operand, using None for absent positions. 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,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'], []), [['a', None]])
check('empty left operand', solve([], ['b']), [[None, 'b']])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
check('padding must not cycle shorter side', solve(['a'], ['b','c']), [['a','b'],[None,'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 fixtureActualExpectedOutcome
both empty[][]Passed
empty right operand[][['a', None]]Failed
empty left operand[][[None, 'b']]Failed
overlap and multiplicity[['b', 'b'], ['a', 'c'], ['b', 'c']][['b', 'b'], ['a', 'c'], ['b', 'c']]Passed
padding must not cycle shorter side[['a', 'b']][['a', 'b'], [None, 'c']]Failed

SHA-256 / a669de2d66a6cadc34cef1397e325e9e926c2d85d167436de93895eeec13c1db

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 [[x[i%len(x)] if x else None,y[i%len(y)] if y else None] for i in range(max(len(x),len(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'], []), [['a', None]])
check('empty left operand', solve([], ['b']), [[None, 'b']])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
check('padding must not cycle shorter side', solve(['a'], ['b','c']), [['a','b'],[None,'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 fixtureActualExpectedOutcome
both empty[][]Passed
empty right operand[['a', None]][['a', None]]Passed
empty left operand[[None, 'b']][[None, 'b']]Passed
overlap and multiplicity[['b', 'b'], ['a', 'c'], ['b', 'c']][['b', 'b'], ['a', 'c'], ['b', 'c']]Passed
padding must not cycle shorter side[['a', 'b'], ['a', 'c']][['a', 'b'], [None, 'c']]Failed

SHA-256 / 1bdccdfb624830994003fe63e21ae13cd3c98957dcfd6b601ddfc76938373b40

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 [[x[i] if i<len(x) else None,y[i] if i<len(y) else None] for i in range(max(len(x),len(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'], []), [['a', None]])
check('empty left operand', solve([], ['b']), [[None, 'b']])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), [['b', 'b'], ['a', 'c'], ['b', 'c']])
check('padding must not cycle shorter side', solve(['a'], ['b','c']), [['a','b'],[None,'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 fixtureActualExpectedOutcome
both empty[][]Passed
empty right operand[['a', None]][['a', None]]Passed
empty left operand[[None, 'b']][[None, 'b']]Passed
overlap and multiplicity[['b', 'b'], ['a', 'c'], ['b', 'c']][['b', 'b'], ['a', 'c'], ['b', 'c']]Passed
padding must not cycle shorter side[['a', 'b'], [None, 'c']][['a', 'b'], [None, 'c']]Passed

SHA-256 / e312ce92fe23147822801c72523375560f9aaeaef8c19a55d8b8462f5fe702d8

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

Case digest / 497fa4e100eada00a0f28b20f98f592fbbc289cfff9fede510f1bbf7dee49506