{"abstract":"The operation returns a result or retained state that violates this contract: Prepend to a bounded deque and evict from the right on overflow.","category":"Bounded deques","checks":4,"contract":"Prepend to a bounded deque and evict from the right on overflow. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","contract_signature":"x, y=None","evaluation_group":"model-4ae0d67473cb8ceb","failed_approach":"Keeping the suffix evicts the newly prepended side.","family":"xr-bounded-deque-appendleft-evicts-right","id":"FA-4766","implementations":{"attempt":{"sha256":"c357f5de3582a155f5391559d3572e9e06f416f5ae8a5c9c84da18be65f9cc3b","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 ([y[1]]+list(x))[-y[0]:] if y[0] else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full evicts right', solve(['a', 'b'], [2, 'c']), ['c', 'a'])\ncheck('zero capacity', solve([], [0, 'a']), [])\ncheck('room remains', solve(['a'], [3, 'b']), ['b', 'a'])\ncheck('empty accepts', solve([], [2, 'a']), ['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":"0c628576a54fed92cf39e9d3b6dbe6ebe42d2441c9ac0cfcb80d672de376af1f","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.append(y[1]); return list(a)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full evicts right', solve(['a', 'b'], [2, 'c']), ['c', 'a'])\ncheck('zero capacity', solve([], [0, 'a']), [])\ncheck('room remains', solve(['a'], [3, 'b']), ['b', 'a'])\ncheck('empty accepts', solve([], [2, 'a']), ['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-bounded-deque-appendleft-evicts-right","generated_at":"2026-09-29T14:37:42.683713+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":"Appending at the opposite end reverses both insertion and eviction policy.","sha256":"7f99fda26c9c4f36f0fd67d0e6db51520b7cf7c2099b7310280b053c724401c3","title":"Bounded deque appendleft evicts right · 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.311,"exit_code":1,"observations":[{"actual":["a","b"],"check":"full evicts right","expected":["c","a"],"passed":false},{"actual":[],"check":"zero capacity","expected":[],"passed":true},{"actual":["b","a"],"check":"room remains","expected":["b","a"],"passed":true},{"actual":["a"],"check":"empty accepts","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full evicts right\", \"actual\": [\"a\", \"b\"], \"expected\": [\"c\", \"a\"], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"room remains\", \"actual\": [\"b\", \"a\"], \"expected\": [\"b\", \"a\"], \"passed\": true}, {\"check\": \"empty accepts\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.304,"exit_code":1,"observations":[{"actual":["b","c"],"check":"full evicts right","expected":["c","a"],"passed":false},{"actual":[],"check":"zero capacity","expected":[],"passed":true},{"actual":["a","b"],"check":"room remains","expected":["b","a"],"passed":false},{"actual":["a"],"check":"empty accepts","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full evicts right\", \"actual\": [\"b\", \"c\"], \"expected\": [\"c\", \"a\"], \"passed\": false}, {\"check\": \"zero capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"room remains\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\", \"a\"], \"passed\": false}, {\"check\": \"empty accepts\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"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."}}