{"abstract":"Deque coalescing compares the first run instead of the last.","category":"Bounded deques","checks":6,"contract":"Coalesce adjacent equal deque payloads into [payload,run length] descriptors. Preserve non-adjacent equal runs and report cumulative exclusive run ends.","contract_signature":"x","evaluation_group":"s3-bounded-deques-adjacent-coalesce","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-adjacent-coalesce-adjacency","id":"FA-46086","implementations":{"attempt":{"sha256":"4afe32544f01b5bd3c36861a935fbbf55b27548ae3f4ab107365caf2bb2faa95","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items = x\n    runs = []\n    for value in items:\n        if runs and (runs[-1][0] if len(runs)<2 else runs[0][0]) == value:\n            runs[-1][1] += 1\n        else:\n            runs.append([value,1])\n    ends=[]\n    total=0\n    for value,count in runs:\n        total += count\n        ends.append(total)\n    return [runs,ends]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separate same values', solve([N,N,N+1,N,N]), {1: [[[1, 2], [2, 1], [1, 2]], [2, 3, 5]], 2: [[[2, 2], [3, 1], [2, 2]], [2, 3, 5]], 3: [[[3, 2], [4, 1], [3, 2]], [2, 3, 5]], 4: [[[4, 2], [5, 1], [4, 2]], [2, 3, 5]], 5: [[[5, 2], [6, 1], [5, 2]], [2, 3, 5]]}[N])\ncheck('single', solve([N]), {1: [[[1, 1]], [1]], 2: [[[2, 1]], [1]], 3: [[[3, 1]], [1]], 4: [[[4, 1]], [1]], 5: [[[5, 1]], [1]]}[N])\ncheck('empty', solve([]), {1: [[], []], 2: [[], []], 3: [[], []], 4: [[], []], 5: [[], []]}[N])\ncheck('all same', solve([N,N,N,N]), {1: [[[1, 4]], [4]], 2: [[[2, 4]], [4]], 3: [[[3, 4]], [4]], 4: [[[4, 4]], [4]], 5: [[[5, 4]], [4]]}[N])\ncheck('all different', solve([N,N+1,N+2]), {1: [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], 2: [[[2, 1], [3, 1], [4, 1]], [1, 2, 3]], 3: [[[3, 1], [4, 1], [5, 1]], [1, 2, 3]], 4: [[[4, 1], [5, 1], [6, 1]], [1, 2, 3]], 5: [[[5, 1], [6, 1], [7, 1]], [1, 2, 3]]}[N])\ncheck('unequal runs', solve([N,N,N+1,N+1,N+1,N+2]), {1: [[[1, 2], [2, 3], [3, 1]], [2, 5, 6]], 2: [[[2, 2], [3, 3], [4, 1]], [2, 5, 6]], 3: [[[3, 2], [4, 3], [5, 1]], [2, 5, 6]], 4: [[[4, 2], [5, 3], [6, 1]], [2, 5, 6]], 5: [[[5, 2], [6, 3], [7, 1]], [2, 5, 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":"567c84c3089dea5ad9aae862338561fd08c6ad0585052f78091dc2142650f04c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    items = x\n    runs = []\n    for value in items:\n        if runs and runs[0][0] == value:\n            runs[-1][1] += 1\n        else:\n            runs.append([value,1])\n    ends=[]\n    total=0\n    for value,count in runs:\n        total += count\n        ends.append(total)\n    return [runs,ends]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('separate same values', solve([N,N,N+1,N,N]), {1: [[[1, 2], [2, 1], [1, 2]], [2, 3, 5]], 2: [[[2, 2], [3, 1], [2, 2]], [2, 3, 5]], 3: [[[3, 2], [4, 1], [3, 2]], [2, 3, 5]], 4: [[[4, 2], [5, 1], [4, 2]], [2, 3, 5]], 5: [[[5, 2], [6, 1], [5, 2]], [2, 3, 5]]}[N])\ncheck('single', solve([N]), {1: [[[1, 1]], [1]], 2: [[[2, 1]], [1]], 3: [[[3, 1]], [1]], 4: [[[4, 1]], [1]], 5: [[[5, 1]], [1]]}[N])\ncheck('empty', solve([]), {1: [[], []], 2: [[], []], 3: [[], []], 4: [[], []], 5: [[], []]}[N])\ncheck('all same', solve([N,N,N,N]), {1: [[[1, 4]], [4]], 2: [[[2, 4]], [4]], 3: [[[3, 4]], [4]], 4: [[[4, 4]], [4]], 5: [[[5, 4]], [4]]}[N])\ncheck('all different', solve([N,N+1,N+2]), {1: [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], 2: [[[2, 1], [3, 1], [4, 1]], [1, 2, 3]], 3: [[[3, 1], [4, 1], [5, 1]], [1, 2, 3]], 4: [[[4, 1], [5, 1], [6, 1]], [1, 2, 3]], 5: [[[5, 1], [6, 1], [7, 1]], [1, 2, 3]]}[N])\ncheck('unequal runs', solve([N,N,N+1,N+1,N+1,N+2]), {1: [[[1, 2], [2, 3], [3, 1]], [2, 5, 6]], 2: [[[2, 2], [3, 3], [4, 1]], [2, 5, 6]], 3: [[[3, 2], [4, 3], [5, 1]], [2, 5, 6]], 4: [[[4, 2], [5, 3], [6, 1]], [2, 5, 6]], 5: [[[5, 2], [6, 3], [7, 1]], [2, 5, 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-adjacent-coalesce-adjacency","generated_at":"2026-09-29T14:44:28.940715+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 coalescing compares the first run instead of the last.","sha256":"23cacc52759dc1fa70e6542213804bc05a716c82b21c212e4588cc03e24f9fad","title":"Deque coalescing compares the first run instead of the last · 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":41.702,"exit_code":1,"observations":[{"actual":[[[1,2],[2,3]],[2,5]],"check":"separate same values","expected":[[[1,2],[2,1],[1,2]],[2,3,5]],"passed":false},{"actual":[[[1,1]],[1]],"check":"single","expected":[[[1,1]],[1]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[[[1,4]],[4]],"check":"all same","expected":[[[1,4]],[4]],"passed":true},{"actual":[[[1,1],[2,1],[3,1]],[1,2,3]],"check":"all different","expected":[[[1,1],[2,1],[3,1]],[1,2,3]],"passed":true},{"actual":[[[1,2],[2,1],[2,1],[2,1],[3,1]],[2,3,4,5,6]],"check":"unequal runs","expected":[[[1,2],[2,3],[3,1]],[2,5,6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separate same values\", \"actual\": [[[1, 2], [2, 3]], [2, 5]], \"expected\": [[[1, 2], [2, 1], [1, 2]], [2, 3, 5]], \"passed\": false}, {\"check\": \"single\", \"actual\": [[[1, 1]], [1]], \"expected\": [[[1, 1]], [1]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"all same\", \"actual\": [[[1, 4]], [4]], \"expected\": [[[1, 4]], [4]], \"passed\": true}, {\"check\": \"all different\", \"actual\": [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], \"expected\": [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], \"passed\": true}, {\"check\": \"unequal runs\", \"actual\": [[[1, 2], [2, 1], [2, 1], [2, 1], [3, 1]], [2, 3, 4, 5, 6]], \"expected\": [[[1, 2], [2, 3], [3, 1]], [2, 5, 6]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.627,"exit_code":1,"observations":[{"actual":[[[1,2],[2,3]],[2,5]],"check":"separate same values","expected":[[[1,2],[2,1],[1,2]],[2,3,5]],"passed":false},{"actual":[[[1,1]],[1]],"check":"single","expected":[[[1,1]],[1]],"passed":true},{"actual":[[],[]],"check":"empty","expected":[[],[]],"passed":true},{"actual":[[[1,4]],[4]],"check":"all same","expected":[[[1,4]],[4]],"passed":true},{"actual":[[[1,1],[2,1],[3,1]],[1,2,3]],"check":"all different","expected":[[[1,1],[2,1],[3,1]],[1,2,3]],"passed":true},{"actual":[[[1,2],[2,1],[2,1],[2,1],[3,1]],[2,3,4,5,6]],"check":"unequal runs","expected":[[[1,2],[2,3],[3,1]],[2,5,6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"separate same values\", \"actual\": [[[1, 2], [2, 3]], [2, 5]], \"expected\": [[[1, 2], [2, 1], [1, 2]], [2, 3, 5]], \"passed\": false}, {\"check\": \"single\", \"actual\": [[[1, 1]], [1]], \"expected\": [[[1, 1]], [1]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"all same\", \"actual\": [[[1, 4]], [4]], \"expected\": [[[1, 4]], [4]], \"passed\": true}, {\"check\": \"all different\", \"actual\": [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], \"expected\": [[[1, 1], [2, 1], [3, 1]], [1, 2, 3]], \"passed\": true}, {\"check\": \"unequal runs\", \"actual\": [[[1, 2], [2, 1], [2, 1], [2, 1], [3, 1]], [2, 3, 4, 5, 6]], \"expected\": [[[1, 2], [2, 3], [3, 1]], [2, 5, 6]], \"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."}}