{"abstract":"Visible targets unnecessarily change the scroll position.","category":"Viewport layout","checks":8,"contract":"Keep already-visible items stationary; reveal nearest edge; align oversized items at the start; clamp offset to the scrollable extent.","contract_signature":"start, end, offset, viewport, extent","evaluation_group":"xi-scroll-reveal","failed_approach":"Aligning their end also moves the viewport despite full visibility.","family":"xi-scroll-reveal-already-visible","id":"FA-8296","implementations":{"attempt":{"sha256":"9309cafe7f6f0e41661bcbb0554fef134bf3f875f1235e5da2e5d589ea5e96ee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(start, end, offset, viewport, extent):\n    if end - start > viewport: wanted = start\n    elif start < offset: wanted = start\n    elif end > offset + viewport: wanted = end - viewport\n    else: wanted = end\n    return max(0, min(wanted, max(0, extent - viewport)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oversized', solve(10, 40, 0, 20, 100), 10)\ncheck('above', solve(10, 15, 30, 20, 100), 10)\ncheck('below', solve(40, 45, 0, 20, 100), 25)\ncheck('visible', solve(12, 15, 10, 20, 100), 10)\ncheck('end clamp', solve(95, 105, 0, 20, 100), 80)\ncheck('negative clamp', solve(-5, 0, 10, 20, 100), 0)\ncheck('parameterized reveal distance', solve(10*N, 10*N+5, 0, 10, 100*N), 10*N-5)\nfor repetition in range(N):\n    check('repeat negative clamp', solve(-5, 0, 10, 20, 100), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"e69627bcb6cfbed7072500474a8e57794a7452c2797c8711a6bfb5cf82279bb2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(start, end, offset, viewport, extent):\n    if end - start > viewport: wanted = start\n    elif start < offset: wanted = start\n    elif end > offset + viewport: wanted = end - viewport\n    else: wanted = start\n    return max(0, min(wanted, max(0, extent - viewport)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oversized', solve(10, 40, 0, 20, 100), 10)\ncheck('above', solve(10, 15, 30, 20, 100), 10)\ncheck('below', solve(40, 45, 0, 20, 100), 25)\ncheck('visible', solve(12, 15, 10, 20, 100), 10)\ncheck('end clamp', solve(95, 105, 0, 20, 100), 80)\ncheck('negative clamp', solve(-5, 0, 10, 20, 100), 0)\ncheck('parameterized reveal distance', solve(10*N, 10*N+5, 0, 10, 100*N), 10*N-5)\nfor repetition in range(N):\n    check('repeat negative clamp', solve(-5, 0, 10, 20, 100), 0)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xi-scroll-reveal-already-visible","generated_at":"2026-09-29T14:38:20.163896+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of nearest-edge scroll reveal; this isolates one interface invariant without requiring a browser.","root_cause":"The already visible operation uses `else: wanted = start` where the contract requires `else: wanted = offset`.","sha256":"5fd64e83e1d19118f4c49dd12a9420105585c0fab7c344b8dee616cca9fbb84e","title":"Nearest-edge scroll reveal: Visible targets unnecessarily change the scroll position · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.495,"exit_code":1,"observations":[{"actual":10,"check":"oversized","expected":10,"passed":true},{"actual":10,"check":"above","expected":10,"passed":true},{"actual":25,"check":"below","expected":25,"passed":true},{"actual":15,"check":"visible","expected":10,"passed":false},{"actual":80,"check":"end clamp","expected":80,"passed":true},{"actual":0,"check":"negative clamp","expected":0,"passed":true},{"actual":5,"check":"parameterized reveal distance","expected":5,"passed":true},{"actual":0,"check":"repeat negative clamp","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oversized\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"above\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"below\", \"actual\": 25, \"expected\": 25, \"passed\": true}, {\"check\": \"visible\", \"actual\": 15, \"expected\": 10, \"passed\": false}, {\"check\": \"end clamp\", \"actual\": 80, \"expected\": 80, \"passed\": true}, {\"check\": \"negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"parameterized reveal distance\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"repeat negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.296,"exit_code":1,"observations":[{"actual":10,"check":"oversized","expected":10,"passed":true},{"actual":10,"check":"above","expected":10,"passed":true},{"actual":25,"check":"below","expected":25,"passed":true},{"actual":12,"check":"visible","expected":10,"passed":false},{"actual":80,"check":"end clamp","expected":80,"passed":true},{"actual":0,"check":"negative clamp","expected":0,"passed":true},{"actual":5,"check":"parameterized reveal distance","expected":5,"passed":true},{"actual":0,"check":"repeat negative clamp","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oversized\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"above\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"below\", \"actual\": 25, \"expected\": 25, \"passed\": true}, {\"check\": \"visible\", \"actual\": 12, \"expected\": 10, \"passed\": false}, {\"check\": \"end clamp\", \"actual\": 80, \"expected\": 80, \"passed\": true}, {\"check\": \"negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"parameterized reveal distance\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"repeat negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}