{"abstract":"New deque reservation records all free slots instead of its granted request.","category":"Bounded deques","checks":6,"contract":"Bounded deque capacity includes live items and outstanding insertion permits. Grant a new permit only if it fits, then cancel one named permit and report the remaining permits and capacity.","evaluation_group":"s3-bounded-deques-capacity-permits","failed_approach":"The attempted transition still violates the stated contract: active=claims+([['new',want if want==0 else available]] if accepted else [])","family":"s3-bounded-deques-capacity-permits-grant-record-size","id":"FA-47331","implementations":{"attempt":{"sha256":"a07e79e5af0c6a27932e87513b18e9c2e0d1f549c70341742be5fd65548473f7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cap,size,claims,want,cancel=x\n    reserved=sum(c[1] for c in claims)\n    available=cap-size-reserved\n    accepted=want<=available\n    active=claims+([['new',want if want==0 else available]] if accepted else [])\n    active=[c for c in active if c[0]!=cancel]\n    free=cap-size-sum(c[1] for c in active)\n    return [active,accepted,free]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reserved blocks grant', solve([8,3,[[\"a\",3]],3,\"none\"]), {1: [[['a', 3]], False, 2], 2: [[['a', 3]], False, 2], 3: [[['a', 3]], False, 2], 4: [[['a', 3]], False, 2], 5: [[['a', 3]], False, 2]}[N])\ncheck('cancel existing', solve([9,2,[[\"a\",2],[\"b\",1]],2,\"a\"]), {1: [[['b', 1], ['new', 2]], True, 4], 2: [[['b', 1], ['new', 2]], True, 4], 3: [[['b', 1], ['new', 2]], True, 4], 4: [[['b', 1], ['new', 2]], True, 4], 5: [[['b', 1], ['new', 2]], True, 4]}[N])\ncheck('cancel new', solve([7,2,[[\"a\",1]],3,\"new\"]), {1: [[['a', 1]], True, 4], 2: [[['a', 1]], True, 4], 3: [[['a', 1]], True, 4], 4: [[['a', 1]], True, 4], 5: [[['a', 1]], True, 4]}[N])\ncheck('exact available', solve([6,2,[[\"a\",1]],3,\"none\"]), {1: [[['a', 1], ['new', 3]], True, 0], 2: [[['a', 1], ['new', 3]], True, 0], 3: [[['a', 1], ['new', 3]], True, 0], 4: [[['a', 1], ['new', 3]], True, 0], 5: [[['a', 1], ['new', 3]], True, 0]}[N])\ncheck('no claims', solve([N+4,N,[],2,\"none\"]), {1: [[['new', 2]], True, 2], 2: [[['new', 2]], True, 2], 3: [[['new', 2]], True, 2], 4: [[['new', 2]], True, 2], 5: [[['new', 2]], True, 2]}[N])\ncheck('zero permit', solve([4,4,[],0,\"none\"]), {1: [[['new', 0]], True, 0], 2: [[['new', 0]], True, 0], 3: [[['new', 0]], True, 0], 4: [[['new', 0]], True, 0], 5: [[['new', 0]], True, 0]}[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":"a9db9474a7b3e52254735668a55c37d7a9208fbf91b1f6bc03897cf4e50ad575","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cap,size,claims,want,cancel=x\n    reserved=sum(c[1] for c in claims)\n    available=cap-size-reserved\n    accepted=want<=available\n    active=claims+([['new',available]] if accepted else [])\n    active=[c for c in active if c[0]!=cancel]\n    free=cap-size-sum(c[1] for c in active)\n    return [active,accepted,free]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reserved blocks grant', solve([8,3,[[\"a\",3]],3,\"none\"]), {1: [[['a', 3]], False, 2], 2: [[['a', 3]], False, 2], 3: [[['a', 3]], False, 2], 4: [[['a', 3]], False, 2], 5: [[['a', 3]], False, 2]}[N])\ncheck('cancel existing', solve([9,2,[[\"a\",2],[\"b\",1]],2,\"a\"]), {1: [[['b', 1], ['new', 2]], True, 4], 2: [[['b', 1], ['new', 2]], True, 4], 3: [[['b', 1], ['new', 2]], True, 4], 4: [[['b', 1], ['new', 2]], True, 4], 5: [[['b', 1], ['new', 2]], True, 4]}[N])\ncheck('cancel new', solve([7,2,[[\"a\",1]],3,\"new\"]), {1: [[['a', 1]], True, 4], 2: [[['a', 1]], True, 4], 3: [[['a', 1]], True, 4], 4: [[['a', 1]], True, 4], 5: [[['a', 1]], True, 4]}[N])\ncheck('exact available', solve([6,2,[[\"a\",1]],3,\"none\"]), {1: [[['a', 1], ['new', 3]], True, 0], 2: [[['a', 1], ['new', 3]], True, 0], 3: [[['a', 1], ['new', 3]], True, 0], 4: [[['a', 1], ['new', 3]], True, 0], 5: [[['a', 1], ['new', 3]], True, 0]}[N])\ncheck('no claims', solve([N+4,N,[],2,\"none\"]), {1: [[['new', 2]], True, 2], 2: [[['new', 2]], True, 2], 3: [[['new', 2]], True, 2], 4: [[['new', 2]], True, 2], 5: [[['new', 2]], True, 2]}[N])\ncheck('zero permit', solve([4,4,[],0,\"none\"]), {1: [[['new', 0]], True, 0], 2: [[['new', 0]], True, 0], 3: [[['new', 0]], True, 0], 4: [[['new', 0]], True, 0], 5: [[['new', 0]], True, 0]}[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":"423b4b3e95cad39705d3868532901e2268a8591564c2b541dcda6fc3ca23216e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cap,size,claims,want,cancel=x\n    reserved=sum(c[1] for c in claims)\n    available=cap-size-reserved\n    accepted=want<=available\n    active=claims+([['new',want]] if accepted else [])\n    active=[c for c in active if c[0]!=cancel]\n    free=cap-size-sum(c[1] for c in active)\n    return [active,accepted,free]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('reserved blocks grant', solve([8,3,[[\"a\",3]],3,\"none\"]), {1: [[['a', 3]], False, 2], 2: [[['a', 3]], False, 2], 3: [[['a', 3]], False, 2], 4: [[['a', 3]], False, 2], 5: [[['a', 3]], False, 2]}[N])\ncheck('cancel existing', solve([9,2,[[\"a\",2],[\"b\",1]],2,\"a\"]), {1: [[['b', 1], ['new', 2]], True, 4], 2: [[['b', 1], ['new', 2]], True, 4], 3: [[['b', 1], ['new', 2]], True, 4], 4: [[['b', 1], ['new', 2]], True, 4], 5: [[['b', 1], ['new', 2]], True, 4]}[N])\ncheck('cancel new', solve([7,2,[[\"a\",1]],3,\"new\"]), {1: [[['a', 1]], True, 4], 2: [[['a', 1]], True, 4], 3: [[['a', 1]], True, 4], 4: [[['a', 1]], True, 4], 5: [[['a', 1]], True, 4]}[N])\ncheck('exact available', solve([6,2,[[\"a\",1]],3,\"none\"]), {1: [[['a', 1], ['new', 3]], True, 0], 2: [[['a', 1], ['new', 3]], True, 0], 3: [[['a', 1], ['new', 3]], True, 0], 4: [[['a', 1], ['new', 3]], True, 0], 5: [[['a', 1], ['new', 3]], True, 0]}[N])\ncheck('no claims', solve([N+4,N,[],2,\"none\"]), {1: [[['new', 2]], True, 2], 2: [[['new', 2]], True, 2], 3: [[['new', 2]], True, 2], 4: [[['new', 2]], True, 2], 5: [[['new', 2]], True, 2]}[N])\ncheck('zero permit', solve([4,4,[],0,\"none\"]), {1: [[['new', 0]], True, 0], 2: [[['new', 0]], True, 0], 3: [[['new', 0]], True, 0], 4: [[['new', 0]], True, 0], 5: [[['new', 0]], True, 0]}[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-capacity-permits-grant-record-size","generated_at":"2026-09-29T14:44:40.360639+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":"Use the corrected transition: active=claims+([['new',want]] if accepted else [])","root_cause":"Admission computes a requested grant correctly, but the permit record stores the entire available budget and overcharges unrelated future producers.","sha256":"941792218d0335b52ad81b0969010090f2ff4b63d979c5f4973b016e5f896dfa","title":"New deque reservation records all free slots instead of its granted request · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":47.475,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[["b",1],["new",4]],true,2],"check":"cancel existing","expected":[[["b",1],["new",2]],true,4],"passed":false},{"actual":[[["a",1]],true,4],"check":"cancel new","expected":[[["a",1]],true,4],"passed":true},{"actual":[[["a",1],["new",3]],true,0],"check":"exact available","expected":[[["a",1],["new",3]],true,0],"passed":true},{"actual":[[["new",4]],true,0],"check":"no claims","expected":[[["new",2]],true,2],"passed":false},{"actual":[[["new",0]],true,0],"check":"zero permit","expected":[[["new",0]],true,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserved blocks grant\", \"actual\": [[[\"a\", 3]], false, 2], \"expected\": [[[\"a\", 3]], false, 2], \"passed\": true}, {\"check\": \"cancel existing\", \"actual\": [[[\"b\", 1], [\"new\", 4]], true, 2], \"expected\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"passed\": false}, {\"check\": \"cancel new\", \"actual\": [[[\"a\", 1]], true, 4], \"expected\": [[[\"a\", 1]], true, 4], \"passed\": true}, {\"check\": \"exact available\", \"actual\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"expected\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"passed\": true}, {\"check\": \"no claims\", \"actual\": [[[\"new\", 4]], true, 0], \"expected\": [[[\"new\", 2]], true, 2], \"passed\": false}, {\"check\": \"zero permit\", \"actual\": [[[\"new\", 0]], true, 0], \"expected\": [[[\"new\", 0]], true, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.398,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[["b",1],["new",4]],true,2],"check":"cancel existing","expected":[[["b",1],["new",2]],true,4],"passed":false},{"actual":[[["a",1]],true,4],"check":"cancel new","expected":[[["a",1]],true,4],"passed":true},{"actual":[[["a",1],["new",3]],true,0],"check":"exact available","expected":[[["a",1],["new",3]],true,0],"passed":true},{"actual":[[["new",4]],true,0],"check":"no claims","expected":[[["new",2]],true,2],"passed":false},{"actual":[[["new",0]],true,0],"check":"zero permit","expected":[[["new",0]],true,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserved blocks grant\", \"actual\": [[[\"a\", 3]], false, 2], \"expected\": [[[\"a\", 3]], false, 2], \"passed\": true}, {\"check\": \"cancel existing\", \"actual\": [[[\"b\", 1], [\"new\", 4]], true, 2], \"expected\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"passed\": false}, {\"check\": \"cancel new\", \"actual\": [[[\"a\", 1]], true, 4], \"expected\": [[[\"a\", 1]], true, 4], \"passed\": true}, {\"check\": \"exact available\", \"actual\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"expected\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"passed\": true}, {\"check\": \"no claims\", \"actual\": [[[\"new\", 4]], true, 0], \"expected\": [[[\"new\", 2]], true, 2], \"passed\": false}, {\"check\": \"zero permit\", \"actual\": [[[\"new\", 0]], true, 0], \"expected\": [[[\"new\", 0]], true, 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.439,"exit_code":0,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[["b",1],["new",2]],true,4],"check":"cancel existing","expected":[[["b",1],["new",2]],true,4],"passed":true},{"actual":[[["a",1]],true,4],"check":"cancel new","expected":[[["a",1]],true,4],"passed":true},{"actual":[[["a",1],["new",3]],true,0],"check":"exact available","expected":[[["a",1],["new",3]],true,0],"passed":true},{"actual":[[["new",2]],true,2],"check":"no claims","expected":[[["new",2]],true,2],"passed":true},{"actual":[[["new",0]],true,0],"check":"zero permit","expected":[[["new",0]],true,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserved blocks grant\", \"actual\": [[[\"a\", 3]], false, 2], \"expected\": [[[\"a\", 3]], false, 2], \"passed\": true}, {\"check\": \"cancel existing\", \"actual\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"expected\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"passed\": true}, {\"check\": \"cancel new\", \"actual\": [[[\"a\", 1]], true, 4], \"expected\": [[[\"a\", 1]], true, 4], \"passed\": true}, {\"check\": \"exact available\", \"actual\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"expected\": [[[\"a\", 1], [\"new\", 3]], true, 0], \"passed\": true}, {\"check\": \"no claims\", \"actual\": [[[\"new\", 2]], true, 2], \"expected\": [[[\"new\", 2]], true, 2], \"passed\": true}, {\"check\": \"zero permit\", \"actual\": [[[\"new\", 0]], true, 0], \"expected\": [[[\"new\", 0]], true, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}