FA-8281 / Viewport layout / Open access
Nearest-edge scroll reveal: An oversized item reveals its end instead of its leading edge · case 01
An oversized item reveals its end instead of its leading edge.
ROOT CAUSE
The oversized operation uses `if end - start > viewport: wanted = end - viewport` where the contract requires `if end - start > viewport: wanted = start`.
THE FAILURE
The oversized operation uses `if end - start > viewport: wanted = end - viewport` where the contract requires `if end - start > viewport: wanted = start`.
Unsuccessful approach: Leaving offset unchanged may reveal none of the target.
Case contract
Keep already-visible items stationary; reveal nearest edge; align oversized items at the start; clamp offset to the scrollable extent.
Why this case matters
A deterministic model of nearest-edge scroll reveal; this isolates one interface invariant without requiring a browser.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, end, offset, viewport, extent):
if end - start > viewport: wanted = end - viewport
elif start < offset: wanted = start
elif end > offset + viewport: wanted = end - viewport
else: wanted = offset
return max(0, min(wanted, max(0, extent - viewport)))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oversized', solve(10, 40, 0, 20, 100), 10)
check('above', solve(10, 15, 30, 20, 100), 10)
check('below', solve(40, 45, 0, 20, 100), 25)
check('visible', solve(12, 15, 10, 20, 100), 10)
check('end clamp', solve(95, 105, 0, 20, 100), 80)
check('negative clamp', solve(-5, 0, 10, 20, 100), 0)
check('parameterized reveal distance', solve(10*N, 10*N+5, 0, 10, 100*N), 10*N-5)
for repetition in range(N):
check('repeat negative clamp', solve(-5, 0, 10, 20, 100), 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 |
|---|---|---|---|
| oversized | 20 | 10 | Failed |
| above | 10 | 10 | Passed |
| below | 25 | 25 | Passed |
| visible | 10 | 10 | Passed |
| end clamp | 80 | 80 | Passed |
| negative clamp | 0 | 0 | Passed |
| parameterized reveal distance | 5 | 5 | Passed |
| repeat negative clamp | 0 | 0 | Passed |
SHA-256 / 875456309261128500a5e72924ab762f2ae94d46f6c5c11c1f9f99cd5552775d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, end, offset, viewport, extent):
if end - start > viewport: wanted = offset
elif start < offset: wanted = start
elif end > offset + viewport: wanted = end - viewport
else: wanted = offset
return max(0, min(wanted, max(0, extent - viewport)))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oversized', solve(10, 40, 0, 20, 100), 10)
check('above', solve(10, 15, 30, 20, 100), 10)
check('below', solve(40, 45, 0, 20, 100), 25)
check('visible', solve(12, 15, 10, 20, 100), 10)
check('end clamp', solve(95, 105, 0, 20, 100), 80)
check('negative clamp', solve(-5, 0, 10, 20, 100), 0)
check('parameterized reveal distance', solve(10*N, 10*N+5, 0, 10, 100*N), 10*N-5)
for repetition in range(N):
check('repeat negative clamp', solve(-5, 0, 10, 20, 100), 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 |
|---|---|---|---|
| oversized | 0 | 10 | Failed |
| above | 10 | 10 | Passed |
| below | 25 | 25 | Passed |
| visible | 10 | 10 | Passed |
| end clamp | 80 | 80 | Passed |
| negative clamp | 0 | 0 | Passed |
| parameterized reveal distance | 5 | 5 | Passed |
| repeat negative clamp | 0 | 0 | Passed |
SHA-256 / 20246f88dc4f3e48616c1ef1760f228b29fd8bbc35c0c21e57d4dd7e6d16f9fe
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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:20.163896+00:00.
Case digest / 3eebcf694ba708c234cd95650a45c1ddc19f775f042b38e58115772e02a1c92e