FA-10646 / Raster clipping / Open access
Clipped blit source offset · case 01
Clamping the destination origin shifts discarded source pixels back into view.
ROOT CAUSE
Clamping the destination origin shifts discarded source pixels back into view.
VERIFIED REPAIR
Use the stage contract: Blit source row at signed destination x, discarding out-of-range destination pixels while retaining original source alignment.
Unsuccessful approach: A strict lower bound loses the valid pixel at coordinate zero.
Case contract
Blit source row at signed destination x, discarding out-of-range destination pixels while retaining original source alignment.
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(destination, source, x):
out=list(destination)
for i,pixel in enumerate(source):
if 0<=max(0,x)+i<len(out): out[max(0,x)+i]=pixel
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 0], [7, 8, 9], -1)), [8, 9, 0])
check('fixture 2', solve(*([0, 0, 0], [7, 8], 2)), [0, 0, 7])
check('fixture 3', solve(*([0, 0], [7], 0)), [7, 0])
check('fixture 4', solve(*([0, 0], [7], 3)), [0, 0])
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 | [7, 8, 9] | [8, 9, 0] | Failed |
| fixture 2 | [0, 0, 7] | [0, 0, 7] | Passed |
| fixture 3 | [7, 0] | [7, 0] | Passed |
| fixture 4 | [0, 0] | [0, 0] | Passed |
SHA-256 / e27f3fc243b3241be989348a131f12a9153a1c2ebcd3494a93dd34be9766c298
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(destination, source, x):
out=list(destination)
for i,pixel in enumerate(source):
if 0<x+i<len(out): out[x+i]=pixel
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 0], [7, 8, 9], -1)), [8, 9, 0])
check('fixture 2', solve(*([0, 0, 0], [7, 8], 2)), [0, 0, 7])
check('fixture 3', solve(*([0, 0], [7], 0)), [7, 0])
check('fixture 4', solve(*([0, 0], [7], 3)), [0, 0])
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, 9, 0] | [8, 9, 0] | Failed |
| fixture 2 | [0, 0, 7] | [0, 0, 7] | Passed |
| fixture 3 | [0, 0] | [7, 0] | Failed |
| fixture 4 | [0, 0] | [0, 0] | Passed |
SHA-256 / ffccc164c26ad4d38be701d8d1c5eb177391ca921aa1ea0cad5864ca0f34a687
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(destination, source, x):
out=list(destination)
for i,pixel in enumerate(source):
if 0<=x+i<len(out): out[x+i]=pixel
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 0], [7, 8, 9], -1)), [8, 9, 0])
check('fixture 2', solve(*([0, 0, 0], [7, 8], 2)), [0, 0, 7])
check('fixture 3', solve(*([0, 0], [7], 0)), [7, 0])
check('fixture 4', solve(*([0, 0], [7], 3)), [0, 0])
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 | [8, 9, 0] | [8, 9, 0] | Passed |
| fixture 2 | [0, 0, 7] | [0, 0, 7] | Passed |
| fixture 3 | [7, 0] | [7, 0] | Passed |
| fixture 4 | [0, 0] | [0, 0] | Passed |
SHA-256 / e8f310b1c469ac2342f981426ccdbc30471503bd9c3109147db61bc7e9952bd3
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.953007+00:00.
Case digest / 5ef8fbfae8ad0d36d91a7d8baac6b10bdc27856b4fb7a1b1ecaf53cfd8487362