FA-8821 / Viewport layout / Open access
Sticky element container constraints: The sticky element extends beyond its containing block · case 01
The sticky element extends beyond its containing block.
ROOT CAUSE
The element height operation uses `container_end - scroll` where the contract requires `container_end - scroll - height`.
VERIFIED REPAIR
Implement the element height operation as `container_end - scroll - height`.
Unsuccessful approach: Adding its height doubles the overflow allowance.
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
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 | [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 / 5898c699f23bacd0f42e8211036913307690cd764d8a90e647f1ac23c7284194
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 | [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 / 2869104fd58706e68e8330c617e77acd5d7847b92d460f4a2d06da40b9e0db84
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.691969+00:00.
Case digest / 07f958ae01716c047a967f1a51a44f15aef3c83ffb58ae040936a98927251681