{"abstract":"Detached deque write targets the head regardless of logical index.","category":"Bounded deques","checks":6,"contract":"Write one logical deque position under copy-on-write. Shared storage is detached, leaving the old view unchanged and decrementing its reference count. Exclusive storage keeps identity. Every write advances the value epoch.","evaluation_group":"s3-bounded-deques-cow-write","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-cow-write-write-index","id":"FA-46506","implementations":{"attempt":{"sha256":"d91421d3e594658649a6bb071ff1f92b879ea75713e4d4b7a9a755d35198b357","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,refs,index,value,identity,fresh,epoch=x\n    shared=refs>1\n    new=a[:]\n    new[index if len(a)<3 else 0]=value\n    old=a[:] if shared else new[:]\n    old_refs=refs-1 if shared else 1\n    new_refs=1\n    new_id=fresh if shared else identity\n    next_id=fresh+1 if shared else fresh\n    return [old,new,old_refs,new_refs,new_id,next_id,epoch+1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1],2,0,N+3,4,8,0]), {1: [[1, 2], [4, 2], 1, 1, 8, 9, 1], 2: [[2, 3], [5, 3], 1, 1, 8, 9, 1], 3: [[3, 4], [6, 4], 1, 1, 8, 9, 1], 4: [[4, 5], [7, 5], 1, 1, 8, 9, 1], 5: [[5, 6], [8, 6], 1, 1, 8, 9, 1]}[N])\ncheck('1', solve([[N,N+1,N+2],3,1,N+4,5,9,2]), {1: [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], 2: [[2, 3, 4], [2, 6, 4], 2, 1, 9, 10, 3], 3: [[3, 4, 5], [3, 7, 5], 2, 1, 9, 10, 3], 4: [[4, 5, 6], [4, 8, 6], 2, 1, 9, 10, 3], 5: [[5, 6, 7], [5, 9, 7], 2, 1, 9, 10, 3]}[N])\ncheck('2', solve([[N],1,0,N+1,2,3,5]), {1: [[2], [2], 1, 1, 2, 3, 6], 2: [[3], [3], 1, 1, 2, 3, 6], 3: [[4], [4], 1, 1, 2, 3, 6], 4: [[5], [5], 1, 1, 2, 3, 6], 5: [[6], [6], 1, 1, 2, 3, 6]}[N])\ncheck('3', solve([[N,N+1],1,1,N+4,6,8,1]), {1: [[1, 5], [1, 5], 1, 1, 6, 8, 2], 2: [[2, 6], [2, 6], 1, 1, 6, 8, 2], 3: [[3, 7], [3, 7], 1, 1, 6, 8, 2], 4: [[4, 8], [4, 8], 1, 1, 6, 8, 2], 5: [[5, 9], [5, 9], 1, 1, 6, 8, 2]}[N])\ncheck('4', solve([[N,N+1,N+2],4,2,N+5,3,10,8]), {1: [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], 2: [[2, 3, 4], [2, 3, 7], 3, 1, 10, 11, 9], 3: [[3, 4, 5], [3, 4, 8], 3, 1, 10, 11, 9], 4: [[4, 5, 6], [4, 5, 9], 3, 1, 10, 11, 9], 5: [[5, 6, 7], [5, 6, 10], 3, 1, 10, 11, 9]}[N])\ncheck('5', solve([[N,N+1],2,1,N,1,7,4]), {1: [[1, 2], [1, 1], 1, 1, 7, 8, 5], 2: [[2, 3], [2, 2], 1, 1, 7, 8, 5], 3: [[3, 4], [3, 3], 1, 1, 7, 8, 5], 4: [[4, 5], [4, 4], 1, 1, 7, 8, 5], 5: [[5, 6], [5, 5], 1, 1, 7, 8, 5]}[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":"d37a47b95a54e5dc21e21c5ccf4fec2b9bd5529c234c7c46572ac77104daf2fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,refs,index,value,identity,fresh,epoch=x\n    shared=refs>1\n    new=a[:]\n    new[0]=value\n    old=a[:] if shared else new[:]\n    old_refs=refs-1 if shared else 1\n    new_refs=1\n    new_id=fresh if shared else identity\n    next_id=fresh+1 if shared else fresh\n    return [old,new,old_refs,new_refs,new_id,next_id,epoch+1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1],2,0,N+3,4,8,0]), {1: [[1, 2], [4, 2], 1, 1, 8, 9, 1], 2: [[2, 3], [5, 3], 1, 1, 8, 9, 1], 3: [[3, 4], [6, 4], 1, 1, 8, 9, 1], 4: [[4, 5], [7, 5], 1, 1, 8, 9, 1], 5: [[5, 6], [8, 6], 1, 1, 8, 9, 1]}[N])\ncheck('1', solve([[N,N+1,N+2],3,1,N+4,5,9,2]), {1: [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], 2: [[2, 3, 4], [2, 6, 4], 2, 1, 9, 10, 3], 3: [[3, 4, 5], [3, 7, 5], 2, 1, 9, 10, 3], 4: [[4, 5, 6], [4, 8, 6], 2, 1, 9, 10, 3], 5: [[5, 6, 7], [5, 9, 7], 2, 1, 9, 10, 3]}[N])\ncheck('2', solve([[N],1,0,N+1,2,3,5]), {1: [[2], [2], 1, 1, 2, 3, 6], 2: [[3], [3], 1, 1, 2, 3, 6], 3: [[4], [4], 1, 1, 2, 3, 6], 4: [[5], [5], 1, 1, 2, 3, 6], 5: [[6], [6], 1, 1, 2, 3, 6]}[N])\ncheck('3', solve([[N,N+1],1,1,N+4,6,8,1]), {1: [[1, 5], [1, 5], 1, 1, 6, 8, 2], 2: [[2, 6], [2, 6], 1, 1, 6, 8, 2], 3: [[3, 7], [3, 7], 1, 1, 6, 8, 2], 4: [[4, 8], [4, 8], 1, 1, 6, 8, 2], 5: [[5, 9], [5, 9], 1, 1, 6, 8, 2]}[N])\ncheck('4', solve([[N,N+1,N+2],4,2,N+5,3,10,8]), {1: [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], 2: [[2, 3, 4], [2, 3, 7], 3, 1, 10, 11, 9], 3: [[3, 4, 5], [3, 4, 8], 3, 1, 10, 11, 9], 4: [[4, 5, 6], [4, 5, 9], 3, 1, 10, 11, 9], 5: [[5, 6, 7], [5, 6, 10], 3, 1, 10, 11, 9]}[N])\ncheck('5', solve([[N,N+1],2,1,N,1,7,4]), {1: [[1, 2], [1, 1], 1, 1, 7, 8, 5], 2: [[2, 3], [2, 2], 1, 1, 7, 8, 5], 3: [[3, 4], [3, 3], 1, 1, 7, 8, 5], 4: [[4, 5], [4, 4], 1, 1, 7, 8, 5], 5: [[5, 6], [5, 5], 1, 1, 7, 8, 5]}[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":"dac3ec1c9ff54112bb93b63790b0907005df142a078f69c83e507774417c0db6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,refs,index,value,identity,fresh,epoch=x\n    shared=refs>1\n    new=a[:]\n    new[index]=value\n    old=a[:] if shared else new[:]\n    old_refs=refs-1 if shared else 1\n    new_refs=1\n    new_id=fresh if shared else identity\n    next_id=fresh+1 if shared else fresh\n    return [old,new,old_refs,new_refs,new_id,next_id,epoch+1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N,N+1],2,0,N+3,4,8,0]), {1: [[1, 2], [4, 2], 1, 1, 8, 9, 1], 2: [[2, 3], [5, 3], 1, 1, 8, 9, 1], 3: [[3, 4], [6, 4], 1, 1, 8, 9, 1], 4: [[4, 5], [7, 5], 1, 1, 8, 9, 1], 5: [[5, 6], [8, 6], 1, 1, 8, 9, 1]}[N])\ncheck('1', solve([[N,N+1,N+2],3,1,N+4,5,9,2]), {1: [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], 2: [[2, 3, 4], [2, 6, 4], 2, 1, 9, 10, 3], 3: [[3, 4, 5], [3, 7, 5], 2, 1, 9, 10, 3], 4: [[4, 5, 6], [4, 8, 6], 2, 1, 9, 10, 3], 5: [[5, 6, 7], [5, 9, 7], 2, 1, 9, 10, 3]}[N])\ncheck('2', solve([[N],1,0,N+1,2,3,5]), {1: [[2], [2], 1, 1, 2, 3, 6], 2: [[3], [3], 1, 1, 2, 3, 6], 3: [[4], [4], 1, 1, 2, 3, 6], 4: [[5], [5], 1, 1, 2, 3, 6], 5: [[6], [6], 1, 1, 2, 3, 6]}[N])\ncheck('3', solve([[N,N+1],1,1,N+4,6,8,1]), {1: [[1, 5], [1, 5], 1, 1, 6, 8, 2], 2: [[2, 6], [2, 6], 1, 1, 6, 8, 2], 3: [[3, 7], [3, 7], 1, 1, 6, 8, 2], 4: [[4, 8], [4, 8], 1, 1, 6, 8, 2], 5: [[5, 9], [5, 9], 1, 1, 6, 8, 2]}[N])\ncheck('4', solve([[N,N+1,N+2],4,2,N+5,3,10,8]), {1: [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], 2: [[2, 3, 4], [2, 3, 7], 3, 1, 10, 11, 9], 3: [[3, 4, 5], [3, 4, 8], 3, 1, 10, 11, 9], 4: [[4, 5, 6], [4, 5, 9], 3, 1, 10, 11, 9], 5: [[5, 6, 7], [5, 6, 10], 3, 1, 10, 11, 9]}[N])\ncheck('5', solve([[N,N+1],2,1,N,1,7,4]), {1: [[1, 2], [1, 1], 1, 1, 7, 8, 5], 2: [[2, 3], [2, 2], 1, 1, 7, 8, 5], 3: [[3, 4], [3, 3], 1, 1, 7, 8, 5], 4: [[4, 5], [4, 4], 1, 1, 7, 8, 5], 5: [[5, 6], [5, 5], 1, 1, 7, 8, 5]}[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-cow-write-write-index","generated_at":"2026-09-29T14:44:32.635334+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 write index invariant in cow-write.","root_cause":"Detached deque write targets the head regardless of logical index.","sha256":"1f21db5b203cc30e429b233193cda2c31793d691d84809a28dcf93e2c79e948b","title":"Detached deque write targets the head regardless of logical index · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.995,"exit_code":1,"observations":[{"actual":[[1,2],[4,2],1,1,8,9,1],"check":"0","expected":[[1,2],[4,2],1,1,8,9,1],"passed":true},{"actual":[[1,2,3],[5,2,3],2,1,9,10,3],"check":"1","expected":[[1,2,3],[1,5,3],2,1,9,10,3],"passed":false},{"actual":[[2],[2],1,1,2,3,6],"check":"2","expected":[[2],[2],1,1,2,3,6],"passed":true},{"actual":[[1,5],[1,5],1,1,6,8,2],"check":"3","expected":[[1,5],[1,5],1,1,6,8,2],"passed":true},{"actual":[[1,2,3],[6,2,3],3,1,10,11,9],"check":"4","expected":[[1,2,3],[1,2,6],3,1,10,11,9],"passed":false},{"actual":[[1,2],[1,1],1,1,7,8,5],"check":"5","expected":[[1,2],[1,1],1,1,7,8,5],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"expected\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [5, 2, 3], 2, 1, 9, 10, 3], \"expected\": [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], \"passed\": false}, {\"check\": \"2\", \"actual\": [[2], [2], 1, 1, 2, 3, 6], \"expected\": [[2], [2], 1, 1, 2, 3, 6], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1, 5], [1, 5], 1, 1, 6, 8, 2], \"expected\": [[1, 5], [1, 5], 1, 1, 6, 8, 2], \"passed\": true}, {\"check\": \"4\", \"actual\": [[1, 2, 3], [6, 2, 3], 3, 1, 10, 11, 9], \"expected\": [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], \"passed\": false}, {\"check\": \"5\", \"actual\": [[1, 2], [1, 1], 1, 1, 7, 8, 5], \"expected\": [[1, 2], [1, 1], 1, 1, 7, 8, 5], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.756,"exit_code":1,"observations":[{"actual":[[1,2],[4,2],1,1,8,9,1],"check":"0","expected":[[1,2],[4,2],1,1,8,9,1],"passed":true},{"actual":[[1,2,3],[5,2,3],2,1,9,10,3],"check":"1","expected":[[1,2,3],[1,5,3],2,1,9,10,3],"passed":false},{"actual":[[2],[2],1,1,2,3,6],"check":"2","expected":[[2],[2],1,1,2,3,6],"passed":true},{"actual":[[5,2],[5,2],1,1,6,8,2],"check":"3","expected":[[1,5],[1,5],1,1,6,8,2],"passed":false},{"actual":[[1,2,3],[6,2,3],3,1,10,11,9],"check":"4","expected":[[1,2,3],[1,2,6],3,1,10,11,9],"passed":false},{"actual":[[1,2],[1,2],1,1,7,8,5],"check":"5","expected":[[1,2],[1,1],1,1,7,8,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"expected\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [5, 2, 3], 2, 1, 9, 10, 3], \"expected\": [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], \"passed\": false}, {\"check\": \"2\", \"actual\": [[2], [2], 1, 1, 2, 3, 6], \"expected\": [[2], [2], 1, 1, 2, 3, 6], \"passed\": true}, {\"check\": \"3\", \"actual\": [[5, 2], [5, 2], 1, 1, 6, 8, 2], \"expected\": [[1, 5], [1, 5], 1, 1, 6, 8, 2], \"passed\": false}, {\"check\": \"4\", \"actual\": [[1, 2, 3], [6, 2, 3], 3, 1, 10, 11, 9], \"expected\": [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], \"passed\": false}, {\"check\": \"5\", \"actual\": [[1, 2], [1, 2], 1, 1, 7, 8, 5], \"expected\": [[1, 2], [1, 1], 1, 1, 7, 8, 5], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.245,"exit_code":0,"observations":[{"actual":[[1,2],[4,2],1,1,8,9,1],"check":"0","expected":[[1,2],[4,2],1,1,8,9,1],"passed":true},{"actual":[[1,2,3],[1,5,3],2,1,9,10,3],"check":"1","expected":[[1,2,3],[1,5,3],2,1,9,10,3],"passed":true},{"actual":[[2],[2],1,1,2,3,6],"check":"2","expected":[[2],[2],1,1,2,3,6],"passed":true},{"actual":[[1,5],[1,5],1,1,6,8,2],"check":"3","expected":[[1,5],[1,5],1,1,6,8,2],"passed":true},{"actual":[[1,2,3],[1,2,6],3,1,10,11,9],"check":"4","expected":[[1,2,3],[1,2,6],3,1,10,11,9],"passed":true},{"actual":[[1,2],[1,1],1,1,7,8,5],"check":"5","expected":[[1,2],[1,1],1,1,7,8,5],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"expected\": [[1, 2], [4, 2], 1, 1, 8, 9, 1], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], \"expected\": [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], \"passed\": true}, {\"check\": \"2\", \"actual\": [[2], [2], 1, 1, 2, 3, 6], \"expected\": [[2], [2], 1, 1, 2, 3, 6], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1, 5], [1, 5], 1, 1, 6, 8, 2], \"expected\": [[1, 5], [1, 5], 1, 1, 6, 8, 2], \"passed\": true}, {\"check\": \"4\", \"actual\": [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], \"expected\": [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], \"passed\": true}, {\"check\": \"5\", \"actual\": [[1, 2], [1, 1], 1, 1, 7, 8, 5], \"expected\": [[1, 2], [1, 1], 1, 1, 7, 8, 5], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}