{"abstract":"Block lookup treats logical head as having a wrapped predecessor.","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-predecessor-boundary","id":"FA-46001","implementations":{"attempt":{"sha256":"842e45bc60b20efcba2847c0b8195e111dbb2c17cc04cd3d296b4647040b547d","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 len(flat)>1 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":"28ec8aeac0c9c5fbebbc02f0f7ff157494a67d3284e850485f4caae40b891e60","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]\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-predecessor-boundary","generated_at":"2026-09-29T14:44:27.835515+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 predecessor boundary invariant in block-directory.","root_cause":"Ring backing wrap leaks into the logical sequence neighbor contract.","sha256":"5101d4ee58b636d9a8c14d1205c60b12929fdc1ec7038b7b2556b83e39f6c5c4","title":"Block lookup treats logical head as having a wrapped predecessor · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.448,"exit_code":1,"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,3,2],"check":"first element","expected":[0,0,1,3,null,2],"passed":false},{"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":false,"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, 3, 2], \"expected\": [0, 0, 1, 3, null, 2], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":39.555,"exit_code":1,"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,3,2],"check":"first element","expected":[0,0,1,3,null,2],"passed":false},{"actual":[2,1,4,4,3,null],"check":"last element","expected":[2,1,4,4,3,null],"passed":true},{"actual":[0,0,1,1,1,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":false},{"actual":[2,0,4,5,3,5],"check":"third block head","expected":[2,0,4,5,3,5],"passed":true}],"passed":false,"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, 3, 2], \"expected\": [0, 0, 1, 3, null, 2], \"passed\": false}, {\"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, 1, null], \"expected\": [0, 0, 1, 1, null, null], \"passed\": false}, {\"check\": \"third block head\", \"actual\": [2, 0, 4, 5, 3, 5], \"expected\": [2, 0, 4, 5, 3, 5], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.003,"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"}