{"abstract":"Revealing a lower item scrolls it above the viewport.","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.","evaluation_group":"xi-scroll-reveal","failed_approach":"Aligning its start introduces unnecessary motion instead of nearest-edge reveal.","family":"xi-scroll-reveal-trailing","id":"FA-8291","implementations":{"attempt":{"sha256":"06cd81d1fd19bdbcbc9255187871cb10e2b46c94ec25dc1bfdeddcde3afd29f1","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 = start\n    else: wanted = offset\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":"fa684abd73761246155d41542ee75068a26d8acd338d026800609226323812eb","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\n    else: wanted = offset\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"},"fixed":{"sha256":"6a5f0c7331a624886abbb02472a165ee031bb194fe054a1c783c6057aee33ed8","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 = offset\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-trailing","generated_at":"2026-09-29T14:38:20.165182+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.","repair":"Implement the trailing operation as `elif end > offset + viewport: wanted = end - viewport`.","root_cause":"The trailing operation uses `elif end > offset + viewport: wanted = end` where the contract requires `elif end > offset + viewport: wanted = end - viewport`.","sha256":"31618591e6b093aeae244d06c8cd7c0c4b78b8037e17ebb3e1c25fed23ed6cc4","title":"Nearest-edge scroll reveal: Revealing a lower item scrolls it above the viewport · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.295,"exit_code":1,"observations":[{"actual":10,"check":"oversized","expected":10,"passed":true},{"actual":10,"check":"above","expected":10,"passed":true},{"actual":40,"check":"below","expected":25,"passed":false},{"actual":10,"check":"visible","expected":10,"passed":true},{"actual":80,"check":"end clamp","expected":80,"passed":true},{"actual":0,"check":"negative clamp","expected":0,"passed":true},{"actual":10,"check":"parameterized reveal distance","expected":5,"passed":false},{"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\": 40, \"expected\": 25, \"passed\": false}, {\"check\": \"visible\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"end clamp\", \"actual\": 80, \"expected\": 80, \"passed\": true}, {\"check\": \"negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"parameterized reveal distance\", \"actual\": 10, \"expected\": 5, \"passed\": false}, {\"check\": \"repeat negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.113,"exit_code":1,"observations":[{"actual":10,"check":"oversized","expected":10,"passed":true},{"actual":10,"check":"above","expected":10,"passed":true},{"actual":45,"check":"below","expected":25,"passed":false},{"actual":10,"check":"visible","expected":10,"passed":true},{"actual":80,"check":"end clamp","expected":80,"passed":true},{"actual":0,"check":"negative clamp","expected":0,"passed":true},{"actual":15,"check":"parameterized reveal distance","expected":5,"passed":false},{"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\": 45, \"expected\": 25, \"passed\": false}, {\"check\": \"visible\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"end clamp\", \"actual\": 80, \"expected\": 80, \"passed\": true}, {\"check\": \"negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"parameterized reveal distance\", \"actual\": 15, \"expected\": 5, \"passed\": false}, {\"check\": \"repeat negative clamp\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.55,"exit_code":0,"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":10,"check":"visible","expected":10,"passed":true},{"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":true,"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\": 10, \"expected\": 10, \"passed\": true}, {\"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\": true}\n"}},"verified":true,"visibility":"public"}