FA-10651 / Raster clipping / Open access
Scissor intersection empty · case 01
Combining scissor bounds as a union enlarges the drawable region.
ROOT CAUSE
Combining scissor bounds as a union enlarges the drawable region.
VERIFIED REPAIR
Use the stage contract: Intersect two valid integer half-open scissor rectangles [left,top,right,bottom]. Clamp negative overlap width/height to zero at the maximum start coordinate.
Unsuccessful approach: Raw intersection can return inverted bounds that a raster backend interprets as huge unsigned extents.
Case contract
Intersect two valid integer half-open scissor rectangles [left,top,right,bottom]. Clamp negative overlap width/height to zero at the maximum start coordinate.
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(a, b):
return [min(a[0],b[0]),min(a[1],b[1]),max(a[2],b[2]),max(a[3],b[3])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 4, 4], [2, 1, 6, 3])), [2, 1, 4, 3])
check('fixture 2', solve(*([0, 0, 1, 1], [3, 3, 4, 4])), [3, 3, 3, 3])
check('fixture 3', solve(*([0, 0, 2, 2], [2, 0, 3, 2])), [2, 0, 2, 2])
check('fixture 4', solve(*([0, 0, 4, 4], [1, 1, 2, 2])), [1, 1, 2, 2])
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, 0, 6, 4] | [2, 1, 4, 3] | Failed |
| fixture 2 | [0, 0, 4, 4] | [3, 3, 3, 3] | Failed |
| fixture 3 | [0, 0, 3, 2] | [2, 0, 2, 2] | Failed |
| fixture 4 | [0, 0, 4, 4] | [1, 1, 2, 2] | Failed |
SHA-256 / 7d768e8029a2fba29be902996ee4192ba8268b783b17feaa3dcfe97fff513a8c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(a, b):
return [max(a[0],b[0]),max(a[1],b[1]),min(a[2],b[2]),min(a[3],b[3])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 4, 4], [2, 1, 6, 3])), [2, 1, 4, 3])
check('fixture 2', solve(*([0, 0, 1, 1], [3, 3, 4, 4])), [3, 3, 3, 3])
check('fixture 3', solve(*([0, 0, 2, 2], [2, 0, 3, 2])), [2, 0, 2, 2])
check('fixture 4', solve(*([0, 0, 4, 4], [1, 1, 2, 2])), [1, 1, 2, 2])
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 | [2, 1, 4, 3] | [2, 1, 4, 3] | Passed |
| fixture 2 | [3, 3, 1, 1] | [3, 3, 3, 3] | Failed |
| fixture 3 | [2, 0, 2, 2] | [2, 0, 2, 2] | Passed |
| fixture 4 | [1, 1, 2, 2] | [1, 1, 2, 2] | Passed |
SHA-256 / b2cf299ea26f733f55900cb06f866af8abc0f04d1dde65c726407fcba11fec5f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(a, b):
return [max(a[0],b[0]),max(a[1],b[1]),max(max(a[0],b[0]),min(a[2],b[2])),max(max(a[1],b[1]),min(a[3],b[3]))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0, 0, 4, 4], [2, 1, 6, 3])), [2, 1, 4, 3])
check('fixture 2', solve(*([0, 0, 1, 1], [3, 3, 4, 4])), [3, 3, 3, 3])
check('fixture 3', solve(*([0, 0, 2, 2], [2, 0, 3, 2])), [2, 0, 2, 2])
check('fixture 4', solve(*([0, 0, 4, 4], [1, 1, 2, 2])), [1, 1, 2, 2])
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 | [2, 1, 4, 3] | [2, 1, 4, 3] | Passed |
| fixture 2 | [3, 3, 3, 3] | [3, 3, 3, 3] | Passed |
| fixture 3 | [2, 0, 2, 2] | [2, 0, 2, 2] | Passed |
| fixture 4 | [1, 1, 2, 2] | [1, 1, 2, 2] | Passed |
SHA-256 / c2c11907d5819d00538283ba80b330d3f5cf5775698c2273c0cf70ef83629eb8
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.008914+00:00.
Case digest / 12f028614a84350ba80f3fba46b68c42fb6e400e4b4c84496d5a6184811ff888