{"abstract":"Modifier range selection erases prior independent selections.","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":"Always unioning prevents plain range replacement.","family":"xi-range-selection-additive","id":"FA-7976","implementations":{"attempt":{"sha256":"73e959c64911d6c41dd258dfdc97cf93fac062daf60ba643202fbace5f17eda6","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)\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":"088afb54222ee8b29bbe3904201c3514f1d7f445a5c307841d0520a24640a88d","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(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-additive","generated_at":"2026-09-29T14:38:17.048216+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 additive operation as `set(selected) | span if additive else span`.","root_cause":"The additive operation uses `span` where the contract requires `set(selected) | span if additive else span`.","sha256":"8b3d1702d1106f3399d3ace8d81e8fd230ab077ffadaee605c03eee56f87fa05","title":"Anchored range selection: Modifier range selection erases prior independent selections · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.489,"exit_code":1,"observations":[{"actual":["a"],"check":"removed","expected":["a"],"passed":true},{"actual":["a","c"],"check":"plain","expected":["c"],"passed":false},{"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":["a","b","c"],"check":"replace","expected":["b","c"],"passed":false},{"actual":[0,1],"check":"parameterized inclusive range","expected":[0,1],"passed":true},{"actual":["a","b","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\": [\"a\", \"c\"], \"expected\": [\"c\"], \"passed\": false}, {\"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\": [\"a\", \"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}, {\"check\": \"parameterized inclusive range\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"repeat replace\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.757,"exit_code":1,"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":["b","c"],"check":"union","expected":["a","b","c"],"passed":false},{"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":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\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"backward\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"union\", \"actual\": [\"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":40.239,"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"}