{"abstract":"The operation returns a result or retained state that violates this contract: Return positions at which each distinct value last appears, ordered by position.","category":"Sequence semantics","checks":4,"contract":"Return positions at which each distinct value last appears, ordered by position. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-c944fe5ce61587c8","failed_approach":"Every position is retained even when an equal later element supersedes it.","family":"xr-last-occurrence-positions","id":"FA-4216","implementations":{"attempt":{"sha256":"d35af31b1e8a38373262eefc9822d78e71dc229a7cf55310ef9ba594fd75ac42","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return list(range(len(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']), [0])\ncheck('two distinct elements', solve(['a', 'b']), [0, 1])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [1, 2, 3])\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":"aae3d1e22422a408a32ed35a1722290daa3c907e8105b11da1319760a1e0ec29","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [i for i,v in enumerate(x) if v not in x[:i]]\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']), [0])\ncheck('two distinct elements', solve(['a', 'b']), [0, 1])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [1, 2, 3])\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":"31000064256232954395092dd202f07aacdc3b103250fcc418c4c64949d556c4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [i 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']), [0])\ncheck('two distinct elements', solve(['a', 'b']), [0, 1])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [1, 2, 3])\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-last-occurrence-positions","generated_at":"2026-09-29T14:37:36.956658+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":"Return positions at which each distinct value last appears, ordered by position.","root_cause":"First occurrences are selected instead of last occurrences.","sha256":"0cc0a11ec79ddf053249e25f732256ad2e9df212ed731e267f81ae5a78a8ff4a","title":"Last occurrence positions · 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":40.036,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[0],"check":"singleton collection","expected":[0],"passed":true},{"actual":[0,1],"check":"two distinct elements","expected":[0,1],"passed":true},{"actual":[0,1,2,3],"check":"nonadjacent duplicate and unsorted order","expected":[1,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [0, 1, 2, 3], \"expected\": [1, 2, 3], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.233,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[0],"check":"singleton collection","expected":[0],"passed":true},{"actual":[0,1],"check":"two distinct elements","expected":[0,1],"passed":true},{"actual":[0,1,3],"check":"nonadjacent duplicate and unsorted order","expected":[1,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [0, 1, 3], \"expected\": [1, 2, 3], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":35.583,"exit_code":0,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[0],"check":"singleton collection","expected":[0],"passed":true},{"actual":[0,1],"check":"two distinct elements","expected":[0,1],"passed":true},{"actual":[1,2,3],"check":"nonadjacent duplicate and unsorted order","expected":[1,2,3],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [1, 2, 3], \"expected\": [1, 2, 3], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}