{"abstract":"The operation returns a result or retained state that violates this contract: Construct a bounded deque from a sequence, retaining its newest suffix when the initial sequence exceeds capacity.","category":"Bounded deques","checks":4,"contract":"Construct a bounded deque from a sequence, retaining its newest suffix when the initial sequence exceeds capacity. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-6f1e009e5367f54d","failed_approach":"Negative-zero slicing fails the zero-capacity boundary.","family":"xr-deque-reconstruction-retains-newest-suffix","id":"FA-4796","implementations":{"attempt":{"sha256":"37b645082b90d77daace59174bb6955f1224e1d6bdc6ca585f5e51f08509728e","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    return x[-y:]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('truncates left', solve(['a', 'b', 'c'], 2), ['b', 'c'])\ncheck('zero retains none', solve(['a'], 0), [])\ncheck('under capacity', solve(['a'], 3), ['a'])\ncheck('empty', solve([], 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":"9db6f925d82ee58f2723bf96c24a391e85055f24a971ca9cdde3c3feb7f9c545","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    return x[:y]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('truncates left', solve(['a', 'b', 'c'], 2), ['b', 'c'])\ncheck('zero retains none', solve(['a'], 0), [])\ncheck('under capacity', solve(['a'], 3), ['a'])\ncheck('empty', solve([], 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":"c4ce392d9cf634bb88c122fd0204e3fe6537ebc9b015dde1bc9d265199e247a4","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    return list(deque(x,maxlen=y))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('truncates left', solve(['a', 'b', 'c'], 2), ['b', 'c'])\ncheck('zero retains none', solve(['a'], 0), [])\ncheck('under capacity', solve(['a'], 3), ['a'])\ncheck('empty', solve([], 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-deque-reconstruction-retains-newest-suffix","generated_at":"2026-09-29T14:37:42.887775+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":"Construct a bounded deque from a sequence, retaining its newest suffix when the initial sequence exceeds capacity.","root_cause":"Keeping the prefix retains the oldest values instead of the newest.","sha256":"73800e18f20871d0589bf315d3f9db23c73314dd66de9e39a5997f333a3002ca","title":"Deque reconstruction retains newest suffix · 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":44.131,"exit_code":1,"observations":[{"actual":["b","c"],"check":"truncates left","expected":["b","c"],"passed":true},{"actual":["a"],"check":"zero retains none","expected":[],"passed":false},{"actual":["a"],"check":"under capacity","expected":["a"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"truncates left\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"zero retains none\", \"actual\": [\"a\"], \"expected\": [], \"passed\": false}, {\"check\": \"under capacity\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.005,"exit_code":1,"observations":[{"actual":["a","b"],"check":"truncates left","expected":["b","c"],"passed":false},{"actual":[],"check":"zero retains none","expected":[],"passed":true},{"actual":["a"],"check":"under capacity","expected":["a"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"truncates left\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"c\"], \"passed\": false}, {\"check\": \"zero retains none\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"under capacity\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.519,"exit_code":0,"observations":[{"actual":["b","c"],"check":"truncates left","expected":["b","c"],"passed":true},{"actual":[],"check":"zero retains none","expected":[],"passed":true},{"actual":["a"],"check":"under capacity","expected":["a"],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"truncates left\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"zero retains none\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"under capacity\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}