FA-10586 / Raster compositing / Open access
Overlay branches on backdrop · case 01
Overlay uses source brightness to choose its branch, yielding hard-light instead.
ROOT CAUSE
Overlay uses source brightness to choose its branch, yielding hard-light instead.
VERIFIED REPAIR
Use the stage contract: Return overlay blending for normalized straight channels; the backdrop destination chooses the dark or light branch.
Unsuccessful approach: Replacing branching with multiplication loses the screen half and the contrast factor.
Case contract
Return overlay blending for normalized straight channels; the backdrop destination chooses the dark or light branch.
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, destination):
return 2*source*destination if source<=.5 else 1-2*(1-source)*(1-destination)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.75, 0.25)), 0.375)
check('fixture 2', solve(*(0.25, 0.75)), 0.625)
check('fixture 3', solve(*(0.5, 0.5)), 0.5)
check('fixture 4', solve(*(0, 1)), 1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | 0.625 | 0.375 | Failed |
| fixture 2 | 0.375 | 0.625 | Failed |
| fixture 3 | 0.5 | 0.5 | Passed |
| fixture 4 | 0 | 1 | Failed |
SHA-256 / f3eea1479994a5313a2beab236e3c686d29026649d028a5432949a1e132c945c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(source, destination):
return source*destination
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.75, 0.25)), 0.375)
check('fixture 2', solve(*(0.25, 0.75)), 0.625)
check('fixture 3', solve(*(0.5, 0.5)), 0.5)
check('fixture 4', solve(*(0, 1)), 1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | 0.1875 | 0.375 | Failed |
| fixture 2 | 0.1875 | 0.625 | Failed |
| fixture 3 | 0.25 | 0.5 | Failed |
| fixture 4 | 0 | 1 | Failed |
SHA-256 / a9d7c44fce80a9ad665ccf96f1a17b006fb463f0bf6632c3ad5748cadeec739d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(source, destination):
return 2*source*destination if destination<=.5 else 1-2*(1-source)*(1-destination)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.75, 0.25)), 0.375)
check('fixture 2', solve(*(0.25, 0.75)), 0.625)
check('fixture 3', solve(*(0.5, 0.5)), 0.5)
check('fixture 4', solve(*(0, 1)), 1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | 0.375 | 0.375 | Passed |
| fixture 2 | 0.625 | 0.625 | Passed |
| fixture 3 | 0.5 | 0.5 | Passed |
| fixture 4 | 1 | 1 | Passed |
SHA-256 / f2da287c4eb8a6cc83b562f9b20d0e0da2634f518c3c33e5397d24019d8eb8bd
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.392163+00:00.
Case digest / f3e8a6c577423b068a529dd1b9027c5be9b2f09c4a471042bca01165d02a6a27