FAILURE MAP
← Case archive

FA-8301 / Viewport layout / Open access

Nearest-edge scroll reveal: Reveal requests scroll beyond the usable content extent · case 01

Reveal requests scroll beyond the usable content extent.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The bounds operation uses `wanted` where the contract requires `max(0, min(wanted, max(0, extent - viewport)))`.

THE FAILURE

The bounds operation uses `wanted` where the contract requires `max(0, min(wanted, max(0, extent - viewport)))`.

Unsuccessful approach: Clamping to full extent ignores the viewport size.

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 = start
    elif start < offset: wanted = start
    elif end > offset + viewport: wanted = end - viewport
    else: wanted = offset
    return wanted
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 fixtureActualExpectedOutcome
oversized1010Passed
above1010Passed
below2525Passed
visible1010Passed
end clamp8580Failed
negative clamp-50Failed
parameterized reveal distance55Passed
repeat negative clamp-50Failed

SHA-256 / 6088879cd0836cb26c3399cba10b9e8db72d6a903c225ebff9516ede120afae3

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 = start
    elif start < offset: wanted = start
    elif end > offset + viewport: wanted = end - viewport
    else: wanted = offset
    return max(0, min(wanted, extent))
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 fixtureActualExpectedOutcome
oversized1010Passed
above1010Passed
below2525Passed
visible1010Passed
end clamp8580Failed
negative clamp00Passed
parameterized reveal distance55Passed
repeat negative clamp00Passed

SHA-256 / fdfeed34fd54c844bab87dff32e61b83d6ceb48f38c52bd607022a61e8d56537

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 / 4c8f616389ba5c8d37fff0bc944916c213f93ab38950708b95ef7e7c2167c196