{"abstract":"The operation returns a result or retained state that violates this contract: Copy a bounded deque, append to the copy, and return [original,copy,copy capacity]; the copy preserves maxlen and does not mutate the original.","category":"Bounded deques","checks":4,"contract":"Copy a bounded deque, append to the copy, and return [original,copy,copy capacity]; the copy preserves maxlen and does not mutate the original. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-4533a099fc9ce0b5","failed_approach":"Reconstructing without maxlen loses the copy capacity and overflow policy.","family":"xr-deque-copy-retains-bound-and-independent-storage","id":"FA-4791","implementations":{"attempt":{"sha256":"83daa449dc2dc23572430e246a1a1613d35fbb1ae142b151a9194e6f0e5a4f41","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]); b=deque(a); b.append(y[1]); return [list(a),list(b),b.maxlen]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full independent copy', solve(['a', 'b'], [2, 'c']), [['a', 'b'], ['b', 'c'], 2])\ncheck('room remains', solve(['a'], [3, 'b']), [['a'], ['a', 'b'], 3])\ncheck('zero bound', solve([], [0, 'a']), [[], [], 0])\ncheck('empty copy', solve([], [2, 'a']), [[], ['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":"48d7c52eebddb72689619c28c1bff38b2e06e6ec594bf61eec579179c72263d2","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]); b=a; b.append(y[1]); return [list(a),list(b),b.maxlen]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full independent copy', solve(['a', 'b'], [2, 'c']), [['a', 'b'], ['b', 'c'], 2])\ncheck('room remains', solve(['a'], [3, 'b']), [['a'], ['a', 'b'], 3])\ncheck('zero bound', solve([], [0, 'a']), [[], [], 0])\ncheck('empty copy', solve([], [2, 'a']), [[], ['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"},"fixed":{"sha256":"d4c9e2329bf411d6718c694c854ec21b7870b96d6931fedbec568cf2d92d85b1","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]); b=a.copy(); b.append(y[1]); return [list(a),list(b),b.maxlen]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full independent copy', solve(['a', 'b'], [2, 'c']), [['a', 'b'], ['b', 'c'], 2])\ncheck('room remains', solve(['a'], [3, 'b']), [['a'], ['a', 'b'], 3])\ncheck('zero bound', solve([], [0, 'a']), [[], [], 0])\ncheck('empty copy', solve([], [2, 'a']), [[], ['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-deque-copy-retains-bound-and-independent-storage","generated_at":"2026-09-29T14:37:42.882774+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":"Copy a bounded deque, append to the copy, and return [original,copy,copy capacity]; the copy preserves maxlen and does not mutate the original.","root_cause":"Assigning the same deque aliases storage instead of copying it.","sha256":"154b7c3dc1861abddba3fffff1fbdd8391527d5098f36771d971b85db9f74a14","title":"Deque copy retains bound and independent storage · 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.549,"exit_code":1,"observations":[{"actual":[["a","b"],["a","b","c"],null],"check":"full independent copy","expected":[["a","b"],["b","c"],2],"passed":false},{"actual":[["a"],["a","b"],null],"check":"room remains","expected":[["a"],["a","b"],3],"passed":false},{"actual":[[],["a"],null],"check":"zero bound","expected":[[],[],0],"passed":false},{"actual":[[],["a"],null],"check":"empty copy","expected":[[],["a"],2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full independent copy\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\", \"c\"], null], \"expected\": [[\"a\", \"b\"], [\"b\", \"c\"], 2], \"passed\": false}, {\"check\": \"room remains\", \"actual\": [[\"a\"], [\"a\", \"b\"], null], \"expected\": [[\"a\"], [\"a\", \"b\"], 3], \"passed\": false}, {\"check\": \"zero bound\", \"actual\": [[], [\"a\"], null], \"expected\": [[], [], 0], \"passed\": false}, {\"check\": \"empty copy\", \"actual\": [[], [\"a\"], null], \"expected\": [[], [\"a\"], 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.736,"exit_code":1,"observations":[{"actual":[["b","c"],["b","c"],2],"check":"full independent copy","expected":[["a","b"],["b","c"],2],"passed":false},{"actual":[["a","b"],["a","b"],3],"check":"room remains","expected":[["a"],["a","b"],3],"passed":false},{"actual":[[],[],0],"check":"zero bound","expected":[[],[],0],"passed":true},{"actual":[["a"],["a"],2],"check":"empty copy","expected":[[],["a"],2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full independent copy\", \"actual\": [[\"b\", \"c\"], [\"b\", \"c\"], 2], \"expected\": [[\"a\", \"b\"], [\"b\", \"c\"], 2], \"passed\": false}, {\"check\": \"room remains\", \"actual\": [[\"a\", \"b\"], [\"a\", \"b\"], 3], \"expected\": [[\"a\"], [\"a\", \"b\"], 3], \"passed\": false}, {\"check\": \"zero bound\", \"actual\": [[], [], 0], \"expected\": [[], [], 0], \"passed\": true}, {\"check\": \"empty copy\", \"actual\": [[\"a\"], [\"a\"], 2], \"expected\": [[], [\"a\"], 2], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.332,"exit_code":0,"observations":[{"actual":[["a","b"],["b","c"],2],"check":"full independent copy","expected":[["a","b"],["b","c"],2],"passed":true},{"actual":[["a"],["a","b"],3],"check":"room remains","expected":[["a"],["a","b"],3],"passed":true},{"actual":[[],[],0],"check":"zero bound","expected":[[],[],0],"passed":true},{"actual":[[],["a"],2],"check":"empty copy","expected":[[],["a"],2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full independent copy\", \"actual\": [[\"a\", \"b\"], [\"b\", \"c\"], 2], \"expected\": [[\"a\", \"b\"], [\"b\", \"c\"], 2], \"passed\": true}, {\"check\": \"room remains\", \"actual\": [[\"a\"], [\"a\", \"b\"], 3], \"expected\": [[\"a\"], [\"a\", \"b\"], 3], \"passed\": true}, {\"check\": \"zero bound\", \"actual\": [[], [], 0], \"expected\": [[], [], 0], \"passed\": true}, {\"check\": \"empty copy\", \"actual\": [[], [\"a\"], 2], \"expected\": [[], [\"a\"], 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}