FAILURE MAP
← Case archive

FA-10661 / Raster clipping / Open access

Pixel center coverage · case 01

Coverage samples pixel corners instead of pixel centers.

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

ROOT CAUSE

Coverage samples pixel corners instead of pixel centers.

VERIFIED REPAIR

Use the stage contract: List integer pixel indices whose centers i+0.5 are covered by finite half-open span [left,right); width is a nonnegative integer.

Unsuccessful approach: Strict lower coverage drops a center lying exactly on the included left edge.

Case contract

List integer pixel indices whose centers i+0.5 are covered by finite half-open span [left,right); width is a nonnegative integer.

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(width, left, right):
    return [i for i in range(width) if left<=i<right]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(4, 0.5, 2.5)), [0, 1])
check('fixture 2', solve(*(4, 0.6, 2.6)), [1, 2])
check('fixture 3', solve(*(3, 0, 3)), [0, 1, 2])
check('fixture 4', solve(*(3, 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 fixtureActualExpectedOutcome
fixture 1[1, 2][0, 1]Failed
fixture 2[1, 2][1, 2]Passed
fixture 3[0, 1, 2][0, 1, 2]Passed
fixture 4[][]Passed

SHA-256 / 01f5612e398c9e68740a771f0b8f90abcd4617cc269dd1892cb7e8334951c9ae

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(width, left, right):
    return [i for i in range(width) if left<i+.5<right]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(4, 0.5, 2.5)), [0, 1])
check('fixture 2', solve(*(4, 0.6, 2.6)), [1, 2])
check('fixture 3', solve(*(3, 0, 3)), [0, 1, 2])
check('fixture 4', solve(*(3, 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 fixtureActualExpectedOutcome
fixture 1[1][0, 1]Failed
fixture 2[1, 2][1, 2]Passed
fixture 3[0, 1, 2][0, 1, 2]Passed
fixture 4[][]Passed

SHA-256 / 84bac0b162a969c236f7ccb04aaee8414ddff2a855a14b2893d8dcbace360af0

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(width, left, right):
    return [i for i in range(width) if left<=i+.5<right]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(4, 0.5, 2.5)), [0, 1])
check('fixture 2', solve(*(4, 0.6, 2.6)), [1, 2])
check('fixture 3', solve(*(3, 0, 3)), [0, 1, 2])
check('fixture 4', solve(*(3, 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 fixtureActualExpectedOutcome
fixture 1[0, 1][0, 1]Passed
fixture 2[1, 2][1, 2]Passed
fixture 3[0, 1, 2][0, 1, 2]Passed
fixture 4[][]Passed

SHA-256 / 5b65d6a8fe00c3accbdb3049d8b00b02904e341e3ff0e47d0c0d8381cbe9364a

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

Case digest / 51b526d4e7c02ecbe5f2ad0f25ea5627e17790ccf8e4ccf6a1acda2d57159090