{"abstract":"Cancelled deque permits remain charged to free capacity.","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 partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-capacity-permits-released-capacity","id":"FA-46181","implementations":{"attempt":{"sha256":"24523ec9060276f2b5479534ea9a22c0b04a0e3569538600b9ee5cc8142e6e29","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) if cancel==\"new\" else available-(want if accepted else 0)\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":"ffa31d3cc76418df2dfea2163629fc3f522f9ac156cbb62140f1a3908f8e6503","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=available-(want if accepted else 0)\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-released-capacity","generated_at":"2026-09-29T14:44:29.615318+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 released capacity invariant in capacity-permits.","root_cause":"Cancelled deque permits remain charged to free capacity.","sha256":"288d721c439ec32493ba38f8bb64a636115a217ed413e2f87fda66f395f20b2a","title":"Cancelled deque permits remain charged to free capacity · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.558,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[["b",1],["new",2]],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",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":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\", 2]], 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\", 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\": false}\n"},"broken":{"elapsed_ms":44.759,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[["b",1],["new",2]],true,2],"check":"cancel existing","expected":[[["b",1],["new",2]],true,4],"passed":false},{"actual":[[["a",1]],true,1],"check":"cancel new","expected":[[["a",1]],true,4],"passed":false},{"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":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\", 2]], true, 2], \"expected\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"passed\": false}, {\"check\": \"cancel new\", \"actual\": [[[\"a\", 1]], true, 1], \"expected\": [[[\"a\", 1]], true, 4], \"passed\": false}, {\"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\": 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"}