FAILURE MAP
← Case archive

FA-10761 / Raster memory layout / Open access

Rgb triplet count · case 01

The loop stopping bound omits the final complete pixel.

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

ROOT CAUSE

The loop stopping bound omits the final complete pixel.

VERIFIED REPAIR

Use the stage contract: Split a packed RGB channel sequence whose length is divisible by three into complete RGB pixels.

Unsuccessful approach: Using RGBA stride corrupts RGB pixel boundaries.

Case contract

Split a packed RGB channel sequence whose length is divisible by three into complete RGB pixels.

Why this case matters

A deterministic software graphics stage with explicit channel and coordinate conventions; no hardware, device profile or API behavior is inferred.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(channels):
    return [list(channels[i:i+3]) for i in range(0,len(channels)-3,3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([1, 2, 3, 4, 5, 6],)), [[1, 2, 3], [4, 5, 6]])
check('fixture 2', solve(*([1, 2, 3],)), [[1, 2, 3]])
check('fixture 3', solve(*([],)), [])
check('fixture 4', solve(*([0, 0, 0, 1, 1, 1, 2, 2, 2],)), [[0, 0, 0], [1, 1, 1], [2, 2, 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
fixture 1[[1, 2, 3]][[1, 2, 3], [4, 5, 6]]Failed
fixture 2[][[1, 2, 3]]Failed
fixture 3[][]Passed
fixture 4[[0, 0, 0], [1, 1, 1]][[0, 0, 0], [1, 1, 1], [2, 2, 2]]Failed

SHA-256 / 760ad42fc4658b7f6be7d2e702a02a4e6b1775bc226576020c782df28d3c1222

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(channels):
    return [list(channels[i:i+4]) for i in range(0,len(channels),4)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([1, 2, 3, 4, 5, 6],)), [[1, 2, 3], [4, 5, 6]])
check('fixture 2', solve(*([1, 2, 3],)), [[1, 2, 3]])
check('fixture 3', solve(*([],)), [])
check('fixture 4', solve(*([0, 0, 0, 1, 1, 1, 2, 2, 2],)), [[0, 0, 0], [1, 1, 1], [2, 2, 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
fixture 1[[1, 2, 3, 4], [5, 6]][[1, 2, 3], [4, 5, 6]]Failed
fixture 2[[1, 2, 3]][[1, 2, 3]]Passed
fixture 3[][]Passed
fixture 4[[0, 0, 0, 1], [1, 1, 2, 2], [2]][[0, 0, 0], [1, 1, 1], [2, 2, 2]]Failed

SHA-256 / e5e62fd677983c99f51acc5aece872a77e3f51699ff9f65bb5a33532b53c81e3

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(channels):
    return [list(channels[i:i+3]) for i in range(0,len(channels),3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([1, 2, 3, 4, 5, 6],)), [[1, 2, 3], [4, 5, 6]])
check('fixture 2', solve(*([1, 2, 3],)), [[1, 2, 3]])
check('fixture 3', solve(*([],)), [])
check('fixture 4', solve(*([0, 0, 0, 1, 1, 1, 2, 2, 2],)), [[0, 0, 0], [1, 1, 1], [2, 2, 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
fixture 1[[1, 2, 3], [4, 5, 6]][[1, 2, 3], [4, 5, 6]]Passed
fixture 2[[1, 2, 3]][[1, 2, 3]]Passed
fixture 3[][]Passed
fixture 4[[0, 0, 0], [1, 1, 1], [2, 2, 2]][[0, 0, 0], [1, 1, 1], [2, 2, 2]]Passed

SHA-256 / df0abf655e41c5a3d53c00d9ea17727ad8e732ec7d99b6f027c6d91755eb632c

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

Case digest / 35e4849a024e74549c6b7107052629064d426adc5b4736f10d921c5f92d3e403