FA-8811 / Viewport layout / Open access
Sticky element container constraints: Sticky elements attach to zero instead of the configured inset · case 01
Sticky elements attach to zero instead of the configured inset.
ROOT CAUSE
The inset operation uses `max(natural, 0)` where the contract requires `max(natural, inset)`.
VERIFIED REPAIR
Implement the inset operation as `max(natural, inset)`.
Unsuccessful approach: Taking min pins before reaching the inset and scrolls away afterward.
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, 0)
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 | [0, True] | [5, True] | Failed |
| container exits | [0, True] | [0, True] | Passed |
| inset | [0, True] | [12, True] | Failed |
| at natural | [5, False] | [5, False] | Passed |
| parameterized sticky geometry | [0, True] | [1, True] | Failed |
| repeat at natural | [5, False] | [5, False] | Passed |
SHA-256 / f87fec571bbb7d538787befc730571dd954d380c8aed34563fb4f6d14f7d48c4
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 = min(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 | [5, True] | [40, False] | Failed |
| pinned | [-10, False] | [5, True] | Failed |
| container exits | [-130, False] | [0, True] | Failed |
| inset | [-10, False] | [12, True] | Failed |
| at natural | [5, False] | [5, False] | Passed |
| parameterized sticky geometry | [-1, False] | [1, True] | Failed |
| repeat at natural | [5, False] | [5, False] | Passed |
SHA-256 / cc17d5b3b766463baa4c8d9c9b9c3affb85431c0a2519d2b46982b5064a9e4f0
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.530456+00:00.
Case digest / 715c73890bb4c4e67a083705ba9f6bb24cb0a41ff39134c9b6231aba9bad9a27