{"abstract":"Deque partition puts rejected values before accepted values.","category":"Bounded deques","checks":6,"contract":"Stably partition a bounded deque into accepted and rejected values using an explicit set. Return the concatenation, split cursor, and rejected sequence.","contract_signature":"x","evaluation_group":"s3-bounded-deques-stable-partition","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-stable-partition-partition-concatenation","id":"FA-46071","implementations":{"attempt":{"sha256":"287d7b2ed3f96562dc9f3310c38bf6406e3b62fad1ae48e772da086bd513a527","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items, allowed = x\n    yes = [v for v in items if v in allowed]\n    no = [v for v in items if v not in allowed]\n    result = yes + no if not no else no + yes\n    boundary = len(yes)\n    return [result,boundary,no]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('alternating', solve([[N,N+1,N+2,N+1,N], [N,N+2]]), {1: [[1, 3, 1, 2, 2], 3, [2, 2]], 2: [[2, 4, 2, 3, 3], 3, [3, 3]], 3: [[3, 5, 3, 4, 4], 3, [4, 4]], 4: [[4, 6, 4, 5, 5], 3, [5, 5]], 5: [[5, 7, 5, 6, 6], 3, [6, 6]]}[N])\ncheck('all reject', solve([[N,N+1],[]]), {1: [[1, 2], 0, [1, 2]], 2: [[2, 3], 0, [2, 3]], 3: [[3, 4], 0, [3, 4]], 4: [[4, 5], 0, [4, 5]], 5: [[5, 6], 0, [5, 6]]}[N])\ncheck('all accept', solve([[N,N+1,N],[N,N+1]]), {1: [[1, 2, 1], 3, []], 2: [[2, 3, 2], 3, []], 3: [[3, 4, 3], 3, []], 4: [[4, 5, 4], 3, []], 5: [[5, 6, 5], 3, []]}[N])\ncheck('empty', solve([[],[N]]), {1: [[], 0, []], 2: [[], 0, []], 3: [[], 0, []], 4: [[], 0, []], 5: [[], 0, []]}[N])\ncheck('duplicate reject', solve([[N+1,N,N+1,N+2],[N]]), {1: [[1, 2, 2, 3], 1, [2, 2, 3]], 2: [[2, 3, 3, 4], 1, [3, 3, 4]], 3: [[3, 4, 4, 5], 1, [4, 4, 5]], 4: [[4, 5, 5, 6], 1, [5, 5, 6]], 5: [[5, 6, 6, 7], 1, [6, 6, 7]]}[N])\ncheck('accepted reversed values', solve([[N+2,N,N+1],[N,N+2]]), {1: [[3, 1, 2], 2, [2]], 2: [[4, 2, 3], 2, [3]], 3: [[5, 3, 4], 2, [4]], 4: [[6, 4, 5], 2, [5]], 5: [[7, 5, 6], 2, [6]]}[N])\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":"84d515f8c806bf472727768944ee83acd40fb64241a248919d930865280c7c58","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items, allowed = x\n    yes = [v for v in items if v in allowed]\n    no = [v for v in items if v not in allowed]\n    result = no + yes\n    boundary = len(yes)\n    return [result,boundary,no]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('alternating', solve([[N,N+1,N+2,N+1,N], [N,N+2]]), {1: [[1, 3, 1, 2, 2], 3, [2, 2]], 2: [[2, 4, 2, 3, 3], 3, [3, 3]], 3: [[3, 5, 3, 4, 4], 3, [4, 4]], 4: [[4, 6, 4, 5, 5], 3, [5, 5]], 5: [[5, 7, 5, 6, 6], 3, [6, 6]]}[N])\ncheck('all reject', solve([[N,N+1],[]]), {1: [[1, 2], 0, [1, 2]], 2: [[2, 3], 0, [2, 3]], 3: [[3, 4], 0, [3, 4]], 4: [[4, 5], 0, [4, 5]], 5: [[5, 6], 0, [5, 6]]}[N])\ncheck('all accept', solve([[N,N+1,N],[N,N+1]]), {1: [[1, 2, 1], 3, []], 2: [[2, 3, 2], 3, []], 3: [[3, 4, 3], 3, []], 4: [[4, 5, 4], 3, []], 5: [[5, 6, 5], 3, []]}[N])\ncheck('empty', solve([[],[N]]), {1: [[], 0, []], 2: [[], 0, []], 3: [[], 0, []], 4: [[], 0, []], 5: [[], 0, []]}[N])\ncheck('duplicate reject', solve([[N+1,N,N+1,N+2],[N]]), {1: [[1, 2, 2, 3], 1, [2, 2, 3]], 2: [[2, 3, 3, 4], 1, [3, 3, 4]], 3: [[3, 4, 4, 5], 1, [4, 4, 5]], 4: [[4, 5, 5, 6], 1, [5, 5, 6]], 5: [[5, 6, 6, 7], 1, [6, 6, 7]]}[N])\ncheck('accepted reversed values', solve([[N+2,N,N+1],[N,N+2]]), {1: [[3, 1, 2], 2, [2]], 2: [[4, 2, 3], 2, [3]], 3: [[5, 3, 4], 2, [4]], 4: [[6, 4, 5], 2, [5]], 5: [[7, 5, 6], 2, [6]]}[N])\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":"Offline finite deterministic model; no claim of production implementation or concurrent memory-model conformance. 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":"s3-bounded-deques-stable-partition-partition-concatenation","generated_at":"2026-09-29T14:44:28.592481+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Controlled bounded deque implementation model with explicit storage and lifecycle observations.","root_cause":"Deque partition puts rejected values before accepted values.","sha256":"8757cf7569bb4c8e83d4300efb4ff0b0b8e392b975e8accebe1f0b872b2fcef3","title":"Deque partition puts rejected values before accepted values · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":46.734,"exit_code":1,"observations":[{"actual":[[2,2,1,3,1],3,[2,2]],"check":"alternating","expected":[[1,3,1,2,2],3,[2,2]],"passed":false},{"actual":[[1,2],0,[1,2]],"check":"all reject","expected":[[1,2],0,[1,2]],"passed":true},{"actual":[[1,2,1],3,[]],"check":"all accept","expected":[[1,2,1],3,[]],"passed":true},{"actual":[[],0,[]],"check":"empty","expected":[[],0,[]],"passed":true},{"actual":[[2,2,3,1],1,[2,2,3]],"check":"duplicate reject","expected":[[1,2,2,3],1,[2,2,3]],"passed":false},{"actual":[[2,3,1],2,[2]],"check":"accepted reversed values","expected":[[3,1,2],2,[2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"alternating\", \"actual\": [[2, 2, 1, 3, 1], 3, [2, 2]], \"expected\": [[1, 3, 1, 2, 2], 3, [2, 2]], \"passed\": false}, {\"check\": \"all reject\", \"actual\": [[1, 2], 0, [1, 2]], \"expected\": [[1, 2], 0, [1, 2]], \"passed\": true}, {\"check\": \"all accept\", \"actual\": [[1, 2, 1], 3, []], \"expected\": [[1, 2, 1], 3, []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], 0, []], \"expected\": [[], 0, []], \"passed\": true}, {\"check\": \"duplicate reject\", \"actual\": [[2, 2, 3, 1], 1, [2, 2, 3]], \"expected\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"passed\": false}, {\"check\": \"accepted reversed values\", \"actual\": [[2, 3, 1], 2, [2]], \"expected\": [[3, 1, 2], 2, [2]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.466,"exit_code":1,"observations":[{"actual":[[2,2,1,3,1],3,[2,2]],"check":"alternating","expected":[[1,3,1,2,2],3,[2,2]],"passed":false},{"actual":[[1,2],0,[1,2]],"check":"all reject","expected":[[1,2],0,[1,2]],"passed":true},{"actual":[[1,2,1],3,[]],"check":"all accept","expected":[[1,2,1],3,[]],"passed":true},{"actual":[[],0,[]],"check":"empty","expected":[[],0,[]],"passed":true},{"actual":[[2,2,3,1],1,[2,2,3]],"check":"duplicate reject","expected":[[1,2,2,3],1,[2,2,3]],"passed":false},{"actual":[[2,3,1],2,[2]],"check":"accepted reversed values","expected":[[3,1,2],2,[2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"alternating\", \"actual\": [[2, 2, 1, 3, 1], 3, [2, 2]], \"expected\": [[1, 3, 1, 2, 2], 3, [2, 2]], \"passed\": false}, {\"check\": \"all reject\", \"actual\": [[1, 2], 0, [1, 2]], \"expected\": [[1, 2], 0, [1, 2]], \"passed\": true}, {\"check\": \"all accept\", \"actual\": [[1, 2, 1], 3, []], \"expected\": [[1, 2, 1], 3, []], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], 0, []], \"expected\": [[], 0, []], \"passed\": true}, {\"check\": \"duplicate reject\", \"actual\": [[2, 2, 3, 1], 1, [2, 2, 3]], \"expected\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"passed\": false}, {\"check\": \"accepted reversed values\", \"actual\": [[2, 3, 1], 2, [2]], \"expected\": [[3, 1, 2], 2, [2]], \"passed\": false}], \"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."}}