FAILURE MAP
← Case archive

FA-10626 / Color encoding / Open access

Palette alpha lookup · case 01

Palette expansion makes every transparent palette entry opaque.

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

ROOT CAUSE

Palette expansion makes every transparent palette entry opaque.

VERIFIED REPAIR

Use the stage contract: Expand valid palette indices into independent RGBA byte lists, retaining per-entry transparency.

Unsuccessful approach: Preserving alpha but always selecting index zero replaces all palette colors.

Case contract

Expand valid palette indices into independent RGBA byte lists, retaining per-entry transparency.

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(indices, palette):
    return [list(palette[i][:3])+[255] for i in indices]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([1, 0], [[255, 0, 0, 255], [0, 0, 255, 0]])), [[0, 0, 255, 0], [255, 0, 0, 255]])
check('fixture 2', solve(*([], [[0, 0, 0, 0]])), [])
check('fixture 3', solve(*([0], [[1, 2, 3, 128]])), [[1, 2, 3, 128]])
check('fixture 4', solve(*([1, 1], [[0, 0, 0, 255], [5, 6, 7, 64]])), [[5, 6, 7, 64], [5, 6, 7, 64]])
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[[0, 0, 255, 255], [255, 0, 0, 255]][[0, 0, 255, 0], [255, 0, 0, 255]]Failed
fixture 2[][]Passed
fixture 3[[1, 2, 3, 255]][[1, 2, 3, 128]]Failed
fixture 4[[5, 6, 7, 255], [5, 6, 7, 255]][[5, 6, 7, 64], [5, 6, 7, 64]]Failed

SHA-256 / 9d388d7ec4a80c47b42f637c0f0fc0040239e6fcc4380b683bc0e98f008404ac

2 / The unsuccessful fix

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

SHA-256 / 5807dd6e8e561a4ef961e178735677ed0aa2cccff08628be072c7ba3b7a86eb8

3 / The verified repair

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

SHA-256 / aef35916766bf35c0c25c62a582dc0fc1e710b3f2f0b6937d9d6ec00c1ffcf9a

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

Case digest / abd84323b468f144d5f9744b405f52833c83a2ba3ce64850f624d8c4c29b8577