{"abstract":"Capacity permits forget resident deque occupancy.","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.","contract_signature":"x","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-resident-charge","id":"FA-46166","implementations":{"attempt":{"sha256":"cb7582f9a546086dc1349bfd1c6ab91d2d23b4d1855507d44abd041958e0db47","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 if size==cap else cap-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"},"broken":{"sha256":"0cc91b8b9094f5f5af7af95265a903a8cfa1b840f2e5df9bef7a3f60b75a9462","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-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-resident-charge","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.","root_cause":"Capacity permits forget resident deque occupancy.","sha256":"b2b9616e307ee4a821485cc280e7a1a24cb5fec5c6fd1d4912dd55a903a10ede","title":"Capacity permits forget resident deque occupancy · 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.235,"exit_code":1,"observations":[{"actual":[[["a",3],["new",3]],true,-1],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserved blocks grant\", \"actual\": [[[\"a\", 3], [\"new\", 3]], true, -1], \"expected\": [[[\"a\", 3]], false, 2], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":42.718,"exit_code":1,"observations":[{"actual":[[["a",3],["new",3]],true,-1],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reserved blocks grant\", \"actual\": [[[\"a\", 3], [\"new\", 3]], true, -1], \"expected\": [[[\"a\", 3]], false, 2], \"passed\": false}, {\"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\": 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."}}