FAILURE MAP
← Case archive

FA-10571 / Raster compositing / Open access

Xor disjoint coverage · case 01

Adding both channels retains their overlap during exclusive compositing.

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

ROOT CAUSE

Adding both channels retains their overlap during exclusive compositing.

VERIFIED REPAIR

Use the stage contract: Source and destination are premultiplied channel values with corresponding normalized alphas. Return Porter-Duff XOR channel.

Unsuccessful approach: Each color is attenuated by its own alpha instead of opposite-layer coverage.

Case contract

Source and destination are premultiplied channel values with corresponding normalized alphas. Return Porter-Duff XOR channel.

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, sa, destination, da):
    return source+destination
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.25, 0.25)), 0.5)
check('fixture 2', solve(*(1, 1, 1, 1)), 0)
check('fixture 3', solve(*(0.25, 0.25, 0, 0)), 0.25)
check('fixture 4', solve(*(0, 0, 0.5, 0.5)), 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 10.750.5Failed
fixture 220Failed
fixture 30.250.25Passed
fixture 40.50.5Passed

SHA-256 / ce8bb15488d4d1379bdf737911ab1b2a4f4ca986a12c0ddaec5bb8e73cd633dc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(source, sa, destination, da):
    return source*(1-sa)+destination*(1-da)
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.25, 0.25)), 0.5)
check('fixture 2', solve(*(1, 1, 1, 1)), 0)
check('fixture 3', solve(*(0.25, 0.25, 0, 0)), 0.25)
check('fixture 4', solve(*(0, 0, 0.5, 0.5)), 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 10.43750.5Failed
fixture 200Passed
fixture 30.18750.25Failed
fixture 40.250.5Failed

SHA-256 / 65770c43c173c31b53fd5319a228f59636a86989c77fc7c0026e3e3398859a05

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(source, sa, destination, da):
    return source*(1-da)+destination*(1-sa)
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.25, 0.25)), 0.5)
check('fixture 2', solve(*(1, 1, 1, 1)), 0)
check('fixture 3', solve(*(0.25, 0.25, 0, 0)), 0.25)
check('fixture 4', solve(*(0, 0, 0.5, 0.5)), 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 10.50.5Passed
fixture 200Passed
fixture 30.250.25Passed
fixture 40.50.5Passed

SHA-256 / 30f08a2ce013b190ca934f3ac98b644a9e20b51023cbc569c6736b8511bd40bd

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

Case digest / 89473bc3deb4d7e1eaf9fd3e1ce3149a6430c320746fd2417348df01da74d081