FAILURE MAP
← Case archive

FA-4171 / Sequence semantics / Open access

Pairwise neighbors overlap · case 01

The operation returns a result or retained state that violates this contract: Emit overlapping adjacent pairs, omitting an incomplete singleton.

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

ROOT CAUSE

Nonoverlapping chunks skip adjacent pairs that cross chunk boundaries.

VERIFIED REPAIR

Emit overlapping adjacent pairs, omitting an incomplete singleton.

Unsuccessful approach: Wrapping the final element back to the first creates a nonexistent neighbor pair.

Case contract

Emit overlapping adjacent pairs, omitting an incomplete singleton. 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 [x[i:i+2] for i in range(0,len(x),2)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), [['a', 'b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a'], ['a', 'b'], ['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 fixtureActualExpectedOutcome
empty collection[][]Passed
singleton collection[['a']][]Failed
two distinct elements[['a', 'b']][['a', 'b']]Passed
nonadjacent duplicate and unsorted order[['b', 'a'], ['b', 'c']][['b', 'a'], ['a', 'b'], ['b', 'c']]Failed

SHA-256 / 373d1c2d9319b1e0dd492d5e41cbdcc0bb5f12502e767794a4b005933114f6c3

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],x[(i+1)%len(x)]] for i in range(len(x))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), [['a', 'b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a'], ['a', 'b'], ['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 fixtureActualExpectedOutcome
empty collection[][]Passed
singleton collection[['a', 'a']][]Failed
two distinct elements[['a', 'b'], ['b', 'a']][['a', 'b']]Failed
nonadjacent duplicate and unsorted order[['b', 'a'], ['a', 'b'], ['b', 'c'], ['c', 'b']][['b', 'a'], ['a', 'b'], ['b', 'c']]Failed

SHA-256 / a2d727123219cd81dfc3b4b0b0b66174a7af176bca8332828e9d1d1dfef86292

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],x[i+1]] for i in range(len(x)-1)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty collection', solve([]), [])
check('singleton collection', solve(['a']), [])
check('two distinct elements', solve(['a', 'b']), [['a', 'b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a'], ['a', 'b'], ['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 fixtureActualExpectedOutcome
empty collection[][]Passed
singleton collection[][]Passed
two distinct elements[['a', 'b']][['a', 'b']]Passed
nonadjacent duplicate and unsorted order[['b', 'a'], ['a', 'b'], ['b', 'c']][['b', 'a'], ['a', 'b'], ['b', 'c']]Passed

SHA-256 / d077153d9b10aee06d7c018909871a456fad90d4f71241445878b8414d7b1931

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

Case digest / a1ed16b49323344baa1a9900b609d2d982b8765af957cd4b5e42d5dc1ed4776d