{"abstract":"Deque uniqueness prepends each first occurrence.","category":"Bounded deques","checks":6,"contract":"Keep the first occurrence of each deque payload and return survivor values plus original positions removed. Payload equality is integer equality; zero is a valid value.","evaluation_group":"s3-bounded-deques-stable-unique","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-stable-unique-first-stability","id":"FA-46346","implementations":{"attempt":{"sha256":"129eb099e1b754dcbe1d04c1589918e89ed458600da12aad7c8269588dc83dd7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items=x\n    seen=set()\n    keep=[]\n    removed=[]\n    for i,v in enumerate(items):\n        if v in seen:removed.append(i)\n        else:\n            keep.append(v) if not keep else keep.insert(0,v)\n            seen.add(v)\n    return [keep,removed]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([N,N+1,N,N+2,N+1]), {1: [[1, 2, 3], [2, 4]], 2: [[2, 3, 4], [2, 4]], 3: [[3, 4, 5], [2, 4]], 4: [[4, 5, 6], [2, 4]], 5: [[5, 6, 7], [2, 4]]}[N])\ncheck('1', solve([0,N,0,N]), {1: [[0, 1], [2, 3]], 2: [[0, 2], [2, 3]], 3: [[0, 3], [2, 3]], 4: [[0, 4], [2, 3]], 5: [[0, 5], [2, 3]]}[N])\ncheck('2', solve([N,N,N]), {1: [[1], [1, 2]], 2: [[2], [1, 2]], 3: [[3], [1, 2]], 4: [[4], [1, 2]], 5: [[5], [1, 2]]}[N])\ncheck('3', solve([]), {1: [[], []], 2: [[], []], 3: [[], []], 4: [[], []], 5: [[], []]}[N])\ncheck('4', solve([N,N+1,N+2]), {1: [[1, 2, 3], []], 2: [[2, 3, 4], []], 3: [[3, 4, 5], []], 4: [[4, 5, 6], []], 5: [[5, 6, 7], []]}[N])\ncheck('5', solve([N+2,N,N+2,N+1]), {1: [[3, 1, 2], [2]], 2: [[4, 2, 3], [2]], 3: [[5, 3, 4], [2]], 4: [[6, 4, 5], [2]], 5: [[7, 5, 6], [2]]}[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":"48551e792002cfe24c394b3c54bf9ab05afa5c664f02d22c8d0dca3a228a5d50","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items=x\n    seen=set()\n    keep=[]\n    removed=[]\n    for i,v in enumerate(items):\n        if v in seen:removed.append(i)\n        else:\n            keep.insert(0,v)\n            seen.add(v)\n    return [keep,removed]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([N,N+1,N,N+2,N+1]), {1: [[1, 2, 3], [2, 4]], 2: [[2, 3, 4], [2, 4]], 3: [[3, 4, 5], [2, 4]], 4: [[4, 5, 6], [2, 4]], 5: [[5, 6, 7], [2, 4]]}[N])\ncheck('1', solve([0,N,0,N]), {1: [[0, 1], [2, 3]], 2: [[0, 2], [2, 3]], 3: [[0, 3], [2, 3]], 4: [[0, 4], [2, 3]], 5: [[0, 5], [2, 3]]}[N])\ncheck('2', solve([N,N,N]), {1: [[1], [1, 2]], 2: [[2], [1, 2]], 3: [[3], [1, 2]], 4: [[4], [1, 2]], 5: [[5], [1, 2]]}[N])\ncheck('3', solve([]), {1: [[], []], 2: [[], []], 3: [[], []], 4: [[], []], 5: [[], []]}[N])\ncheck('4', solve([N,N+1,N+2]), {1: [[1, 2, 3], []], 2: [[2, 3, 4], []], 3: [[3, 4, 5], []], 4: [[4, 5, 6], []], 5: [[5, 6, 7], []]}[N])\ncheck('5', solve([N+2,N,N+2,N+1]), {1: [[3, 1, 2], [2]], 2: [[4, 2, 3], [2]], 3: [[5, 3, 4], [2]], 4: [[6, 4, 5], [2]], 5: [[7, 5, 6], [2]]}[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"},"fixed":{"sha256":"db55b9adbae1f45722eab54cffeb4ad620087c984ffa07e5cee2363925e8ad3c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items=x\n    seen=set()\n    keep=[]\n    removed=[]\n    for i,v in enumerate(items):\n        if v in seen:removed.append(i)\n        else:\n            keep.append(v)\n            seen.add(v)\n    return [keep,removed]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([N,N+1,N,N+2,N+1]), {1: [[1, 2, 3], [2, 4]], 2: [[2, 3, 4], [2, 4]], 3: [[3, 4, 5], [2, 4]], 4: [[4, 5, 6], [2, 4]], 5: [[5, 6, 7], [2, 4]]}[N])\ncheck('1', solve([0,N,0,N]), {1: [[0, 1], [2, 3]], 2: [[0, 2], [2, 3]], 3: [[0, 3], [2, 3]], 4: [[0, 4], [2, 3]], 5: [[0, 5], [2, 3]]}[N])\ncheck('2', solve([N,N,N]), {1: [[1], [1, 2]], 2: [[2], [1, 2]], 3: [[3], [1, 2]], 4: [[4], [1, 2]], 5: [[5], [1, 2]]}[N])\ncheck('3', solve([]), {1: [[], []], 2: [[], []], 3: [[], []], 4: [[], []], 5: [[], []]}[N])\ncheck('4', solve([N,N+1,N+2]), {1: [[1, 2, 3], []], 2: [[2, 3, 4], []], 3: [[3, 4, 5], []], 4: [[4, 5, 6], []], 5: [[5, 6, 7], []]}[N])\ncheck('5', solve([N+2,N,N+2,N+1]), {1: [[3, 1, 2], [2]], 2: [[4, 2, 3], [2]], 3: [[5, 3, 4], [2]], 4: [[6, 4, 5], [2]], 5: [[7, 5, 6], [2]]}[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-unique-first-stability","generated_at":"2026-09-29T14:44:31.183666+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.","repair":"Restore the documented first stability invariant in stable-unique.","root_cause":"Deque uniqueness prepends each first occurrence.","sha256":"f5f3284cbf9e8ea3711b777a192b785479317e7adef147de2d8f4c3aa32a71f5","title":"Deque uniqueness prepends each first occurrence · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.049,"exit_code":1,"observations":[{"actual":[[3,2,1],[2,4]],"check":"0","expected":[[1,2,3],[2,4]],"passed":false},{"actual":[[1,0],[2,3]],"check":"1","expected":[[0,1],[2,3]],"passed":false},{"actual":[[1],[1,2]],"check":"2","expected":[[1],[1,2]],"passed":true},{"actual":[[],[]],"check":"3","expected":[[],[]],"passed":true},{"actual":[[3,2,1],[]],"check":"4","expected":[[1,2,3],[]],"passed":false},{"actual":[[2,1,3],[2]],"check":"5","expected":[[3,1,2],[2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[3, 2, 1], [2, 4]], \"expected\": [[1, 2, 3], [2, 4]], \"passed\": false}, {\"check\": \"1\", \"actual\": [[1, 0], [2, 3]], \"expected\": [[0, 1], [2, 3]], \"passed\": false}, {\"check\": \"2\", \"actual\": [[1], [1, 2]], \"expected\": [[1], [1, 2]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"4\", \"actual\": [[3, 2, 1], []], \"expected\": [[1, 2, 3], []], \"passed\": false}, {\"check\": \"5\", \"actual\": [[2, 1, 3], [2]], \"expected\": [[3, 1, 2], [2]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.391,"exit_code":1,"observations":[{"actual":[[3,2,1],[2,4]],"check":"0","expected":[[1,2,3],[2,4]],"passed":false},{"actual":[[1,0],[2,3]],"check":"1","expected":[[0,1],[2,3]],"passed":false},{"actual":[[1],[1,2]],"check":"2","expected":[[1],[1,2]],"passed":true},{"actual":[[],[]],"check":"3","expected":[[],[]],"passed":true},{"actual":[[3,2,1],[]],"check":"4","expected":[[1,2,3],[]],"passed":false},{"actual":[[2,1,3],[2]],"check":"5","expected":[[3,1,2],[2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[3, 2, 1], [2, 4]], \"expected\": [[1, 2, 3], [2, 4]], \"passed\": false}, {\"check\": \"1\", \"actual\": [[1, 0], [2, 3]], \"expected\": [[0, 1], [2, 3]], \"passed\": false}, {\"check\": \"2\", \"actual\": [[1], [1, 2]], \"expected\": [[1], [1, 2]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"4\", \"actual\": [[3, 2, 1], []], \"expected\": [[1, 2, 3], []], \"passed\": false}, {\"check\": \"5\", \"actual\": [[2, 1, 3], [2]], \"expected\": [[3, 1, 2], [2]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.645,"exit_code":0,"observations":[{"actual":[[1,2,3],[2,4]],"check":"0","expected":[[1,2,3],[2,4]],"passed":true},{"actual":[[0,1],[2,3]],"check":"1","expected":[[0,1],[2,3]],"passed":true},{"actual":[[1],[1,2]],"check":"2","expected":[[1],[1,2]],"passed":true},{"actual":[[],[]],"check":"3","expected":[[],[]],"passed":true},{"actual":[[1,2,3],[]],"check":"4","expected":[[1,2,3],[]],"passed":true},{"actual":[[3,1,2],[2]],"check":"5","expected":[[3,1,2],[2]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2, 3], [2, 4]], \"expected\": [[1, 2, 3], [2, 4]], \"passed\": true}, {\"check\": \"1\", \"actual\": [[0, 1], [2, 3]], \"expected\": [[0, 1], [2, 3]], \"passed\": true}, {\"check\": \"2\", \"actual\": [[1], [1, 2]], \"expected\": [[1], [1, 2]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"4\", \"actual\": [[1, 2, 3], []], \"expected\": [[1, 2, 3], []], \"passed\": true}, {\"check\": \"5\", \"actual\": [[3, 1, 2], [2]], \"expected\": [[3, 1, 2], [2]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}