{"abstract":"Directory subtracts the current block end from its logical index.","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.","contract_signature":"x","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-block-start","id":"FA-45991","implementations":{"attempt":{"sha256":"12ddc5e611b983a3dd006e1c0b00812b83e2f9aa6277b1d5e5fbaf333c010731","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 < 2 else ends[b]\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":"96efa2c851dc5b21b5ec604e092a4c39b2aef80a7cb584d93eae89e3bbdf5f4b","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] 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-block-start","generated_at":"2026-09-29T14:44:27.892992+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":"Local indexing uses the wrong cumulative boundary.","sha256":"ae22a88525c0126b9b9a1afac89df2885d95aa0c482f03a7078ada5c5c8e766c","title":"Directory subtracts the current block end from its logical index · 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":42.552,"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,-3,"invalid offset",3,null,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":false},{"actual":[0,-1,1,1,null,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":false},{"actual":[2,-2,4,5,3,5],"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, 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, -3, \"invalid offset\", 3, null, 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\": false}, {\"check\": \"single value\", \"actual\": [0, -1, 1, 1, null, null], \"expected\": [0, 0, 1, 1, null, null], \"passed\": false}, {\"check\": \"third block head\", \"actual\": [2, -2, 4, 5, 3, 5], \"expected\": [2, 0, 4, 5, 3, 5], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.824,"exit_code":1,"observations":[{"actual":[1,-3,3,5,2,4],"check":"second block first","expected":[1,0,3,5,2,4],"passed":false},{"actual":[1,-2,3,5,2,4],"check":"second block interior","expected":[1,1,3,5,2,4],"passed":false},{"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":false},{"actual":[0,0,1,1,null,null],"check":"single value","expected":[0,0,1,1,null,null],"passed":true},{"actual":[2,-2,4,5,3,5],"check":"third block head","expected":[2,0,4,5,3,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"second block first\", \"actual\": [1, -3, 3, 5, 2, 4], \"expected\": [1, 0, 3, 5, 2, 4], \"passed\": false}, {\"check\": \"second block interior\", \"actual\": [1, -2, 3, 5, 2, 4], \"expected\": [1, 1, 3, 5, 2, 4], \"passed\": false}, {\"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\": 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\": [2, -2, 4, 5, 3, 5], \"expected\": [2, 0, 4, 5, 3, 5], \"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."}}