{"abstract":"The operation returns a result or retained state that violates this contract: Keep only last occurrences, ordered by their original positions.","category":"Sequence semantics","checks":5,"contract":"Keep only last occurrences, ordered by their original positions. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-e57f2201b35ed060","failed_approach":"Sorting unique values cannot reproduce last-occurrence order.","family":"xr-stable-last-occurrence-uniqueness","id":"FA-4091","implementations":{"attempt":{"sha256":"019fe2da3394cb510ecb5daaee09b16fa467165f3fc94e1dac286e02a1fbde37","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return sorted(set(x))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), [])\ncheck('singleton collection', solve(['a']), ['a'])\ncheck('two distinct elements', solve(['a', 'b']), ['a', 'b'])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', 'b', 'c'])\ncheck('last-occurrence order is not lexical', solve(['b','a','c','b']), ['a','c','b'])\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":"32365993eaac3820c3a1673b3034f9c202e2f3368f0b0e8a4ecc022aa06dc04d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return list(dict.fromkeys(x))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), [])\ncheck('singleton collection', solve(['a']), ['a'])\ncheck('two distinct elements', solve(['a', 'b']), ['a', 'b'])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', 'b', 'c'])\ncheck('last-occurrence order is not lexical', solve(['b','a','c','b']), ['a','c','b'])\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":"d4b25fdd7dde1ac68b7c6776d6f8f225853a527e8674b0d474d7a949064e6e95","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [v for i,v in enumerate(x) if v not in x[i+1:]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), [])\ncheck('singleton collection', solve(['a']), ['a'])\ncheck('two distinct elements', solve(['a', 'b']), ['a', 'b'])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), ['a', 'b', 'c'])\ncheck('last-occurrence order is not lexical', solve(['b','a','c','b']), ['a','c','b'])\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":"xr-stable-last-occurrence-uniqueness","generated_at":"2026-09-29T14:37:35.540603+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.","repair":"Keep only last occurrences, ordered by their original positions.","root_cause":"First-occurrence deduplication retains the wrong representative positions.","sha256":"35021af2887d166745229c459552e751c26c6dedbdc49f1ddc689e7b191b05e9","title":"Stable last occurrence uniqueness · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verification":{"attempt":{"elapsed_ms":37.503,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":["a"],"check":"singleton collection","expected":["a"],"passed":true},{"actual":["a","b"],"check":"two distinct elements","expected":["a","b"],"passed":true},{"actual":["a","b","c"],"check":"nonadjacent duplicate and unsorted order","expected":["a","b","c"],"passed":true},{"actual":["a","b","c"],"check":"last-occurrence order is not lexical","expected":["a","c","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"last-occurrence order is not lexical\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"c\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.051,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":["a"],"check":"singleton collection","expected":["a"],"passed":true},{"actual":["a","b"],"check":"two distinct elements","expected":["a","b"],"passed":true},{"actual":["b","a","c"],"check":"nonadjacent duplicate and unsorted order","expected":["a","b","c"],"passed":false},{"actual":["b","a","c"],"check":"last-occurrence order is not lexical","expected":["a","c","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [\"b\", \"a\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": false}, {\"check\": \"last-occurrence order is not lexical\", \"actual\": [\"b\", \"a\", \"c\"], \"expected\": [\"a\", \"c\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.633,"exit_code":0,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":["a"],"check":"singleton collection","expected":["a"],"passed":true},{"actual":["a","b"],"check":"two distinct elements","expected":["a","b"],"passed":true},{"actual":["a","b","c"],"check":"nonadjacent duplicate and unsorted order","expected":["a","b","c"],"passed":true},{"actual":["a","c","b"],"check":"last-occurrence order is not lexical","expected":["a","c","b"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"last-occurrence order is not lexical\", \"actual\": [\"a\", \"c\", \"b\"], \"expected\": [\"a\", \"c\", \"b\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}