{"abstract":"The operation returns a result or retained state that violates this contract: Insert at a positional index only when the bounded deque has room; full deque returns false unchanged rather than evicting.","category":"Bounded deques","checks":4,"contract":"Insert at a positional index only when the bounded deque has room; full deque returns false unchanged rather than evicting. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-2cc2422c33af1760","failed_approach":"Mutating before reporting rejection leaves a partially applied insertion.","family":"xr-deque-insert-full-rejects-atomically","id":"FA-4781","implementations":{"attempt":{"sha256":"a3066745ecb9815b6ea184c4a60bc235b6e8171d37c5501dafd37db023948d50","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=list(x); a.insert(y[1],y[2]); return [len(x)<y[0],a[:y[0]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full insertion rejects', solve(['a', 'b'], [2, 0, 'c']), [False, ['a', 'b']])\ncheck('room inserts positional', solve(['a', 'b'], [3, 1, 'c']), [True, ['a', 'c', 'b']])\ncheck('zero capacity rejects', solve([], [0, 0, 'a']), [False, []])\ncheck('empty insertion', solve([], [1, 0, 'a']), [True, ['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":"c15475e9329a07eaf046da2f1eac3afb9d1f2ffdab9b5354637fa95fba871376","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[2]); return [True,list(a)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full insertion rejects', solve(['a', 'b'], [2, 0, 'c']), [False, ['a', 'b']])\ncheck('room inserts positional', solve(['a', 'b'], [3, 1, 'c']), [True, ['a', 'c', 'b']])\ncheck('zero capacity rejects', solve([], [0, 0, 'a']), [False, []])\ncheck('empty insertion', solve([], [1, 0, 'a']), [True, ['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":"fcb2bf7c4b31b55e35b0e253fcbb10d284ed1a455b537bbc64a94e04eb09016a","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]); ok=len(a)<y[0]\n    if ok: a.insert(y[1],y[2])\n    return [ok,list(a)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('full insertion rejects', solve(['a', 'b'], [2, 0, 'c']), [False, ['a', 'b']])\ncheck('room inserts positional', solve(['a', 'b'], [3, 1, 'c']), [True, ['a', 'c', 'b']])\ncheck('zero capacity rejects', solve([], [0, 0, 'a']), [False, []])\ncheck('empty insertion', solve([], [1, 0, 'a']), [True, ['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-insert-full-rejects-atomically","generated_at":"2026-09-29T14:37:42.844374+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":"Insert at a positional index only when the bounded deque has room; full deque returns false unchanged rather than evicting.","root_cause":"Using append introduces an eviction even though positional insertion must reject a full deque.","sha256":"5aa8fb05918a52c4852edeb4f2e330704d092cbd6225dc6605e94b4e83173b2b","title":"Deque insert full rejects atomically · 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":37.245,"exit_code":1,"observations":[{"actual":[false,["c","a"]],"check":"full insertion rejects","expected":[false,["a","b"]],"passed":false},{"actual":[true,["a","c","b"]],"check":"room inserts positional","expected":[true,["a","c","b"]],"passed":true},{"actual":[false,[]],"check":"zero capacity rejects","expected":[false,[]],"passed":true},{"actual":[true,["a"]],"check":"empty insertion","expected":[true,["a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full insertion rejects\", \"actual\": [false, [\"c\", \"a\"]], \"expected\": [false, [\"a\", \"b\"]], \"passed\": false}, {\"check\": \"room inserts positional\", \"actual\": [true, [\"a\", \"c\", \"b\"]], \"expected\": [true, [\"a\", \"c\", \"b\"]], \"passed\": true}, {\"check\": \"zero capacity rejects\", \"actual\": [false, []], \"expected\": [false, []], \"passed\": true}, {\"check\": \"empty insertion\", \"actual\": [true, [\"a\"]], \"expected\": [true, [\"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.344,"exit_code":1,"observations":[{"actual":[true,["b","c"]],"check":"full insertion rejects","expected":[false,["a","b"]],"passed":false},{"actual":[true,["a","b","c"]],"check":"room inserts positional","expected":[true,["a","c","b"]],"passed":false},{"actual":[true,[]],"check":"zero capacity rejects","expected":[false,[]],"passed":false},{"actual":[true,["a"]],"check":"empty insertion","expected":[true,["a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full insertion rejects\", \"actual\": [true, [\"b\", \"c\"]], \"expected\": [false, [\"a\", \"b\"]], \"passed\": false}, {\"check\": \"room inserts positional\", \"actual\": [true, [\"a\", \"b\", \"c\"]], \"expected\": [true, [\"a\", \"c\", \"b\"]], \"passed\": false}, {\"check\": \"zero capacity rejects\", \"actual\": [true, []], \"expected\": [false, []], \"passed\": false}, {\"check\": \"empty insertion\", \"actual\": [true, [\"a\"]], \"expected\": [true, [\"a\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.386,"exit_code":0,"observations":[{"actual":[false,["a","b"]],"check":"full insertion rejects","expected":[false,["a","b"]],"passed":true},{"actual":[true,["a","c","b"]],"check":"room inserts positional","expected":[true,["a","c","b"]],"passed":true},{"actual":[false,[]],"check":"zero capacity rejects","expected":[false,[]],"passed":true},{"actual":[true,["a"]],"check":"empty insertion","expected":[true,["a"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"full insertion rejects\", \"actual\": [false, [\"a\", \"b\"]], \"expected\": [false, [\"a\", \"b\"]], \"passed\": true}, {\"check\": \"room inserts positional\", \"actual\": [true, [\"a\", \"c\", \"b\"]], \"expected\": [true, [\"a\", \"c\", \"b\"]], \"passed\": true}, {\"check\": \"zero capacity rejects\", \"actual\": [false, []], \"expected\": [false, []], \"passed\": true}, {\"check\": \"empty insertion\", \"actual\": [true, [\"a\"]], \"expected\": [true, [\"a\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}