{"abstract":"Cancelling a deque permit removes every equal-sized permit.","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-cancel-identity","id":"FA-46176","implementations":{"attempt":{"sha256":"cd389ec6fd9f476a57b5f7b6495bdc82661d912b9209329d7db3b4d536e96421","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] if cancel==\"new\" else ([] if cancel!=\"none\" else active)\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":"8e3d26c4def5438211a0a96e1b9be59dae058292248cba236064335e203f0c6b","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=[] if cancel!=\"none\" else active\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-cancel-identity","generated_at":"2026-09-29T14:44:29.612001+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 cancel identity invariant in capacity-permits.","root_cause":"Cancelling a deque permit removes every equal-sized permit.","sha256":"aa0f9edc35d5f46c59f2a9d56c659246c29a96ad6800b21543e55e1d976501b1","title":"Cancelling a deque permit removes every equal-sized permit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.569,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[],true,7],"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\": [[], true, 7], \"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":43.469,"exit_code":1,"observations":[{"actual":[[["a",3]],false,2],"check":"reserved blocks grant","expected":[[["a",3]],false,2],"passed":true},{"actual":[[],true,7],"check":"cancel existing","expected":[[["b",1],["new",2]],true,4],"passed":false},{"actual":[[],true,5],"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\": [[], true, 7], \"expected\": [[[\"b\", 1], [\"new\", 2]], true, 4], \"passed\": false}, {\"check\": \"cancel new\", \"actual\": [[], true, 5], \"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":41.56,"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"}