{"abstract":"The clicked endpoint is excluded from range selection.","category":"Selection controls","checks":8,"contract":"Ranges include both endpoints in document order; plain clicks replace; additive selection unions; missing targets preserve selection.","evaluation_group":"xi-range-selection","failed_approach":"Excluding the anchor still leaves an incomplete range.","family":"xi-range-selection-endpoint","id":"FA-7971","implementations":{"attempt":{"sha256":"43d1169a8cc862be7e412b970ee2db5489f959d4dfafb3c8c555efebeb3944a2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(items, selected, anchor, target, extend, additive):\n    if target not in items: return sorted(selected)\n    if not extend or anchor not in items: span = {target}\n    else:\n        a, b = sorted((items.index(anchor), items.index(target)))\n        span = set(items[a+1:b+1])\n    return sorted(set(selected) | span if additive else span)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('removed', solve(['a','b'], ['a'], 'a', 'x', False, False), ['a'])\ncheck('plain', solve(['a','b','c'], ['a'], 'a', 'c', False, False), ['c'])\ncheck('forward', solve(['a','b','c'], [], 'a', 'c', True, False), ['a', 'b', 'c'])\ncheck('backward', solve(['a','b','c'], [], 'c', 'a', True, False), ['a', 'b', 'c'])\ncheck('union', solve(['a','b','c'], ['a'], 'b', 'c', True, True), ['a', 'b', 'c'])\ncheck('replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\ncheck('parameterized inclusive range', solve(list(range(N+2)), [], 0, N, True, False), list(range(N+1)))\nfor repetition in range(N):\n    check('repeat replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\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":"2f66061add8b24790df182b195bec735ec334895da8d2b7b7945df778ade5ee1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(items, selected, anchor, target, extend, additive):\n    if target not in items: return sorted(selected)\n    if not extend or anchor not in items: span = {target}\n    else:\n        a, b = sorted((items.index(anchor), items.index(target)))\n        span = set(items[a:b])\n    return sorted(set(selected) | span if additive else span)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('removed', solve(['a','b'], ['a'], 'a', 'x', False, False), ['a'])\ncheck('plain', solve(['a','b','c'], ['a'], 'a', 'c', False, False), ['c'])\ncheck('forward', solve(['a','b','c'], [], 'a', 'c', True, False), ['a', 'b', 'c'])\ncheck('backward', solve(['a','b','c'], [], 'c', 'a', True, False), ['a', 'b', 'c'])\ncheck('union', solve(['a','b','c'], ['a'], 'b', 'c', True, True), ['a', 'b', 'c'])\ncheck('replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\ncheck('parameterized inclusive range', solve(list(range(N+2)), [], 0, N, True, False), list(range(N+1)))\nfor repetition in range(N):\n    check('repeat replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\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":"caeebbec1387af3a4eff6775092231c4860974fc3c1fee025be129f473c5877c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(items, selected, anchor, target, extend, additive):\n    if target not in items: return sorted(selected)\n    if not extend or anchor not in items: span = {target}\n    else:\n        a, b = sorted((items.index(anchor), items.index(target)))\n        span = set(items[a:b+1])\n    return sorted(set(selected) | span if additive else span)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('removed', solve(['a','b'], ['a'], 'a', 'x', False, False), ['a'])\ncheck('plain', solve(['a','b','c'], ['a'], 'a', 'c', False, False), ['c'])\ncheck('forward', solve(['a','b','c'], [], 'a', 'c', True, False), ['a', 'b', 'c'])\ncheck('backward', solve(['a','b','c'], [], 'c', 'a', True, False), ['a', 'b', 'c'])\ncheck('union', solve(['a','b','c'], ['a'], 'b', 'c', True, True), ['a', 'b', 'c'])\ncheck('replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\ncheck('parameterized inclusive range', solve(list(range(N+2)), [], 0, N, True, False), list(range(N+1)))\nfor repetition in range(N):\n    check('repeat replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])\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-range-selection-endpoint","generated_at":"2026-09-29T14:38:16.923693+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of anchored range selection; this isolates one interface invariant without requiring a browser.","repair":"Implement the endpoint operation as `items[a:b+1]`.","root_cause":"The endpoint operation uses `items[a:b]` where the contract requires `items[a:b+1]`.","sha256":"2d0a76c683c47a8af9c921b9dbc656d8ef684e17e2f537e67b97610313162cd5","title":"Anchored range selection: The clicked endpoint is excluded from range selection · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.488,"exit_code":1,"observations":[{"actual":["a"],"check":"removed","expected":["a"],"passed":true},{"actual":["c"],"check":"plain","expected":["c"],"passed":true},{"actual":["b","c"],"check":"forward","expected":["a","b","c"],"passed":false},{"actual":["b","c"],"check":"backward","expected":["a","b","c"],"passed":false},{"actual":["a","c"],"check":"union","expected":["a","b","c"],"passed":false},{"actual":["c"],"check":"replace","expected":["b","c"],"passed":false},{"actual":[1],"check":"parameterized inclusive range","expected":[0,1],"passed":false},{"actual":["c"],"check":"repeat replace","expected":["b","c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"removed\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"plain\", \"actual\": [\"c\"], \"expected\": [\"c\"], \"passed\": true}, {\"check\": \"forward\", \"actual\": [\"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"backward\", \"actual\": [\"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"union\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"replace\", \"actual\": [\"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}, {\"check\": \"parameterized inclusive range\", \"actual\": [1], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"repeat replace\", \"actual\": [\"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.855,"exit_code":1,"observations":[{"actual":["a"],"check":"removed","expected":["a"],"passed":true},{"actual":["c"],"check":"plain","expected":["c"],"passed":true},{"actual":["a","b"],"check":"forward","expected":["a","b","c"],"passed":false},{"actual":["a","b"],"check":"backward","expected":["a","b","c"],"passed":false},{"actual":["a","b"],"check":"union","expected":["a","b","c"],"passed":false},{"actual":["b"],"check":"replace","expected":["b","c"],"passed":false},{"actual":[0],"check":"parameterized inclusive range","expected":[0,1],"passed":false},{"actual":["b"],"check":"repeat replace","expected":["b","c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"removed\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"plain\", \"actual\": [\"c\"], \"expected\": [\"c\"], \"passed\": true}, {\"check\": \"forward\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"backward\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"union\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"replace\", \"actual\": [\"b\"], \"expected\": [\"b\", \"c\"], \"passed\": false}, {\"check\": \"parameterized inclusive range\", \"actual\": [0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"repeat replace\", \"actual\": [\"b\"], \"expected\": [\"b\", \"c\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.362,"exit_code":0,"observations":[{"actual":["a"],"check":"removed","expected":["a"],"passed":true},{"actual":["c"],"check":"plain","expected":["c"],"passed":true},{"actual":["a","b","c"],"check":"forward","expected":["a","b","c"],"passed":true},{"actual":["a","b","c"],"check":"backward","expected":["a","b","c"],"passed":true},{"actual":["a","b","c"],"check":"union","expected":["a","b","c"],"passed":true},{"actual":["b","c"],"check":"replace","expected":["b","c"],"passed":true},{"actual":[0,1],"check":"parameterized inclusive range","expected":[0,1],"passed":true},{"actual":["b","c"],"check":"repeat replace","expected":["b","c"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"removed\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"plain\", \"actual\": [\"c\"], \"expected\": [\"c\"], \"passed\": true}, {\"check\": \"forward\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"backward\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"union\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"replace\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"parameterized inclusive range\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"repeat replace\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}