{"abstract":"The operation returns a result or retained state that violates this contract: Remove and return the most recently inserted item, or None if empty; return [item,remainder items].","category":"Mapping semantics","checks":4,"contract":"Remove and return the most recently inserted item, or None if empty; return [item,remainder items]. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-0f4562d130051150","failed_approach":"The greatest lexical key need not be the newest insertion.","family":"xr-map-last-key-removal-order","id":"FA-4411","implementations":{"attempt":{"sha256":"988c54c1b4977352f5490612d6474c3509db54f6eefac91aaf90ce8e7002b0e3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); k=max(a) if a else None; v=[k,a.pop(k)] if a else None; return [v,list(map(list,a.items()))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('insertion beats lexical', solve({'b': 2, 'a': 1}), [['a', 1], [['b', 2]]])\ncheck('empty', solve({}), [None, []])\ncheck('singleton', solve({'a': 1}), [['a', 1], []])\ncheck('three items', solve({'c': 3, 'a': 1, 'b': 2}), [['b', 2], [['c', 3], ['a', 1]]])\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":"e6378ff5eaba0af6b754a8d0ccf7f4ec3087851a64bbcd35c7a3c1327d4f69ed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); k=next(iter(a)) if a else None; v=[k,a.pop(k)] if a else None; return [v,list(map(list,a.items()))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('insertion beats lexical', solve({'b': 2, 'a': 1}), [['a', 1], [['b', 2]]])\ncheck('empty', solve({}), [None, []])\ncheck('singleton', solve({'a': 1}), [['a', 1], []])\ncheck('three items', solve({'c': 3, 'a': 1, 'b': 2}), [['b', 2], [['c', 3], ['a', 1]]])\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":"a69c3c8de6aed918ffa09110c29913bbd290d7e4182fd5d7b1d644a7dc690ae7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); v=list(a.popitem()) if a else None; return [v,list(map(list,a.items()))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('insertion beats lexical', solve({'b': 2, 'a': 1}), [['a', 1], [['b', 2]]])\ncheck('empty', solve({}), [None, []])\ncheck('singleton', solve({'a': 1}), [['a', 1], []])\ncheck('three items', solve({'c': 3, 'a': 1, 'b': 2}), [['b', 2], [['c', 3], ['a', 1]]])\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-map-last-key-removal-order","generated_at":"2026-09-29T14:37:38.923219+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":"Remove and return the most recently inserted item, or None if empty; return [item,remainder items].","root_cause":"Removing the first iterated key selects the oldest insertion.","sha256":"13e0d62436dbc207bf5758c234d05169835ba280a77fa622fb06105670d4c022","title":"Map last key removal order · 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":36.665,"exit_code":1,"observations":[{"actual":[["b",2],[["a",1]]],"check":"insertion beats lexical","expected":[["a",1],[["b",2]]],"passed":false},{"actual":[null,[]],"check":"empty","expected":[null,[]],"passed":true},{"actual":[["a",1],[]],"check":"singleton","expected":[["a",1],[]],"passed":true},{"actual":[["c",3],[["a",1],["b",2]]],"check":"three items","expected":[["b",2],[["c",3],["a",1]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"insertion beats lexical\", \"actual\": [[\"b\", 2], [[\"a\", 1]]], \"expected\": [[\"a\", 1], [[\"b\", 2]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [null, []], \"expected\": [null, []], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[\"a\", 1], []], \"expected\": [[\"a\", 1], []], \"passed\": true}, {\"check\": \"three items\", \"actual\": [[\"c\", 3], [[\"a\", 1], [\"b\", 2]]], \"expected\": [[\"b\", 2], [[\"c\", 3], [\"a\", 1]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.905,"exit_code":1,"observations":[{"actual":[["b",2],[["a",1]]],"check":"insertion beats lexical","expected":[["a",1],[["b",2]]],"passed":false},{"actual":[null,[]],"check":"empty","expected":[null,[]],"passed":true},{"actual":[["a",1],[]],"check":"singleton","expected":[["a",1],[]],"passed":true},{"actual":[["c",3],[["a",1],["b",2]]],"check":"three items","expected":[["b",2],[["c",3],["a",1]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"insertion beats lexical\", \"actual\": [[\"b\", 2], [[\"a\", 1]]], \"expected\": [[\"a\", 1], [[\"b\", 2]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [null, []], \"expected\": [null, []], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[\"a\", 1], []], \"expected\": [[\"a\", 1], []], \"passed\": true}, {\"check\": \"three items\", \"actual\": [[\"c\", 3], [[\"a\", 1], [\"b\", 2]]], \"expected\": [[\"b\", 2], [[\"c\", 3], [\"a\", 1]]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.43,"exit_code":0,"observations":[{"actual":[["a",1],[["b",2]]],"check":"insertion beats lexical","expected":[["a",1],[["b",2]]],"passed":true},{"actual":[null,[]],"check":"empty","expected":[null,[]],"passed":true},{"actual":[["a",1],[]],"check":"singleton","expected":[["a",1],[]],"passed":true},{"actual":[["b",2],[["c",3],["a",1]]],"check":"three items","expected":[["b",2],[["c",3],["a",1]]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"insertion beats lexical\", \"actual\": [[\"a\", 1], [[\"b\", 2]]], \"expected\": [[\"a\", 1], [[\"b\", 2]]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [null, []], \"expected\": [null, []], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[\"a\", 1], []], \"expected\": [[\"a\", 1], []], \"passed\": true}, {\"check\": \"three items\", \"actual\": [[\"b\", 2], [[\"c\", 3], [\"a\", 1]]], \"expected\": [[\"b\", 2], [[\"c\", 3], [\"a\", 1]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}