{"abstract":"The operation returns a result or retained state that violates this contract: Visit elements in reverse order while retaining their original indices.","category":"Sequence semantics","checks":4,"contract":"Visit elements in reverse order while retaining their original indices. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-e00789b8caa09a39","failed_approach":"Value lookup confuses repeated values with their first occurrence.","family":"xr-reverse-enumeration-retains-indices","id":"FA-4196","implementations":{"attempt":{"sha256":"10b912f4b092832bb1c0189fd061dcee82903f0c154420655175c3230026144d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[x.index(v),v] for v in reversed(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, 'a']])\ncheck('two distinct elements', solve(['a', 'b']), [[1, 'b'], [0, 'a']])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [[3, 'c'], [2, 'b'], [1, 'a'], [0, '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":"43e5faaa984c1384e06084d81e8cb8808a8e9e22f6619afe7366b427055bd892","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[i,v] for i,v in enumerate(reversed(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, 'a']])\ncheck('two distinct elements', solve(['a', 'b']), [[1, 'b'], [0, 'a']])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [[3, 'c'], [2, 'b'], [1, 'a'], [0, '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":"ed26e6112694b19a90a191565fbca715f7a9dba93b4fc54d8f465c593b7ea065","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [[i,x[i]] for i in range(len(x)-1,-1,-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, 'a']])\ncheck('two distinct elements', solve(['a', 'b']), [[1, 'b'], [0, 'a']])\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), [[3, 'c'], [2, 'b'], [1, 'a'], [0, '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-reverse-enumeration-retains-indices","generated_at":"2026-09-29T14:37:36.791054+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":"Visit elements in reverse order while retaining their original indices.","root_cause":"Enumerating a reversed list assigns new indices instead of preserving original ones.","sha256":"e9e629fb1c83b0c34afb9e5349606349be8745a1795a26ec11186ebe9e4b8397","title":"Reverse enumeration retains indices · 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":42.698,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[[0,"a"]],"check":"singleton collection","expected":[[0,"a"]],"passed":true},{"actual":[[1,"b"],[0,"a"]],"check":"two distinct elements","expected":[[1,"b"],[0,"a"]],"passed":true},{"actual":[[3,"c"],[0,"b"],[1,"a"],[0,"b"]],"check":"nonadjacent duplicate and unsorted order","expected":[[3,"c"],[2,"b"],[1,"a"],[0,"b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [[0, \"a\"]], \"expected\": [[0, \"a\"]], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [[1, \"b\"], [0, \"a\"]], \"expected\": [[1, \"b\"], [0, \"a\"]], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [[3, \"c\"], [0, \"b\"], [1, \"a\"], [0, \"b\"]], \"expected\": [[3, \"c\"], [2, \"b\"], [1, \"a\"], [0, \"b\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.173,"exit_code":1,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[[0,"a"]],"check":"singleton collection","expected":[[0,"a"]],"passed":true},{"actual":[[0,"b"],[1,"a"]],"check":"two distinct elements","expected":[[1,"b"],[0,"a"]],"passed":false},{"actual":[[0,"c"],[1,"b"],[2,"a"],[3,"b"]],"check":"nonadjacent duplicate and unsorted order","expected":[[3,"c"],[2,"b"],[1,"a"],[0,"b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [[0, \"a\"]], \"expected\": [[0, \"a\"]], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [[0, \"b\"], [1, \"a\"]], \"expected\": [[1, \"b\"], [0, \"a\"]], \"passed\": false}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [[0, \"c\"], [1, \"b\"], [2, \"a\"], [3, \"b\"]], \"expected\": [[3, \"c\"], [2, \"b\"], [1, \"a\"], [0, \"b\"]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":112.298,"exit_code":0,"observations":[{"actual":[],"check":"empty collection","expected":[],"passed":true},{"actual":[[0,"a"]],"check":"singleton collection","expected":[[0,"a"]],"passed":true},{"actual":[[1,"b"],[0,"a"]],"check":"two distinct elements","expected":[[1,"b"],[0,"a"]],"passed":true},{"actual":[[3,"c"],[2,"b"],[1,"a"],[0,"b"]],"check":"nonadjacent duplicate and unsorted order","expected":[[3,"c"],[2,"b"],[1,"a"],[0,"b"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": [[0, \"a\"]], \"expected\": [[0, \"a\"]], \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": [[1, \"b\"], [0, \"a\"]], \"expected\": [[1, \"b\"], [0, \"a\"]], \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": [[3, \"c\"], [2, \"b\"], [1, \"a\"], [0, \"b\"]], \"expected\": [[3, \"c\"], [2, \"b\"], [1, \"a\"], [0, \"b\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}