FA-10601 / Color encoding / Open access
Unpack rgba byte mask · case 01
Shifted higher-order channels leak into lower byte values.
ROOT CAUSE
Shifted higher-order channels leak into lower byte values.
VERIFIED REPAIR
Use the stage contract: Unpack a 32-bit unsigned big-endian RGBA integer into four bytes, masking each shifted field.
Unsuccessful approach: Masking with reversed shifts yields ABGR instead of RGBA.
Case contract
Unpack a 32-bit unsigned big-endian RGBA integer into four bytes, masking each shifted field.
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(word):
return [word>>shift for shift in (24,16,8,0)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(16909060,)), [1, 2, 3, 4])
check('fixture 2', solve(*(255,)), [0, 0, 0, 255])
check('fixture 3', solve(*(4278190080,)), [255, 0, 0, 0])
check('fixture 4', solve(*(0,)), [0, 0, 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 | [1, 258, 66051, 16909060] | [1, 2, 3, 4] | Failed |
| fixture 2 | [0, 0, 0, 255] | [0, 0, 0, 255] | Passed |
| fixture 3 | [255, 65280, 16711680, 4278190080] | [255, 0, 0, 0] | Failed |
| fixture 4 | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
SHA-256 / 9068dd00ecbc5115004c35edd2f31fe704746ac8ddbb7535ada3d25f07dc42c8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(word):
return [(word>>shift)&255 for shift in (0,8,16,24)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(16909060,)), [1, 2, 3, 4])
check('fixture 2', solve(*(255,)), [0, 0, 0, 255])
check('fixture 3', solve(*(4278190080,)), [255, 0, 0, 0])
check('fixture 4', solve(*(0,)), [0, 0, 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 | [4, 3, 2, 1] | [1, 2, 3, 4] | Failed |
| fixture 2 | [255, 0, 0, 0] | [0, 0, 0, 255] | Failed |
| fixture 3 | [0, 0, 0, 255] | [255, 0, 0, 0] | Failed |
| fixture 4 | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
SHA-256 / 39e856bf5ae26023d14a57aacd32d827ba4200e78ef625391fcf81e28d3cda00
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(word):
return [(word>>shift)&255 for shift in (24,16,8,0)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(16909060,)), [1, 2, 3, 4])
check('fixture 2', solve(*(255,)), [0, 0, 0, 255])
check('fixture 3', solve(*(4278190080,)), [255, 0, 0, 0])
check('fixture 4', solve(*(0,)), [0, 0, 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 | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| fixture 2 | [0, 0, 0, 255] | [0, 0, 0, 255] | Passed |
| fixture 3 | [255, 0, 0, 0] | [255, 0, 0, 0] | Passed |
| fixture 4 | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
SHA-256 / ce0f087a200f7893efd8a85a9e9575b821c2e5afa44fbd6ea38cb73d6515eab8
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.540260+00:00.
Case digest / 899cb12dc24029adc799e9be97c09dfa93714d75a67045df00cb44d2405d662d