FAILURE MAP
← Case archive

FA-10631 / Color encoding / Open access

Grayscale opacity independent · case 01

The grayscale luminance value is incorrectly copied into alpha.

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

ROOT CAUSE

The grayscale luminance value is incorrectly copied into alpha.

VERIFIED REPAIR

Use the stage contract: Expand a straight grayscale byte and independent alpha byte into straight RGBA.

Unsuccessful approach: Forcing opaque alpha ignores explicit transparent grayscale samples.

Case contract

Expand a straight grayscale byte and independent alpha byte into straight RGBA.

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(gray, alpha):
    return [gray,gray,gray,gray]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(20, 128)), [20, 20, 20, 128])
check('fixture 2', solve(*(0, 255)), [0, 0, 0, 255])
check('fixture 3', solve(*(255, 0)), [255, 255, 255, 0])
check('fixture 4', solve(*(0, 0)), [0, 0, 0, 0])
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[20, 20, 20, 20][20, 20, 20, 128]Failed
fixture 2[0, 0, 0, 0][0, 0, 0, 255]Failed
fixture 3[255, 255, 255, 255][255, 255, 255, 0]Failed
fixture 4[0, 0, 0, 0][0, 0, 0, 0]Passed

SHA-256 / c9e697b928ae248c5d02d938882b3c2e36dd24774c0a3d64f737c219632423ae

2 / The unsuccessful fix

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

SHA-256 / affd2e1b9975e3fd45cffedddc8870e98bfb7ce2f80840ab7299a81e0378a822

3 / The verified repair

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

SHA-256 / ded5cf6ad5c3362adad50a4a2871242e949a83dfd6dea5d03b33228850eed437

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

Case digest / 65d97165fb0b320433856b2394dd0707e98d382ddc0946f07de6079ec2c4c375