{"abstract":"Deque rebalance gives the left block the right identity.","category":"Bounded deques","checks":6,"contract":"Redistribute two adjacent deque blocks to a requested left occupancy without changing element order or block identities. Return signed left-to-right transfer count and new directory lengths.","evaluation_group":"s3-bounded-deques-block-rebalance","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-block-rebalance-left-id-stability","id":"FA-46866","implementations":{"attempt":{"sha256":"ee2c47ed4067e7c6cdd920fb2f53c54989c2c252c721d3c6b29711fcf1558d36","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,b,target,aid,bid=x\n    joined=a+b\n    left=joined[:target]\n    right=joined[target:]\n    left_id=aid if target==len(a) else bid\n    right_id=bid\n    transfer=len(a)-target\n    directory=[[left_id,len(left)],[right_id,len(right)]]\n    return [left,right,left_id,right_id,transfer,directory]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1,N+2],[N+3],2,3,8]), {1: [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], 2: [[2, 3], [4, 5], 3, 8, 1, [[3, 2], [8, 2]]], 3: [[3, 4], [5, 6], 3, 8, 1, [[3, 2], [8, 2]]], 4: [[4, 5], [6, 7], 3, 8, 1, [[3, 2], [8, 2]]], 5: [[5, 6], [7, 8], 3, 8, 1, [[3, 2], [8, 2]]]}[N])\ncheck('1', solve([[N],[N+1,N+2,N+3],3,4,9]), {1: [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], 2: [[2, 3, 4], [5], 4, 9, -2, [[4, 3], [9, 1]]], 3: [[3, 4, 5], [6], 4, 9, -2, [[4, 3], [9, 1]]], 4: [[4, 5, 6], [7], 4, 9, -2, [[4, 3], [9, 1]]], 5: [[5, 6, 7], [8], 4, 9, -2, [[4, 3], [9, 1]]]}[N])\ncheck('2', solve([[N,N+1],[N+2,N+3],2,5,10]), {1: [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], 2: [[2, 3], [4, 5], 5, 10, 0, [[5, 2], [10, 2]]], 3: [[3, 4], [5, 6], 5, 10, 0, [[5, 2], [10, 2]]], 4: [[4, 5], [6, 7], 5, 10, 0, [[5, 2], [10, 2]]], 5: [[5, 6], [7, 8], 5, 10, 0, [[5, 2], [10, 2]]]}[N])\ncheck('3', solve([[],[N,N+1],1,2,7]), {1: [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], 2: [[2], [3], 2, 7, -1, [[2, 1], [7, 1]]], 3: [[3], [4], 2, 7, -1, [[2, 1], [7, 1]]], 4: [[4], [5], 2, 7, -1, [[2, 1], [7, 1]]], 5: [[5], [6], 2, 7, -1, [[2, 1], [7, 1]]]}[N])\ncheck('4', solve([[N,N+1],[],0,4,6]), {1: [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], 2: [[], [2, 3], 4, 6, 2, [[4, 0], [6, 2]]], 3: [[], [3, 4], 4, 6, 2, [[4, 0], [6, 2]]], 4: [[], [4, 5], 4, 6, 2, [[4, 0], [6, 2]]], 5: [[], [5, 6], 4, 6, 2, [[4, 0], [6, 2]]]}[N])\ncheck('5', solve([[N],[N+1],2,1,5]), {1: [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], 2: [[2, 3], [], 1, 5, -1, [[1, 2], [5, 0]]], 3: [[3, 4], [], 1, 5, -1, [[1, 2], [5, 0]]], 4: [[4, 5], [], 1, 5, -1, [[1, 2], [5, 0]]], 5: [[5, 6], [], 1, 5, -1, [[1, 2], [5, 0]]]}[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":"2bee9dc94bee256521636b1701724c3a9cc2896940a23a0e452c1db99d0822d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,b,target,aid,bid=x\n    joined=a+b\n    left=joined[:target]\n    right=joined[target:]\n    left_id=bid\n    right_id=bid\n    transfer=len(a)-target\n    directory=[[left_id,len(left)],[right_id,len(right)]]\n    return [left,right,left_id,right_id,transfer,directory]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1,N+2],[N+3],2,3,8]), {1: [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], 2: [[2, 3], [4, 5], 3, 8, 1, [[3, 2], [8, 2]]], 3: [[3, 4], [5, 6], 3, 8, 1, [[3, 2], [8, 2]]], 4: [[4, 5], [6, 7], 3, 8, 1, [[3, 2], [8, 2]]], 5: [[5, 6], [7, 8], 3, 8, 1, [[3, 2], [8, 2]]]}[N])\ncheck('1', solve([[N],[N+1,N+2,N+3],3,4,9]), {1: [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], 2: [[2, 3, 4], [5], 4, 9, -2, [[4, 3], [9, 1]]], 3: [[3, 4, 5], [6], 4, 9, -2, [[4, 3], [9, 1]]], 4: [[4, 5, 6], [7], 4, 9, -2, [[4, 3], [9, 1]]], 5: [[5, 6, 7], [8], 4, 9, -2, [[4, 3], [9, 1]]]}[N])\ncheck('2', solve([[N,N+1],[N+2,N+3],2,5,10]), {1: [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], 2: [[2, 3], [4, 5], 5, 10, 0, [[5, 2], [10, 2]]], 3: [[3, 4], [5, 6], 5, 10, 0, [[5, 2], [10, 2]]], 4: [[4, 5], [6, 7], 5, 10, 0, [[5, 2], [10, 2]]], 5: [[5, 6], [7, 8], 5, 10, 0, [[5, 2], [10, 2]]]}[N])\ncheck('3', solve([[],[N,N+1],1,2,7]), {1: [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], 2: [[2], [3], 2, 7, -1, [[2, 1], [7, 1]]], 3: [[3], [4], 2, 7, -1, [[2, 1], [7, 1]]], 4: [[4], [5], 2, 7, -1, [[2, 1], [7, 1]]], 5: [[5], [6], 2, 7, -1, [[2, 1], [7, 1]]]}[N])\ncheck('4', solve([[N,N+1],[],0,4,6]), {1: [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], 2: [[], [2, 3], 4, 6, 2, [[4, 0], [6, 2]]], 3: [[], [3, 4], 4, 6, 2, [[4, 0], [6, 2]]], 4: [[], [4, 5], 4, 6, 2, [[4, 0], [6, 2]]], 5: [[], [5, 6], 4, 6, 2, [[4, 0], [6, 2]]]}[N])\ncheck('5', solve([[N],[N+1],2,1,5]), {1: [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], 2: [[2, 3], [], 1, 5, -1, [[1, 2], [5, 0]]], 3: [[3, 4], [], 1, 5, -1, [[1, 2], [5, 0]]], 4: [[4, 5], [], 1, 5, -1, [[1, 2], [5, 0]]], 5: [[5, 6], [], 1, 5, -1, [[1, 2], [5, 0]]]}[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":"11d0b7614a186d9f7d2caf833d429e69c852dffcab5bdba2b6c8814051bd71fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,b,target,aid,bid=x\n    joined=a+b\n    left=joined[:target]\n    right=joined[target:]\n    left_id=aid\n    right_id=bid\n    transfer=len(a)-target\n    directory=[[left_id,len(left)],[right_id,len(right)]]\n    return [left,right,left_id,right_id,transfer,directory]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1,N+2],[N+3],2,3,8]), {1: [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], 2: [[2, 3], [4, 5], 3, 8, 1, [[3, 2], [8, 2]]], 3: [[3, 4], [5, 6], 3, 8, 1, [[3, 2], [8, 2]]], 4: [[4, 5], [6, 7], 3, 8, 1, [[3, 2], [8, 2]]], 5: [[5, 6], [7, 8], 3, 8, 1, [[3, 2], [8, 2]]]}[N])\ncheck('1', solve([[N],[N+1,N+2,N+3],3,4,9]), {1: [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], 2: [[2, 3, 4], [5], 4, 9, -2, [[4, 3], [9, 1]]], 3: [[3, 4, 5], [6], 4, 9, -2, [[4, 3], [9, 1]]], 4: [[4, 5, 6], [7], 4, 9, -2, [[4, 3], [9, 1]]], 5: [[5, 6, 7], [8], 4, 9, -2, [[4, 3], [9, 1]]]}[N])\ncheck('2', solve([[N,N+1],[N+2,N+3],2,5,10]), {1: [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], 2: [[2, 3], [4, 5], 5, 10, 0, [[5, 2], [10, 2]]], 3: [[3, 4], [5, 6], 5, 10, 0, [[5, 2], [10, 2]]], 4: [[4, 5], [6, 7], 5, 10, 0, [[5, 2], [10, 2]]], 5: [[5, 6], [7, 8], 5, 10, 0, [[5, 2], [10, 2]]]}[N])\ncheck('3', solve([[],[N,N+1],1,2,7]), {1: [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], 2: [[2], [3], 2, 7, -1, [[2, 1], [7, 1]]], 3: [[3], [4], 2, 7, -1, [[2, 1], [7, 1]]], 4: [[4], [5], 2, 7, -1, [[2, 1], [7, 1]]], 5: [[5], [6], 2, 7, -1, [[2, 1], [7, 1]]]}[N])\ncheck('4', solve([[N,N+1],[],0,4,6]), {1: [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], 2: [[], [2, 3], 4, 6, 2, [[4, 0], [6, 2]]], 3: [[], [3, 4], 4, 6, 2, [[4, 0], [6, 2]]], 4: [[], [4, 5], 4, 6, 2, [[4, 0], [6, 2]]], 5: [[], [5, 6], 4, 6, 2, [[4, 0], [6, 2]]]}[N])\ncheck('5', solve([[N],[N+1],2,1,5]), {1: [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], 2: [[2, 3], [], 1, 5, -1, [[1, 2], [5, 0]]], 3: [[3, 4], [], 1, 5, -1, [[1, 2], [5, 0]]], 4: [[4, 5], [], 1, 5, -1, [[1, 2], [5, 0]]], 5: [[5, 6], [], 1, 5, -1, [[1, 2], [5, 0]]]}[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-block-rebalance-left-id-stability","generated_at":"2026-09-29T14:44:36.160707+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 left id stability invariant in block-rebalance.","root_cause":"Deque rebalance gives the left block the right identity.","sha256":"2eea07fe038f815c799aacd11139eeaf607dc3233b6be68f828a0078fa24fcb9","title":"Deque rebalance gives the left block the right identity · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.147,"exit_code":1,"observations":[{"actual":[[1,2],[3,4],8,8,1,[[8,2],[8,2]]],"check":"0","expected":[[1,2],[3,4],3,8,1,[[3,2],[8,2]]],"passed":false},{"actual":[[1,2,3],[4],9,9,-2,[[9,3],[9,1]]],"check":"1","expected":[[1,2,3],[4],4,9,-2,[[4,3],[9,1]]],"passed":false},{"actual":[[1,2],[3,4],5,10,0,[[5,2],[10,2]]],"check":"2","expected":[[1,2],[3,4],5,10,0,[[5,2],[10,2]]],"passed":true},{"actual":[[1],[2],7,7,-1,[[7,1],[7,1]]],"check":"3","expected":[[1],[2],2,7,-1,[[2,1],[7,1]]],"passed":false},{"actual":[[],[1,2],6,6,2,[[6,0],[6,2]]],"check":"4","expected":[[],[1,2],4,6,2,[[4,0],[6,2]]],"passed":false},{"actual":[[1,2],[],5,5,-1,[[5,2],[5,0]]],"check":"5","expected":[[1,2],[],1,5,-1,[[1,2],[5,0]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [3, 4], 8, 8, 1, [[8, 2], [8, 2]]], \"expected\": [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], \"passed\": false}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [4], 9, 9, -2, [[9, 3], [9, 1]]], \"expected\": [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], \"passed\": false}, {\"check\": \"2\", \"actual\": [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], \"expected\": [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1], [2], 7, 7, -1, [[7, 1], [7, 1]]], \"expected\": [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], \"passed\": false}, {\"check\": \"4\", \"actual\": [[], [1, 2], 6, 6, 2, [[6, 0], [6, 2]]], \"expected\": [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], \"passed\": false}, {\"check\": \"5\", \"actual\": [[1, 2], [], 5, 5, -1, [[5, 2], [5, 0]]], \"expected\": [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.179,"exit_code":1,"observations":[{"actual":[[1,2],[3,4],8,8,1,[[8,2],[8,2]]],"check":"0","expected":[[1,2],[3,4],3,8,1,[[3,2],[8,2]]],"passed":false},{"actual":[[1,2,3],[4],9,9,-2,[[9,3],[9,1]]],"check":"1","expected":[[1,2,3],[4],4,9,-2,[[4,3],[9,1]]],"passed":false},{"actual":[[1,2],[3,4],10,10,0,[[10,2],[10,2]]],"check":"2","expected":[[1,2],[3,4],5,10,0,[[5,2],[10,2]]],"passed":false},{"actual":[[1],[2],7,7,-1,[[7,1],[7,1]]],"check":"3","expected":[[1],[2],2,7,-1,[[2,1],[7,1]]],"passed":false},{"actual":[[],[1,2],6,6,2,[[6,0],[6,2]]],"check":"4","expected":[[],[1,2],4,6,2,[[4,0],[6,2]]],"passed":false},{"actual":[[1,2],[],5,5,-1,[[5,2],[5,0]]],"check":"5","expected":[[1,2],[],1,5,-1,[[1,2],[5,0]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [3, 4], 8, 8, 1, [[8, 2], [8, 2]]], \"expected\": [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], \"passed\": false}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [4], 9, 9, -2, [[9, 3], [9, 1]]], \"expected\": [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], \"passed\": false}, {\"check\": \"2\", \"actual\": [[1, 2], [3, 4], 10, 10, 0, [[10, 2], [10, 2]]], \"expected\": [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], \"passed\": false}, {\"check\": \"3\", \"actual\": [[1], [2], 7, 7, -1, [[7, 1], [7, 1]]], \"expected\": [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], \"passed\": false}, {\"check\": \"4\", \"actual\": [[], [1, 2], 6, 6, 2, [[6, 0], [6, 2]]], \"expected\": [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], \"passed\": false}, {\"check\": \"5\", \"actual\": [[1, 2], [], 5, 5, -1, [[5, 2], [5, 0]]], \"expected\": [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.352,"exit_code":0,"observations":[{"actual":[[1,2],[3,4],3,8,1,[[3,2],[8,2]]],"check":"0","expected":[[1,2],[3,4],3,8,1,[[3,2],[8,2]]],"passed":true},{"actual":[[1,2,3],[4],4,9,-2,[[4,3],[9,1]]],"check":"1","expected":[[1,2,3],[4],4,9,-2,[[4,3],[9,1]]],"passed":true},{"actual":[[1,2],[3,4],5,10,0,[[5,2],[10,2]]],"check":"2","expected":[[1,2],[3,4],5,10,0,[[5,2],[10,2]]],"passed":true},{"actual":[[1],[2],2,7,-1,[[2,1],[7,1]]],"check":"3","expected":[[1],[2],2,7,-1,[[2,1],[7,1]]],"passed":true},{"actual":[[],[1,2],4,6,2,[[4,0],[6,2]]],"check":"4","expected":[[],[1,2],4,6,2,[[4,0],[6,2]]],"passed":true},{"actual":[[1,2],[],1,5,-1,[[1,2],[5,0]]],"check":"5","expected":[[1,2],[],1,5,-1,[[1,2],[5,0]]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], \"expected\": [[1, 2], [3, 4], 3, 8, 1, [[3, 2], [8, 2]]], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], \"expected\": [[1, 2, 3], [4], 4, 9, -2, [[4, 3], [9, 1]]], \"passed\": true}, {\"check\": \"2\", \"actual\": [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], \"expected\": [[1, 2], [3, 4], 5, 10, 0, [[5, 2], [10, 2]]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], \"expected\": [[1], [2], 2, 7, -1, [[2, 1], [7, 1]]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], \"expected\": [[], [1, 2], 4, 6, 2, [[4, 0], [6, 2]]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], \"expected\": [[1, 2], [], 1, 5, -1, [[1, 2], [5, 0]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}