FA-8806 / Viewport layout / Open access
Sticky element container constraints: Sticky position ignores scroll displacement · case 01
Sticky position ignores scroll displacement.
ROOT CAUSE
The scroll coordinate operation uses `normal` where the contract requires `normal - scroll`.
VERIFIED REPAIR
Implement the scroll coordinate operation as `normal - scroll`.
Unsuccessful approach: Adding scroll moves content in the wrong direction.
Case contract
Convert normal and container positions to viewport coordinates; pin at inset until the containing block bottom, accounting for element height; report whether position differs from natural flow.
Why this case matters
A deterministic model of sticky element container constraints; 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(normal, scroll, inset, height, container_end):
natural = normal
sticky = max(natural, inset)
limit = container_end - scroll - height
position = min(sticky, limit)
return (position, position != natural)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('natural', solve(50, 10, 5, 20, 200), (40, False))
check('pinned', solve(50, 60, 5, 20, 200), (5, True))
check('container exits', solve(50, 180, 5, 20, 200), (0, True))
check('inset', solve(30, 40, 12, 10, 100), (12, True))
check('at natural', solve(50, 45, 5, 20, 200), (5, False))
check('parameterized sticky geometry', solve(5*N,6*N,N,2*N,20*N), (N,True))
for repetition in range(N):
check('repeat at natural', solve(50, 45, 5, 20, 200), (5, False))
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 |
|---|---|---|---|
| natural | [50, False] | [40, False] | Failed |
| pinned | [50, False] | [5, True] | Failed |
| container exits | [0, True] | [0, True] | Passed |
| inset | [30, False] | [12, True] | Failed |
| at natural | [50, False] | [5, False] | Failed |
| parameterized sticky geometry | [5, False] | [1, True] | Failed |
| repeat at natural | [50, False] | [5, False] | Failed |
SHA-256 / 9599a34d9b95da7d3fbe70c62cf8989f09af4e1e4b7d57ddc67f4b971d6411b9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(normal, scroll, inset, height, container_end):
natural = normal + scroll
sticky = max(natural, inset)
limit = container_end - scroll - height
position = min(sticky, limit)
return (position, position != natural)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('natural', solve(50, 10, 5, 20, 200), (40, False))
check('pinned', solve(50, 60, 5, 20, 200), (5, True))
check('container exits', solve(50, 180, 5, 20, 200), (0, True))
check('inset', solve(30, 40, 12, 10, 100), (12, True))
check('at natural', solve(50, 45, 5, 20, 200), (5, False))
check('parameterized sticky geometry', solve(5*N,6*N,N,2*N,20*N), (N,True))
for repetition in range(N):
check('repeat at natural', solve(50, 45, 5, 20, 200), (5, False))
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 |
|---|---|---|---|
| natural | [60, False] | [40, False] | Failed |
| pinned | [110, False] | [5, True] | Failed |
| container exits | [0, True] | [0, True] | Passed |
| inset | [50, True] | [12, True] | Failed |
| at natural | [95, False] | [5, False] | Failed |
| parameterized sticky geometry | [11, False] | [1, True] | Failed |
| repeat at natural | [95, False] | [5, False] | Failed |
SHA-256 / 3f4b21aeea0e5c7ca82fad77be59c8313cdc044c08d4b2b2c2acfe42617a78c5
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(normal, scroll, inset, height, container_end):
natural = normal - scroll
sticky = max(natural, inset)
limit = container_end - scroll - height
position = min(sticky, limit)
return (position, position != natural)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('natural', solve(50, 10, 5, 20, 200), (40, False))
check('pinned', solve(50, 60, 5, 20, 200), (5, True))
check('container exits', solve(50, 180, 5, 20, 200), (0, True))
check('inset', solve(30, 40, 12, 10, 100), (12, True))
check('at natural', solve(50, 45, 5, 20, 200), (5, False))
check('parameterized sticky geometry', solve(5*N,6*N,N,2*N,20*N), (N,True))
for repetition in range(N):
check('repeat at natural', solve(50, 45, 5, 20, 200), (5, False))
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 |
|---|---|---|---|
| natural | [40, False] | [40, False] | Passed |
| pinned | [5, True] | [5, True] | Passed |
| container exits | [0, True] | [0, True] | Passed |
| inset | [12, True] | [12, True] | Passed |
| at natural | [5, False] | [5, False] | Passed |
| parameterized sticky geometry | [1, True] | [1, True] | Passed |
| repeat at natural | [5, False] | [5, False] | Passed |
SHA-256 / 7ac71cf6266177ce4adfbf00c16606201fd7822edec3c31c5cc9873a2742c8b5
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:24.493557+00:00.
Case digest / c9e124a34565349510dee4fb4d08e94f3a2f2a0bc60ae7ed8ae59d8acd19ca47