{"abstract":"Reservation reuses the first span as the wrapped span.","category":"Bounded deques","checks":6,"contract":"Reserve up to requested free positions in a reject-on-full ring. Return [grant,tail,first-span,second-span,free-after]. Head and size are valid, capacity positive.","contract_signature":"x","evaluation_group":"s3-bounded-deques-ring-reservation","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-ring-reservation-second-span","id":"FA-45861","implementations":{"attempt":{"sha256":"e159171fb325cf4633fc579b3e4f34c79fd5582183437e2e3e42c8c2a84f8d8c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cap, head, size, requested = x\n    free = cap - size\n    grant = min(requested, free)\n    tail = (head + size) % cap\n    first = min(grant, cap - tail)\n    second = 0 if first == grant else first\n    return [grant, tail, first, second, free - grant]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('wrapped free region', solve([N+5, N+3, 1, 3]), [3,N+4,1,2,N+1])\ncheck('limited free space', solve([N+5, 2, N+3, 4]), [2,0,2,0,0])\ncheck('empty shifted ring', solve([N+5,N+4,0,4]), [4,N+4,1,3,N+1])\ncheck('empty request', solve([N+5,1,2,0]), [0,3,0,0,N+3])\ncheck('full ring', solve([N+5,2,N+5,3]), [0,2,0,0,0])\ncheck('contiguous grant', solve([N+5,0,1,2]), [2,1,2,0,N+2])\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":"8f9028d64ad88820ed8f20878744406dc0dc1778243d3c8ba522f027d1020ac6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cap, head, size, requested = x\n    free = cap - size\n    grant = min(requested, free)\n    tail = (head + size) % cap\n    first = min(grant, cap - tail)\n    second = first\n    return [grant, tail, first, second, free - grant]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('wrapped free region', solve([N+5, N+3, 1, 3]), [3,N+4,1,2,N+1])\ncheck('limited free space', solve([N+5, 2, N+3, 4]), [2,0,2,0,0])\ncheck('empty shifted ring', solve([N+5,N+4,0,4]), [4,N+4,1,3,N+1])\ncheck('empty request', solve([N+5,1,2,0]), [0,3,0,0,N+3])\ncheck('full ring', solve([N+5,2,N+5,3]), [0,2,0,0,0])\ncheck('contiguous grant', solve([N+5,0,1,2]), [2,1,2,0,N+2])\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-ring-reservation-second-span","generated_at":"2026-09-29T14:44:26.449006+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":"Wrapped remainder is confused with the already assigned contiguous count.","sha256":"dcf9d781ff07b70a7ec417c7f3f07a1a0653e135ac5986fec10ba5639f7978a7","title":"Reservation reuses the first span as the wrapped span · 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":40.785,"exit_code":1,"observations":[{"actual":[3,5,1,1,2],"check":"wrapped free region","expected":[3,5,1,2,2],"passed":false},{"actual":[2,0,2,0,0],"check":"limited free space","expected":[2,0,2,0,0],"passed":true},{"actual":[4,5,1,1,2],"check":"empty shifted ring","expected":[4,5,1,3,2],"passed":false},{"actual":[0,3,0,0,4],"check":"empty request","expected":[0,3,0,0,4],"passed":true},{"actual":[0,2,0,0,0],"check":"full ring","expected":[0,2,0,0,0],"passed":true},{"actual":[2,1,2,0,3],"check":"contiguous grant","expected":[2,1,2,0,3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"wrapped free region\", \"actual\": [3, 5, 1, 1, 2], \"expected\": [3, 5, 1, 2, 2], \"passed\": false}, {\"check\": \"limited free space\", \"actual\": [2, 0, 2, 0, 0], \"expected\": [2, 0, 2, 0, 0], \"passed\": true}, {\"check\": \"empty shifted ring\", \"actual\": [4, 5, 1, 1, 2], \"expected\": [4, 5, 1, 3, 2], \"passed\": false}, {\"check\": \"empty request\", \"actual\": [0, 3, 0, 0, 4], \"expected\": [0, 3, 0, 0, 4], \"passed\": true}, {\"check\": \"full ring\", \"actual\": [0, 2, 0, 0, 0], \"expected\": [0, 2, 0, 0, 0], \"passed\": true}, {\"check\": \"contiguous grant\", \"actual\": [2, 1, 2, 0, 3], \"expected\": [2, 1, 2, 0, 3], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.329,"exit_code":1,"observations":[{"actual":[3,5,1,1,2],"check":"wrapped free region","expected":[3,5,1,2,2],"passed":false},{"actual":[2,0,2,2,0],"check":"limited free space","expected":[2,0,2,0,0],"passed":false},{"actual":[4,5,1,1,2],"check":"empty shifted ring","expected":[4,5,1,3,2],"passed":false},{"actual":[0,3,0,0,4],"check":"empty request","expected":[0,3,0,0,4],"passed":true},{"actual":[0,2,0,0,0],"check":"full ring","expected":[0,2,0,0,0],"passed":true},{"actual":[2,1,2,2,3],"check":"contiguous grant","expected":[2,1,2,0,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"wrapped free region\", \"actual\": [3, 5, 1, 1, 2], \"expected\": [3, 5, 1, 2, 2], \"passed\": false}, {\"check\": \"limited free space\", \"actual\": [2, 0, 2, 2, 0], \"expected\": [2, 0, 2, 0, 0], \"passed\": false}, {\"check\": \"empty shifted ring\", \"actual\": [4, 5, 1, 1, 2], \"expected\": [4, 5, 1, 3, 2], \"passed\": false}, {\"check\": \"empty request\", \"actual\": [0, 3, 0, 0, 4], \"expected\": [0, 3, 0, 0, 4], \"passed\": true}, {\"check\": \"full ring\", \"actual\": [0, 2, 0, 0, 0], \"expected\": [0, 2, 0, 0, 0], \"passed\": true}, {\"check\": \"contiguous grant\", \"actual\": [2, 1, 2, 2, 3], \"expected\": [2, 1, 2, 0, 3], \"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."}}