FAILURE MAP
← Case archive

FA-4186 / Sequence semantics / Open access

All nonempty suffixes · case 01

The operation returns a result or retained state that violates this contract: Return all nonempty suffixes in increasing start-position order.

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

ROOT CAUSE

The suffix range skips the full sequence and includes the empty suffix.

VERIFIED REPAIR

Return all nonempty suffixes in increasing start-position order.

Unsuccessful approach: Prefix slicing uses the wrong side of each boundary.

Case contract

Return all nonempty suffixes in increasing start-position order. 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:] for i in range(1,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']), [['a']])
check('two distinct elements', solve(['a', 'b']), [['a', 'b'], ['b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['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[['b'], []][['a', 'b'], ['b']]Failed
nonadjacent duplicate and unsorted order[['a', 'b', 'c'], ['b', 'c'], ['c'], []][['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['c']]Failed

SHA-256 / e0b81c5c73c149c7b6df6098cf7afd874c4f4b1c9f4b70f2837a80cff002dd99

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] 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']), [['a']])
check('two distinct elements', solve(['a', 'b']), [['a', 'b'], ['b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['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']][['a', 'b'], ['b']]Failed
nonadjacent duplicate and unsorted order[[], ['b'], ['b', 'a'], ['b', 'a', 'b']][['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['c']]Failed

SHA-256 / 9c8fea5ed22e7c11f81e4db3e716455187b14664b38aa6e9aec4f1fb69517a31

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:] 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']), [['a']])
check('two distinct elements', solve(['a', 'b']), [['a', 'b'], ['b']])
check('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['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']]Passed
two distinct elements[['a', 'b'], ['b']][['a', 'b'], ['b']]Passed
nonadjacent duplicate and unsorted order[['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['c']][['b', 'a', 'b', 'c'], ['a', 'b', 'c'], ['b', 'c'], ['c']]Passed

SHA-256 / db67c3a99cbd116f82cf19a90c64dcb36479426d2d0b27299ebef2ce395886bd

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

Case digest / ba472022f08e50e9bd4d82e6d6c19213296fd00d895887c70fa457d6ed179a4f