FA-10606 / Color encoding / Open access
Normalized channel to byte half up · case 01
Truncating scaled color introduces a downward quantization bias.
ROOT CAUSE
Truncating scaled color introduces a downward quantization bias.
THE FAILURE
Truncating scaled color introduces a downward quantization bias.
Unsuccessful approach: Banker rounding changes even-integer midpoint ties from half-up behavior.
Case contract
Clamp a finite normalized channel to byte range and round the scaled value to nearest with half-up ties.
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(value):
return int(value*255)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.5,)), 128)
check('fixture 2', solve(*(0.3,)), 77)
check('fixture 3', solve(*(-0.5,)), 0)
check('fixture 4', solve(*(1.5,)), 255)
check('fixture 5', solve(*(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 | 127 | 128 | Failed |
| fixture 2 | 76 | 77 | Failed |
| fixture 3 | -127 | 0 | Failed |
| fixture 4 | 382 | 255 | Failed |
| fixture 5 | 0 | 0 | Passed |
SHA-256 / d25b1c15899371953e3351874644468bf1d7beb93b0772834575404d59dce1b0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(value):
return min(255,max(0,round(value*255)))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(0.5,)), 128)
check('fixture 2', solve(*(0.3,)), 77)
check('fixture 3', solve(*(-0.5,)), 0)
check('fixture 4', solve(*(1.5,)), 255)
check('fixture 5', solve(*(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 | 128 | 128 | Passed |
| fixture 2 | 76 | 77 | Failed |
| fixture 3 | 0 | 0 | Passed |
| fixture 4 | 255 | 255 | Passed |
| fixture 5 | 0 | 0 | Passed |
SHA-256 / 7294d8570de62ff4b1be61f00236d047340e3202ad4f535b39eac5f1c498761e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 5 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.547767+00:00.
Case digest / c4e72d74f3c3d84d6fd13e57ffa2ca931067ec14f6497db710c6cbde5b960e5d