FAILURE MAP
← Case archive

FA-10546 / Raster compositing / Open access

Premultiply all color channels · case 01

Straight RGB channels enter a pipeline that expects premultiplied channels.

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

ROOT CAUSE

Straight RGB channels enter a pipeline that expects premultiplied channels.

VERIFIED REPAIR

Use the stage contract: Convert normalized straight RGBA to premultiplied RGBA, leaving alpha itself unchanged.

Unsuccessful approach: Multiplying alpha by itself changes opacity rather than its representation.

Case contract

Convert normalized straight RGBA to premultiplied RGBA, leaving alpha itself unchanged.

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(rgba):
    return list(rgba)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([1, 0.5, 0.25, 0.5],)), [0.5, 0.25, 0.125, 0.5])
check('fixture 2', solve(*([1, 1, 1, 0],)), [0, 0, 0, 0])
check('fixture 3', solve(*([0.25, 0.5, 1, 1],)), [0.25, 0.5, 1, 1])
check('fixture 4', solve(*([0, 0, 0, 0.5],)), [0, 0, 0, 0.5])
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, 0.5, 0.25, 0.5][0.5, 0.25, 0.125, 0.5]Failed
fixture 2[1, 1, 1, 0][0, 0, 0, 0]Failed
fixture 3[0.25, 0.5, 1, 1][0.25, 0.5, 1, 1]Passed
fixture 4[0, 0, 0, 0.5][0, 0, 0, 0.5]Passed

SHA-256 / fa4ec29880d1bba92256044d31edba53009efea0d641d7cd8701d7a9effd73df

2 / The unsuccessful fix

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

SHA-256 / f56f69da5aed02dadb7a5f9fe93f4983c4bfbf1d3f9cbad0c921982fc638c993

3 / The verified repair

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

SHA-256 / 4aa729bb5f943b7f76cd2f63e452ff50cdd3cd5f79fe4bceca3fe29164f3d03e

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

Case digest / 54819a8a7554f8664bbc0bdb1392414397d37c19a4740c6b6cca44f496417b5f