FAILURE MAP
← Case archive

FA-10541 / Raster compositing / Open access

Source over alpha union · case 01

Adding opacities treats overlap as disjoint coverage.

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

ROOT CAUSE

Adding opacities treats overlap as disjoint coverage.

VERIFIED REPAIR

Use the stage contract: Return source-over output alpha for two normalized opacities.

Unsuccessful approach: Taking maximum opacity omits partially overlapping coverage.

Case contract

Return source-over output alpha for two normalized opacities.

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(source_alpha, destination_alpha):
    return source_alpha+destination_alpha
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.5, 0.5)), 0.75)
check('fixture 2', solve(*(0, 0.5)), 0.5)
check('fixture 3', solve(*(1, 0.25)), 1)
check('fixture 4', solve(*(0.25, 0.5)), 0.625)
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 11.00.75Failed
fixture 20.50.5Passed
fixture 31.251Failed
fixture 40.750.625Failed

SHA-256 / feac8c56618405f67f4ea32f99f3ad77147ded4edcc33175fbad6fe0ca411a38

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(source_alpha, destination_alpha):
    return max(source_alpha,destination_alpha)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.5, 0.5)), 0.75)
check('fixture 2', solve(*(0, 0.5)), 0.5)
check('fixture 3', solve(*(1, 0.25)), 1)
check('fixture 4', solve(*(0.25, 0.5)), 0.625)
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 10.50.75Failed
fixture 20.50.5Passed
fixture 311Passed
fixture 40.50.625Failed

SHA-256 / 3ea08a9793eff899a629a85aa2be0afe8788cb841cf838e66410bad07ad8b6d1

3 / The verified repair

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

SHA-256 / 05049f735f63303c4e89fc3bdd2ee18cf76826e2f6dfa3626879c473b373d0ee

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

Case digest / cf0ab29207486fa9e96267c912572cbea64cbfd547b9f52fc8d2b93b65dee932