{"abstract":"Deque directory uses each block length as an absolute end.","category":"Bounded deques","checks":6,"contract":"For nonempty, variable-size deque blocks, resolve a logical index into [block index, local offset, value, total size, predecessor value, successor value]. Null neighbors mark sequence endpoints. Directory is built from cumulative block lengths.","evaluation_group":"s3-bounded-deques-block-directory","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-block-directory-prefix-sum","id":"FA-45986","implementations":{"attempt":{"sha256":"0e00857506a322077e1d23f337a12d60aff61ce5ce12822cc0fa475cd16a566a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    blocks, index = x\n    ends = []\n    total = 0\n    for block in blocks:\n        total += len(block) if len(ends) < 1 else 0\n        ends.append(total)\n    b = next((i for i,end in enumerate(ends) if index < end), None)\n    if b is None: return 'invalid directory'\n    start = ends[b-1] if b else 0\n    local = index - start\n    value = blocks[b][local] if -len(blocks[b]) <= local < len(blocks[b]) else 'invalid offset'\n    flat = [v for block in blocks for v in block]\n    previous = flat[index-1] if index else None\n    following = flat[index+1] if index+1 < total else None\n    return [b,local,value,total,previous,following]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('second block first', solve([[[N,N+1],[N+2,N+3,N+4]],2]), [1,0,N+2,5,N+1,N+3])\ncheck('second block interior', solve([[[N],[N+1,N+2,N+3],[N+4]],2]), [1,1,N+2,5,N+1,N+3])\ncheck('first element', solve([[[N,N+1],[N+2]],0]), [0,0,N,3,None,N+1])\ncheck('last element', solve([[[N],[N+1],[N+2,N+3]],3]), [2,1,N+3,4,N+2,None])\ncheck('single value', solve([[[N]],0]), [0,0,N,1,None,None])\ncheck('third block head', solve([[[N,N+1],[N+2],[N+3,N+4]],3]), [2,0,N+3,5,N+2,N+4])\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":"f8f5bb955b412e1a314bddc882c2c4eafad56c1fe76c5f10196d1b1ad0e7780b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    blocks, index = x\n    ends = []\n    total = 0\n    for block in blocks:\n        total = len(block)\n        ends.append(total)\n    b = next((i for i,end in enumerate(ends) if index < end), None)\n    if b is None: return 'invalid directory'\n    start = ends[b-1] if b else 0\n    local = index - start\n    value = blocks[b][local] if -len(blocks[b]) <= local < len(blocks[b]) else 'invalid offset'\n    flat = [v for block in blocks for v in block]\n    previous = flat[index-1] if index else None\n    following = flat[index+1] if index+1 < total else None\n    return [b,local,value,total,previous,following]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('second block first', solve([[[N,N+1],[N+2,N+3,N+4]],2]), [1,0,N+2,5,N+1,N+3])\ncheck('second block interior', solve([[[N],[N+1,N+2,N+3],[N+4]],2]), [1,1,N+2,5,N+1,N+3])\ncheck('first element', solve([[[N,N+1],[N+2]],0]), [0,0,N,3,None,N+1])\ncheck('last element', solve([[[N],[N+1],[N+2,N+3]],3]), [2,1,N+3,4,N+2,None])\ncheck('single value', solve([[[N]],0]), [0,0,N,1,None,None])\ncheck('third block head', solve([[[N,N+1],[N+2],[N+3,N+4]],3]), [2,0,N+3,5,N+2,N+4])\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":"73d490a7aa291918a8fbc006c1725286face25151d2f8a2d3a7d5fe9a7ec6e20","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    blocks, index = x\n    ends = []\n    total = 0\n    for block in blocks:\n        total += len(block)\n        ends.append(total)\n    b = next((i for i,end in enumerate(ends) if index < end), None)\n    if b is None: return 'invalid directory'\n    start = ends[b-1] if b else 0\n    local = index - start\n    value = blocks[b][local] if -len(blocks[b]) <= local < len(blocks[b]) else 'invalid offset'\n    flat = [v for block in blocks for v in block]\n    previous = flat[index-1] if index else None\n    following = flat[index+1] if index+1 < total else None\n    return [b,local,value,total,previous,following]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('second block first', solve([[[N,N+1],[N+2,N+3,N+4]],2]), [1,0,N+2,5,N+1,N+3])\ncheck('second block interior', solve([[[N],[N+1,N+2,N+3],[N+4]],2]), [1,1,N+2,5,N+1,N+3])\ncheck('first element', solve([[[N,N+1],[N+2]],0]), [0,0,N,3,None,N+1])\ncheck('last element', solve([[[N],[N+1],[N+2,N+3]],3]), [2,1,N+3,4,N+2,None])\ncheck('single value', solve([[[N]],0]), [0,0,N,1,None,None])\ncheck('third block head', solve([[[N,N+1],[N+2],[N+3,N+4]],3]), [2,0,N+3,5,N+2,N+4])\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-directory-prefix-sum","generated_at":"2026-09-29T14:44:27.793679+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 prefix sum invariant in block-directory.","root_cause":"The directory lacks cumulative counts after the first block.","sha256":"5b7dd17773f6f9ed9ae5d455cbe7f726efa525febd7126a52eed691cb1056a78","title":"Deque directory uses each block length as an absolute end · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.967,"exit_code":1,"observations":[{"actual":"invalid directory","check":"second block first","expected":[1,0,3,5,2,4],"passed":false},{"actual":"invalid directory","check":"second block interior","expected":[1,1,3,5,2,4],"passed":false},{"actual":[0,0,1,2,null,2],"check":"first element","expected":[0,0,1,3,null,2],"passed":false},{"actual":"invalid directory","check":"last element","expected":[2,1,4,4,3,null],"passed":false},{"actual":[0,0,1,1,null,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":true},{"actual":"invalid directory","check":"third block head","expected":[2,0,4,5,3,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second block first\", \"actual\": \"invalid directory\", \"expected\": [1, 0, 3, 5, 2, 4], \"passed\": false}, {\"check\": \"second block interior\", \"actual\": \"invalid directory\", \"expected\": [1, 1, 3, 5, 2, 4], \"passed\": false}, {\"check\": \"first element\", \"actual\": [0, 0, 1, 2, null, 2], \"expected\": [0, 0, 1, 3, null, 2], \"passed\": false}, {\"check\": \"last element\", \"actual\": \"invalid directory\", \"expected\": [2, 1, 4, 4, 3, null], \"passed\": false}, {\"check\": \"single value\", \"actual\": [0, 0, 1, 1, null, null], \"expected\": [0, 0, 1, 1, null, null], \"passed\": true}, {\"check\": \"third block head\", \"actual\": \"invalid directory\", \"expected\": [2, 0, 4, 5, 3, 5], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.623,"exit_code":1,"observations":[{"actual":[1,0,3,3,2,null],"check":"second block first","expected":[1,0,3,5,2,4],"passed":false},{"actual":[1,1,3,1,2,null],"check":"second block interior","expected":[1,1,3,5,2,4],"passed":false},{"actual":[0,0,1,1,null,null],"check":"first element","expected":[0,0,1,3,null,2],"passed":false},{"actual":"invalid directory","check":"last element","expected":[2,1,4,4,3,null],"passed":false},{"actual":[0,0,1,1,null,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":true},{"actual":"invalid directory","check":"third block head","expected":[2,0,4,5,3,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second block first\", \"actual\": [1, 0, 3, 3, 2, null], \"expected\": [1, 0, 3, 5, 2, 4], \"passed\": false}, {\"check\": \"second block interior\", \"actual\": [1, 1, 3, 1, 2, null], \"expected\": [1, 1, 3, 5, 2, 4], \"passed\": false}, {\"check\": \"first element\", \"actual\": [0, 0, 1, 1, null, null], \"expected\": [0, 0, 1, 3, null, 2], \"passed\": false}, {\"check\": \"last element\", \"actual\": \"invalid directory\", \"expected\": [2, 1, 4, 4, 3, null], \"passed\": false}, {\"check\": \"single value\", \"actual\": [0, 0, 1, 1, null, null], \"expected\": [0, 0, 1, 1, null, null], \"passed\": true}, {\"check\": \"third block head\", \"actual\": \"invalid directory\", \"expected\": [2, 0, 4, 5, 3, 5], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":49.603,"exit_code":0,"observations":[{"actual":[1,0,3,5,2,4],"check":"second block first","expected":[1,0,3,5,2,4],"passed":true},{"actual":[1,1,3,5,2,4],"check":"second block interior","expected":[1,1,3,5,2,4],"passed":true},{"actual":[0,0,1,3,null,2],"check":"first element","expected":[0,0,1,3,null,2],"passed":true},{"actual":[2,1,4,4,3,null],"check":"last element","expected":[2,1,4,4,3,null],"passed":true},{"actual":[0,0,1,1,null,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":true},{"actual":[2,0,4,5,3,5],"check":"third block head","expected":[2,0,4,5,3,5],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second block first\", \"actual\": [1, 0, 3, 5, 2, 4], \"expected\": [1, 0, 3, 5, 2, 4], \"passed\": true}, {\"check\": \"second block interior\", \"actual\": [1, 1, 3, 5, 2, 4], \"expected\": [1, 1, 3, 5, 2, 4], \"passed\": true}, {\"check\": \"first element\", \"actual\": [0, 0, 1, 3, null, 2], \"expected\": [0, 0, 1, 3, null, 2], \"passed\": true}, {\"check\": \"last element\", \"actual\": [2, 1, 4, 4, 3, null], \"expected\": [2, 1, 4, 4, 3, null], \"passed\": true}, {\"check\": \"single value\", \"actual\": [0, 0, 1, 1, null, null], \"expected\": [0, 0, 1, 1, null, null], \"passed\": true}, {\"check\": \"third block head\", \"actual\": [2, 0, 4, 5, 3, 5], \"expected\": [2, 0, 4, 5, 3, 5], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}