{"abstract":"Deque partition deduplicates accepted elements.","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-retain-multiplicity","id":"FA-46061","implementations":{"attempt":{"sha256":"9fe221bab43ae34e6af035b4704f0e40125bc43fbb1501822b0d58d7e70bb06b","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] if not allowed else list(dict.fromkeys(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\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":"d898d32ea332bde7475a3a80218bd2f7d80e1d92b8939a70061259ccfbc88b6d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items, allowed = x\n    yes = list(dict.fromkeys(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\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-retain-multiplicity","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 deduplicates accepted elements.","sha256":"6359ca1d28c4b650d98fca8a28aa94cf5cdfc9707f7ae14f7710758912ff3160","title":"Deque partition deduplicates accepted elements · 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":47.189,"exit_code":1,"observations":[{"actual":[[1,3,2,2],2,[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],2,[]],"check":"all accept","expected":[[1,2,1],3,[]],"passed":false},{"actual":[[],0,[]],"check":"empty","expected":[[],0,[]],"passed":true},{"actual":[[1,2,2,3],1,[2,2,3]],"check":"duplicate reject","expected":[[1,2,2,3],1,[2,2,3]],"passed":true},{"actual":[[3,1,2],2,[2]],"check":"accepted reversed values","expected":[[3,1,2],2,[2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"alternating\", \"actual\": [[1, 3, 2, 2], 2, [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], 2, []], \"expected\": [[1, 2, 1], 3, []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], 0, []], \"expected\": [[], 0, []], \"passed\": true}, {\"check\": \"duplicate reject\", \"actual\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"expected\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"passed\": true}, {\"check\": \"accepted reversed values\", \"actual\": [[3, 1, 2], 2, [2]], \"expected\": [[3, 1, 2], 2, [2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.886,"exit_code":1,"observations":[{"actual":[[1,3,2,2],2,[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],2,[]],"check":"all accept","expected":[[1,2,1],3,[]],"passed":false},{"actual":[[],0,[]],"check":"empty","expected":[[],0,[]],"passed":true},{"actual":[[1,2,2,3],1,[2,2,3]],"check":"duplicate reject","expected":[[1,2,2,3],1,[2,2,3]],"passed":true},{"actual":[[3,1,2],2,[2]],"check":"accepted reversed values","expected":[[3,1,2],2,[2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"alternating\", \"actual\": [[1, 3, 2, 2], 2, [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], 2, []], \"expected\": [[1, 2, 1], 3, []], \"passed\": false}, {\"check\": \"empty\", \"actual\": [[], 0, []], \"expected\": [[], 0, []], \"passed\": true}, {\"check\": \"duplicate reject\", \"actual\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"expected\": [[1, 2, 2, 3], 1, [2, 2, 3]], \"passed\": true}, {\"check\": \"accepted reversed values\", \"actual\": [[3, 1, 2], 2, [2]], \"expected\": [[3, 1, 2], 2, [2]], \"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."}}