FA-10621 / Color encoding / Open access
Rgb565 bit replication · case 01
Zero-padding low bits leaves decoded maximum channels below 255.
ROOT CAUSE
Zero-padding low bits leaves decoded maximum channels below 255.
VERIFIED REPAIR
Use the stage contract: Expand RGB565 into RGB bytes by replicating high bits into low bits, preserving full-scale white.
Unsuccessful approach: Treating green as another five-bit channel loses its extra precision.
Case contract
Expand RGB565 into RGB bytes by replicating high bits into low bits, preserving full-scale white.
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>>11)&31)<<3,((word>>5)&63)<<2,(word&31)<<3]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(65535,)), [255, 255, 255])
check('fixture 2', solve(*(0,)), [0, 0, 0])
check('fixture 3', solve(*(63488,)), [255, 0, 0])
check('fixture 4', solve(*(2016,)), [0, 255, 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 | [248, 252, 248] | [255, 255, 255] | Failed |
| fixture 2 | [0, 0, 0] | [0, 0, 0] | Passed |
| fixture 3 | [248, 0, 0] | [255, 0, 0] | Failed |
| fixture 4 | [0, 252, 0] | [0, 255, 0] | Failed |
SHA-256 / e1d5a5de57cd5ece10b3388f1dc7766bf87bc2629f2b71d2b053e210934c4d75
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>>11)&31)*8,((word>>5)&31)*8,(word&31)*8]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(65535,)), [255, 255, 255])
check('fixture 2', solve(*(0,)), [0, 0, 0])
check('fixture 3', solve(*(63488,)), [255, 0, 0])
check('fixture 4', solve(*(2016,)), [0, 255, 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 | [248, 248, 248] | [255, 255, 255] | Failed |
| fixture 2 | [0, 0, 0] | [0, 0, 0] | Passed |
| fixture 3 | [248, 0, 0] | [255, 0, 0] | Failed |
| fixture 4 | [0, 248, 0] | [0, 255, 0] | Failed |
SHA-256 / c0057c744520dfd27cbe0ff16cf3f836c2eead7aa8628b78b6bfc48beae71eb9
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>>11)&31)<<3)|(((word>>11)&31)>>2),(((word>>5)&63)<<2)|(((word>>5)&63)>>4),((word&31)<<3)|((word&31)>>2)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(65535,)), [255, 255, 255])
check('fixture 2', solve(*(0,)), [0, 0, 0])
check('fixture 3', solve(*(63488,)), [255, 0, 0])
check('fixture 4', solve(*(2016,)), [0, 255, 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 | [255, 255, 255] | [255, 255, 255] | Passed |
| fixture 2 | [0, 0, 0] | [0, 0, 0] | Passed |
| fixture 3 | [255, 0, 0] | [255, 0, 0] | Passed |
| fixture 4 | [0, 255, 0] | [0, 255, 0] | Passed |
SHA-256 / 3af03a8bc58fde9a7527e49add5f295c8460de635ef2789caaaff8ae50c4f922
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.591415+00:00.
Case digest / c550efb02e0d25b74d7782d0f24b0788214d637b7f996564f9e11c90d780f10d