FA-8826 / Viewport layout / Open access
Sticky element container constraints: Sticky elements remain pinned after their container ends · case 01
Sticky elements remain pinned after their container ends.
ROOT CAUSE
The container clamp operation uses `sticky` where the contract requires `min(sticky, limit)`.
VERIFIED REPAIR
Implement the container clamp operation as `min(sticky, limit)`.
Unsuccessful approach: Taking max pushes them to the container bottom prematurely.
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 - scroll
sticky = max(natural, inset)
limit = container_end - scroll - height
position = sticky
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 | [5, True] | [0, True] | Failed |
| 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 / 5e751b391f1506f1dfb3054b021c3c1b39909bb7706b4b3c299fd87467e0d0ca
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 = max(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 | [170, True] | [40, False] | Failed |
| pinned | [120, True] | [5, True] | Failed |
| container exits | [5, True] | [0, True] | Failed |
| inset | [50, True] | [12, True] | Failed |
| at natural | [135, True] | [5, False] | Failed |
| parameterized sticky geometry | [12, True] | [1, True] | Failed |
| repeat at natural | [135, True] | [5, False] | Failed |
SHA-256 / 02c65b95002fdfe905abf1331f8b4b2c330b5d450906c57e19a867cf88582d0c
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.771005+00:00.
Case digest / 414522c313a10a483448258b76502b91c5780f11b29797005fdb3e6bdd39f1e9