{"abstract":"The operation returns a result or retained state that violates this contract: Delete a key if present, then insert its new value at the end of insertion order.","category":"Mapping semantics","checks":4,"contract":"Delete a key if present, then insert its new value at the end of insertion order. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-23364a23c268c64e","failed_approach":"Deleting without reinserting loses the new binding.","family":"xr-map-delete-reinsert-moves-key","id":"FA-4401","implementations":{"attempt":{"sha256":"ae4c96a6a26fbd4a92c0f1a67026e55cb25c8d67d41d7969c67d0b282efeb230","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); a.pop(y[0],None); return list(map(list,a.items()))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('existing first moves', solve({'a': 1, 'b': 2}, ['a', 3]), [['b', 2], ['a', 3]])\ncheck('absent appends', solve({'a': 1}, ['b', 2]), [['a', 1], ['b', 2]])\ncheck('empty inserts', solve({}, ['a', 1]), [['a', 1]])\ncheck('last replaces', solve({'a': 1}, ['a', 2]), [['a', 2]])\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":"5c42835504862c92b00b2a83d7f58c6cee54f227d3c53d5656048da52117cbba","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=dict(x); a[y[0]]=y[1]; return list(map(list,a.items()))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('existing first moves', solve({'a': 1, 'b': 2}, ['a', 3]), [['b', 2], ['a', 3]])\ncheck('absent appends', solve({'a': 1}, ['b', 2]), [['a', 1], ['b', 2]])\ncheck('empty inserts', solve({}, ['a', 1]), [['a', 1]])\ncheck('last replaces', solve({'a': 1}, ['a', 2]), [['a', 2]])\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-delete-reinsert-moves-key","generated_at":"2026-09-29T14:37:38.594200+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.","root_cause":"Updating a binding in place retains its original insertion position.","sha256":"56be67ba1b86feccb9cb4562d358e255de5396736cbac3da571ef75bf4bd9fa1","title":"Map delete reinsert moves key · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.39,"exit_code":1,"observations":[{"actual":[["b",2]],"check":"existing first moves","expected":[["b",2],["a",3]],"passed":false},{"actual":[["a",1]],"check":"absent appends","expected":[["a",1],["b",2]],"passed":false},{"actual":[],"check":"empty inserts","expected":[["a",1]],"passed":false},{"actual":[],"check":"last replaces","expected":[["a",2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"existing first moves\", \"actual\": [[\"b\", 2]], \"expected\": [[\"b\", 2], [\"a\", 3]], \"passed\": false}, {\"check\": \"absent appends\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1], [\"b\", 2]], \"passed\": false}, {\"check\": \"empty inserts\", \"actual\": [], \"expected\": [[\"a\", 1]], \"passed\": false}, {\"check\": \"last replaces\", \"actual\": [], \"expected\": [[\"a\", 2]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.158,"exit_code":1,"observations":[{"actual":[["a",3],["b",2]],"check":"existing first moves","expected":[["b",2],["a",3]],"passed":false},{"actual":[["a",1],["b",2]],"check":"absent appends","expected":[["a",1],["b",2]],"passed":true},{"actual":[["a",1]],"check":"empty inserts","expected":[["a",1]],"passed":true},{"actual":[["a",2]],"check":"last replaces","expected":[["a",2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"existing first moves\", \"actual\": [[\"a\", 3], [\"b\", 2]], \"expected\": [[\"b\", 2], [\"a\", 3]], \"passed\": false}, {\"check\": \"absent appends\", \"actual\": [[\"a\", 1], [\"b\", 2]], \"expected\": [[\"a\", 1], [\"b\", 2]], \"passed\": true}, {\"check\": \"empty inserts\", \"actual\": [[\"a\", 1]], \"expected\": [[\"a\", 1]], \"passed\": true}, {\"check\": \"last replaces\", \"actual\": [[\"a\", 2]], \"expected\": [[\"a\", 2]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}