{"abstract":"The operation returns a result or retained state that violates this contract: extendleft repeatedly prepends input elements, so input order reverses; bounded overflow evicts the right.","category":"Bounded deques","checks":4,"contract":"extendleft repeatedly prepends input elements, so input order reverses; bounded overflow evicts the right. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-c8913e0f01aeb5dd","failed_approach":"Right extension inserts and evicts at the opposite ends.","family":"xr-deque-extendleft-reverses-source-order","id":"FA-4771","implementations":{"attempt":{"sha256":"c565a8330d79d57515e5aee966983d4cbbc7c72fc641bc3c351ebb5c32b96bd0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=deque(x,maxlen=y[0]); a.extend(y[1]); return list(a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('source reverses', solve(['a'], [4, ['b', 'c']]), ['c', 'b', 'a'])\ncheck('overflow evicts right', solve(['a', 'b'], [2, ['c', 'd']]), ['d', 'c'])\ncheck('empty extension', solve(['a'], [2, []]), ['a'])\ncheck('zero capacity', solve([], [0, ['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":"0eb9f9b23361617eeca36dd08e53b41b9b633e852a424d34e5c1cd6009a54267","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=deque(x,maxlen=y[0]); a.extendleft(reversed(y[1])); return list(a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('source reverses', solve(['a'], [4, ['b', 'c']]), ['c', 'b', 'a'])\ncheck('overflow evicts right', solve(['a', 'b'], [2, ['c', 'd']]), ['d', 'c'])\ncheck('empty extension', solve(['a'], [2, []]), ['a'])\ncheck('zero capacity', solve([], [0, ['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":"0f70ac920901f158d092939e2abaa209df49160937b2cb7a3ee3f042398ac7ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom collections import Counter, ChainMap, deque\nimport heapq\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=deque(x,maxlen=y[0]); a.extendleft(y[1]); return list(a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('source reverses', solve(['a'], [4, ['b', 'c']]), ['c', 'b', 'a'])\ncheck('overflow evicts right', solve(['a', 'b'], [2, ['c', 'd']]), ['d', 'c'])\ncheck('empty extension', solve(['a'], [2, []]), ['a'])\ncheck('zero capacity', solve([], [0, ['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-deque-extendleft-reverses-source-order","generated_at":"2026-09-29T14:37:42.730480+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":"extendleft repeatedly prepends input elements, so input order reverses; bounded overflow evicts the right.","root_cause":"Reversing the source before repeated prepends cancels the required order reversal.","sha256":"e8c534f61c85f1a83c1b7816b2b3a8d9fee7322fe17009d9ec1e32fa9c9ff613","title":"Deque extendleft reverses source 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":109.809,"exit_code":1,"observations":[{"actual":["a","b","c"],"check":"source reverses","expected":["c","b","a"],"passed":false},{"actual":["c","d"],"check":"overflow evicts right","expected":["d","c"],"passed":false},{"actual":["a"],"check":"empty extension","expected":["a"],"passed":true},{"actual":[],"check":"zero capacity","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"source reverses\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"overflow evicts right\", \"actual\": [\"c\", \"d\"], \"expected\": [\"d\", \"c\"], \"passed\": false}, {\"check\": \"empty extension\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.991,"exit_code":1,"observations":[{"actual":["b","c","a"],"check":"source reverses","expected":["c","b","a"],"passed":false},{"actual":["c","d"],"check":"overflow evicts right","expected":["d","c"],"passed":false},{"actual":["a"],"check":"empty extension","expected":["a"],"passed":true},{"actual":[],"check":"zero capacity","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"source reverses\", \"actual\": [\"b\", \"c\", \"a\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"overflow evicts right\", \"actual\": [\"c\", \"d\"], \"expected\": [\"d\", \"c\"], \"passed\": false}, {\"check\": \"empty extension\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.131,"exit_code":0,"observations":[{"actual":["c","b","a"],"check":"source reverses","expected":["c","b","a"],"passed":true},{"actual":["d","c"],"check":"overflow evicts right","expected":["d","c"],"passed":true},{"actual":["a"],"check":"empty extension","expected":["a"],"passed":true},{"actual":[],"check":"zero capacity","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"source reverses\", \"actual\": [\"c\", \"b\", \"a\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": true}, {\"check\": \"overflow evicts right\", \"actual\": [\"d\", \"c\"], \"expected\": [\"d\", \"c\"], \"passed\": true}, {\"check\": \"empty extension\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}