{"abstract":"Deque transaction accepts insufficient allocation credits.","category":"Bounded deques","checks":7,"contract":"Publish a complete staged bounded deque only if its captured epoch matches, its occupancy fits and allocation credits suffice. Failure preserves state, epoch and credits; success retires the old snapshot.","evaluation_group":"s3-bounded-deques-transaction-publish","failed_approach":"The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.","family":"s3-bounded-deques-transaction-publish-credit-admission","id":"FA-46756","implementations":{"attempt":{"sha256":"746afbddf43022737ad4d6b0035a44ef37a2b351e63e74f1b8204fa31b5dc9d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,staged,cap,epoch,saved,cost,credits=x\n    if saved!=epoch:return [a,epoch,credits,'conflict',[]]\n    if len(staged)>cap:return [a,epoch,credits,'capacity',[]]\n    if cost>credits and credits==0:return [a,epoch,credits,'allocation',[]]\n    state=staged[:]\n    version=epoch+1\n    balance=credits-cost\n    retired=a[:]\n    return [state,version,balance,'committed',retired]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N],[N+1,N+2],3,2,2,2,5]), {1: [[2, 3], 3, 3, 'committed', [1]], 2: [[3, 4], 3, 3, 'committed', [2]], 3: [[4, 5], 3, 3, 'committed', [3]], 4: [[5, 6], 3, 3, 'committed', [4]], 5: [[6, 7], 3, 3, 'committed', [5]]}[N])\ncheck('1', solve([[N],[N+1],3,3,2,1,4]), {1: [[1], 3, 4, 'conflict', []], 2: [[2], 3, 4, 'conflict', []], 3: [[3], 3, 4, 'conflict', []], 4: [[4], 3, 4, 'conflict', []], 5: [[5], 3, 4, 'conflict', []]}[N])\ncheck('2', solve([[N],[N+1,N+2,N+3],2,4,4,1,3]), {1: [[1], 4, 3, 'capacity', []], 2: [[2], 4, 3, 'capacity', []], 3: [[3], 4, 3, 'capacity', []], 4: [[4], 4, 3, 'capacity', []], 5: [[5], 4, 3, 'capacity', []]}[N])\ncheck('3', solve([[N],[N+1],2,1,1,4,2]), {1: [[1], 1, 2, 'allocation', []], 2: [[2], 1, 2, 'allocation', []], 3: [[3], 1, 2, 'allocation', []], 4: [[4], 1, 2, 'allocation', []], 5: [[5], 1, 2, 'allocation', []]}[N])\ncheck('4', solve([[],[],0,0,0,0,0]), {1: [[], 1, 0, 'committed', []], 2: [[], 1, 0, 'committed', []], 3: [[], 1, 0, 'committed', []], 4: [[], 1, 0, 'committed', []], 5: [[], 1, 0, 'committed', []]}[N])\ncheck('5', solve([[N,N+1],[N+2],2,5,5,3,3]), {1: [[3], 6, 0, 'committed', [1, 2]], 2: [[4], 6, 0, 'committed', [2, 3]], 3: [[5], 6, 0, 'committed', [3, 4]], 4: [[6], 6, 0, 'committed', [4, 5]], 5: [[7], 6, 0, 'committed', [5, 6]]}[N])\ncheck('6', solve([[N],[N+1],2,1,2,1,3]), {1: [[1], 1, 3, 'conflict', []], 2: [[2], 1, 3, 'conflict', []], 3: [[3], 1, 3, 'conflict', []], 4: [[4], 1, 3, 'conflict', []], 5: [[5], 1, 3, 'conflict', []]}[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":"2f859b4fba247521db79130620ea734d4b89458c20e718ed5dc190ce19083116","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,staged,cap,epoch,saved,cost,credits=x\n    if saved!=epoch:return [a,epoch,credits,'conflict',[]]\n    if len(staged)>cap:return [a,epoch,credits,'capacity',[]]\n    if cost<0:return [a,epoch,credits,'allocation',[]]\n    state=staged[:]\n    version=epoch+1\n    balance=credits-cost\n    retired=a[:]\n    return [state,version,balance,'committed',retired]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N],[N+1,N+2],3,2,2,2,5]), {1: [[2, 3], 3, 3, 'committed', [1]], 2: [[3, 4], 3, 3, 'committed', [2]], 3: [[4, 5], 3, 3, 'committed', [3]], 4: [[5, 6], 3, 3, 'committed', [4]], 5: [[6, 7], 3, 3, 'committed', [5]]}[N])\ncheck('1', solve([[N],[N+1],3,3,2,1,4]), {1: [[1], 3, 4, 'conflict', []], 2: [[2], 3, 4, 'conflict', []], 3: [[3], 3, 4, 'conflict', []], 4: [[4], 3, 4, 'conflict', []], 5: [[5], 3, 4, 'conflict', []]}[N])\ncheck('2', solve([[N],[N+1,N+2,N+3],2,4,4,1,3]), {1: [[1], 4, 3, 'capacity', []], 2: [[2], 4, 3, 'capacity', []], 3: [[3], 4, 3, 'capacity', []], 4: [[4], 4, 3, 'capacity', []], 5: [[5], 4, 3, 'capacity', []]}[N])\ncheck('3', solve([[N],[N+1],2,1,1,4,2]), {1: [[1], 1, 2, 'allocation', []], 2: [[2], 1, 2, 'allocation', []], 3: [[3], 1, 2, 'allocation', []], 4: [[4], 1, 2, 'allocation', []], 5: [[5], 1, 2, 'allocation', []]}[N])\ncheck('4', solve([[],[],0,0,0,0,0]), {1: [[], 1, 0, 'committed', []], 2: [[], 1, 0, 'committed', []], 3: [[], 1, 0, 'committed', []], 4: [[], 1, 0, 'committed', []], 5: [[], 1, 0, 'committed', []]}[N])\ncheck('5', solve([[N,N+1],[N+2],2,5,5,3,3]), {1: [[3], 6, 0, 'committed', [1, 2]], 2: [[4], 6, 0, 'committed', [2, 3]], 3: [[5], 6, 0, 'committed', [3, 4]], 4: [[6], 6, 0, 'committed', [4, 5]], 5: [[7], 6, 0, 'committed', [5, 6]]}[N])\ncheck('6', solve([[N],[N+1],2,1,2,1,3]), {1: [[1], 1, 3, 'conflict', []], 2: [[2], 1, 3, 'conflict', []], 3: [[3], 1, 3, 'conflict', []], 4: [[4], 1, 3, 'conflict', []], 5: [[5], 1, 3, 'conflict', []]}[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":"fe9b5f5e4839dd6f78a3f09b69a6719800291d1013fb4c6e662a32f9c59eba60","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    a,staged,cap,epoch,saved,cost,credits=x\n    if saved!=epoch:return [a,epoch,credits,'conflict',[]]\n    if len(staged)>cap:return [a,epoch,credits,'capacity',[]]\n    if cost>credits:return [a,epoch,credits,'allocation',[]]\n    state=staged[:]\n    version=epoch+1\n    balance=credits-cost\n    retired=a[:]\n    return [state,version,balance,'committed',retired]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([[N],[N+1,N+2],3,2,2,2,5]), {1: [[2, 3], 3, 3, 'committed', [1]], 2: [[3, 4], 3, 3, 'committed', [2]], 3: [[4, 5], 3, 3, 'committed', [3]], 4: [[5, 6], 3, 3, 'committed', [4]], 5: [[6, 7], 3, 3, 'committed', [5]]}[N])\ncheck('1', solve([[N],[N+1],3,3,2,1,4]), {1: [[1], 3, 4, 'conflict', []], 2: [[2], 3, 4, 'conflict', []], 3: [[3], 3, 4, 'conflict', []], 4: [[4], 3, 4, 'conflict', []], 5: [[5], 3, 4, 'conflict', []]}[N])\ncheck('2', solve([[N],[N+1,N+2,N+3],2,4,4,1,3]), {1: [[1], 4, 3, 'capacity', []], 2: [[2], 4, 3, 'capacity', []], 3: [[3], 4, 3, 'capacity', []], 4: [[4], 4, 3, 'capacity', []], 5: [[5], 4, 3, 'capacity', []]}[N])\ncheck('3', solve([[N],[N+1],2,1,1,4,2]), {1: [[1], 1, 2, 'allocation', []], 2: [[2], 1, 2, 'allocation', []], 3: [[3], 1, 2, 'allocation', []], 4: [[4], 1, 2, 'allocation', []], 5: [[5], 1, 2, 'allocation', []]}[N])\ncheck('4', solve([[],[],0,0,0,0,0]), {1: [[], 1, 0, 'committed', []], 2: [[], 1, 0, 'committed', []], 3: [[], 1, 0, 'committed', []], 4: [[], 1, 0, 'committed', []], 5: [[], 1, 0, 'committed', []]}[N])\ncheck('5', solve([[N,N+1],[N+2],2,5,5,3,3]), {1: [[3], 6, 0, 'committed', [1, 2]], 2: [[4], 6, 0, 'committed', [2, 3]], 3: [[5], 6, 0, 'committed', [3, 4]], 4: [[6], 6, 0, 'committed', [4, 5]], 5: [[7], 6, 0, 'committed', [5, 6]]}[N])\ncheck('6', solve([[N],[N+1],2,1,2,1,3]), {1: [[1], 1, 3, 'conflict', []], 2: [[2], 1, 3, 'conflict', []], 3: [[3], 1, 3, 'conflict', []], 4: [[4], 1, 3, 'conflict', []], 5: [[5], 1, 3, 'conflict', []]}[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-transaction-publish-credit-admission","generated_at":"2026-09-29T14:44:35.221310+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 credit admission invariant in transaction-publish.","root_cause":"Deque transaction accepts insufficient allocation credits.","sha256":"20ade5f4a96e5d7c1fe6a195b021bc8529e6380743f086b47c39247793587265","title":"Deque transaction accepts insufficient allocation credits · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.082,"exit_code":1,"observations":[{"actual":[[2,3],3,3,"committed",[1]],"check":"0","expected":[[2,3],3,3,"committed",[1]],"passed":true},{"actual":[[1],3,4,"conflict",[]],"check":"1","expected":[[1],3,4,"conflict",[]],"passed":true},{"actual":[[1],4,3,"capacity",[]],"check":"2","expected":[[1],4,3,"capacity",[]],"passed":true},{"actual":[[2],2,-2,"committed",[1]],"check":"3","expected":[[1],1,2,"allocation",[]],"passed":false},{"actual":[[],1,0,"committed",[]],"check":"4","expected":[[],1,0,"committed",[]],"passed":true},{"actual":[[3],6,0,"committed",[1,2]],"check":"5","expected":[[3],6,0,"committed",[1,2]],"passed":true},{"actual":[[1],1,3,"conflict",[]],"check":"6","expected":[[1],1,3,"conflict",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[2, 3], 3, 3, \"committed\", [1]], \"expected\": [[2, 3], 3, 3, \"committed\", [1]], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1], 3, 4, \"conflict\", []], \"expected\": [[1], 3, 4, \"conflict\", []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[1], 4, 3, \"capacity\", []], \"expected\": [[1], 4, 3, \"capacity\", []], \"passed\": true}, {\"check\": \"3\", \"actual\": [[2], 2, -2, \"committed\", [1]], \"expected\": [[1], 1, 2, \"allocation\", []], \"passed\": false}, {\"check\": \"4\", \"actual\": [[], 1, 0, \"committed\", []], \"expected\": [[], 1, 0, \"committed\", []], \"passed\": true}, {\"check\": \"5\", \"actual\": [[3], 6, 0, \"committed\", [1, 2]], \"expected\": [[3], 6, 0, \"committed\", [1, 2]], \"passed\": true}, {\"check\": \"6\", \"actual\": [[1], 1, 3, \"conflict\", []], \"expected\": [[1], 1, 3, \"conflict\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.77,"exit_code":1,"observations":[{"actual":[[2,3],3,3,"committed",[1]],"check":"0","expected":[[2,3],3,3,"committed",[1]],"passed":true},{"actual":[[1],3,4,"conflict",[]],"check":"1","expected":[[1],3,4,"conflict",[]],"passed":true},{"actual":[[1],4,3,"capacity",[]],"check":"2","expected":[[1],4,3,"capacity",[]],"passed":true},{"actual":[[2],2,-2,"committed",[1]],"check":"3","expected":[[1],1,2,"allocation",[]],"passed":false},{"actual":[[],1,0,"committed",[]],"check":"4","expected":[[],1,0,"committed",[]],"passed":true},{"actual":[[3],6,0,"committed",[1,2]],"check":"5","expected":[[3],6,0,"committed",[1,2]],"passed":true},{"actual":[[1],1,3,"conflict",[]],"check":"6","expected":[[1],1,3,"conflict",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[2, 3], 3, 3, \"committed\", [1]], \"expected\": [[2, 3], 3, 3, \"committed\", [1]], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1], 3, 4, \"conflict\", []], \"expected\": [[1], 3, 4, \"conflict\", []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[1], 4, 3, \"capacity\", []], \"expected\": [[1], 4, 3, \"capacity\", []], \"passed\": true}, {\"check\": \"3\", \"actual\": [[2], 2, -2, \"committed\", [1]], \"expected\": [[1], 1, 2, \"allocation\", []], \"passed\": false}, {\"check\": \"4\", \"actual\": [[], 1, 0, \"committed\", []], \"expected\": [[], 1, 0, \"committed\", []], \"passed\": true}, {\"check\": \"5\", \"actual\": [[3], 6, 0, \"committed\", [1, 2]], \"expected\": [[3], 6, 0, \"committed\", [1, 2]], \"passed\": true}, {\"check\": \"6\", \"actual\": [[1], 1, 3, \"conflict\", []], \"expected\": [[1], 1, 3, \"conflict\", []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.901,"exit_code":0,"observations":[{"actual":[[2,3],3,3,"committed",[1]],"check":"0","expected":[[2,3],3,3,"committed",[1]],"passed":true},{"actual":[[1],3,4,"conflict",[]],"check":"1","expected":[[1],3,4,"conflict",[]],"passed":true},{"actual":[[1],4,3,"capacity",[]],"check":"2","expected":[[1],4,3,"capacity",[]],"passed":true},{"actual":[[1],1,2,"allocation",[]],"check":"3","expected":[[1],1,2,"allocation",[]],"passed":true},{"actual":[[],1,0,"committed",[]],"check":"4","expected":[[],1,0,"committed",[]],"passed":true},{"actual":[[3],6,0,"committed",[1,2]],"check":"5","expected":[[3],6,0,"committed",[1,2]],"passed":true},{"actual":[[1],1,3,"conflict",[]],"check":"6","expected":[[1],1,3,"conflict",[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[2, 3], 3, 3, \"committed\", [1]], \"expected\": [[2, 3], 3, 3, \"committed\", [1]], \"passed\": true}, {\"check\": \"1\", \"actual\": [[1], 3, 4, \"conflict\", []], \"expected\": [[1], 3, 4, \"conflict\", []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[1], 4, 3, \"capacity\", []], \"expected\": [[1], 4, 3, \"capacity\", []], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1], 1, 2, \"allocation\", []], \"expected\": [[1], 1, 2, \"allocation\", []], \"passed\": true}, {\"check\": \"4\", \"actual\": [[], 1, 0, \"committed\", []], \"expected\": [[], 1, 0, \"committed\", []], \"passed\": true}, {\"check\": \"5\", \"actual\": [[3], 6, 0, \"committed\", [1, 2]], \"expected\": [[3], 6, 0, \"committed\", [1, 2]], \"passed\": true}, {\"check\": \"6\", \"actual\": [[1], 1, 3, \"conflict\", []], \"expected\": [[1], 1, 3, \"conflict\", []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}