{"abstract":"The operation returns a result or retained state that violates this contract: Return the last element, or None only when the list is empty.","category":"Sequence semantics","checks":5,"contract":"Return the last element, or None only when the list is empty. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-de7bb67abb793461","failed_approach":"The lexical maximum need not be the final element.","family":"xr-last-element-default","id":"FA-4121","implementations":{"attempt":{"sha256":"c8ac35b7d3229507354698622752adf6de236e4e449aabce986c4cd139b7d5f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return max(x) if x else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), None)\ncheck('singleton collection', solve(['a']), 'a')\ncheck('two distinct elements', solve(['a', 'b']), 'b')\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), 'c')\ncheck('last is not maximum', solve(['c','a']), 'a')\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":"a2827f8d1dac9a69b3eb0da540143e21ac0706e95f0dbd4b59d74d863a18f050","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return x[0] if x else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), None)\ncheck('singleton collection', solve(['a']), 'a')\ncheck('two distinct elements', solve(['a', 'b']), 'b')\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), 'c')\ncheck('last is not maximum', solve(['c','a']), 'a')\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":"ef7a65e6bd22cd30d6727bb351c9da5fcc3f0cf9c1b17f53ee3a2baf83a8cbff","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return x[-1] if x else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('empty collection', solve([]), None)\ncheck('singleton collection', solve(['a']), 'a')\ncheck('two distinct elements', solve(['a', 'b']), 'b')\ncheck('nonadjacent duplicate and unsorted order', solve(['b', 'a', 'b', 'c']), 'c')\ncheck('last is not maximum', solve(['c','a']), 'a')\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-element-default","generated_at":"2026-09-29T14:37:35.783235+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 the last element, or None only when the list is empty.","root_cause":"The first positional element is selected instead of the last.","sha256":"51844c55763358cda4d8dac53d6bdca53752d82a729ab23ece1feb15532bf4b4","title":"Last element default · 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":38.654,"exit_code":1,"observations":[{"actual":null,"check":"empty collection","expected":null,"passed":true},{"actual":"a","check":"singleton collection","expected":"a","passed":true},{"actual":"b","check":"two distinct elements","expected":"b","passed":true},{"actual":"c","check":"nonadjacent duplicate and unsorted order","expected":"c","passed":true},{"actual":"c","check":"last is not maximum","expected":"a","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": \"c\", \"expected\": \"c\", \"passed\": true}, {\"check\": \"last is not maximum\", \"actual\": \"c\", \"expected\": \"a\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":109.886,"exit_code":1,"observations":[{"actual":null,"check":"empty collection","expected":null,"passed":true},{"actual":"a","check":"singleton collection","expected":"a","passed":true},{"actual":"a","check":"two distinct elements","expected":"b","passed":false},{"actual":"b","check":"nonadjacent duplicate and unsorted order","expected":"c","passed":false},{"actual":"c","check":"last is not maximum","expected":"a","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": \"b\", \"expected\": \"c\", \"passed\": false}, {\"check\": \"last is not maximum\", \"actual\": \"c\", \"expected\": \"a\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.672,"exit_code":0,"observations":[{"actual":null,"check":"empty collection","expected":null,"passed":true},{"actual":"a","check":"singleton collection","expected":"a","passed":true},{"actual":"b","check":"two distinct elements","expected":"b","passed":true},{"actual":"c","check":"nonadjacent duplicate and unsorted order","expected":"c","passed":true},{"actual":"a","check":"last is not maximum","expected":"a","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty collection\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton collection\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"two distinct elements\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"nonadjacent duplicate and unsorted order\", \"actual\": \"c\", \"expected\": \"c\", \"passed\": true}, {\"check\": \"last is not maximum\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}