{"abstract":"Rejected draft tokens inflate the accepted token total.","category":"Speculative decoding bookkeeping","checks":7,"contract":"For a proposed draft and reported accepted-prefix count k, clamp k to [0, len(draft)] and return that normalized committed count.","contract_signature":"draft, k","evaluation_group":"spec-accepted-token-total","failed_approach":"Clamping only to the draft length still accepts tokens beyond the verified prefix.","family":"w3-speculative-decoding-bookkeeping-accepted-token-total","id":"FA-100651","implementations":{"attempt":{"sha256":"3fd989102235b7af43357a2b11745504d666e2028b9456a45b77efc54b7fd59a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draft, k):\n    return min(k+1,len(draft))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial prefix', solve(list(range(N+3)),N),N)\ncheck('none accepted', solve([1,2],0),0)\ncheck('all accepted', solve([1,2],2),2)\ncheck('empty proposal', solve([],0),0)\ncheck('clamp oversized count', solve([1],N+4),1)\ncheck('negative count clamps', solve([1,2],-2),0)\ncheck('singleton accepted', solve([N],1),1)\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":"502ea815a53199fabe675d5757743a8247c0c19043ac546cd5ad0b728fa99ab4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draft, k):\n    return len(draft)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial prefix', solve(list(range(N+3)),N),N)\ncheck('none accepted', solve([1,2],0),0)\ncheck('all accepted', solve([1,2],2),2)\ncheck('empty proposal', solve([],0),0)\ncheck('clamp oversized count', solve([1],N+4),1)\ncheck('negative count clamps', solve([1,2],-2),0)\ncheck('singleton accepted', solve([N],1),1)\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":"These are finite toy sequences with explicit contracts; they make no claim about production decoder behavior or model quality. 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":"w3-speculative-decoding-bookkeeping-accepted-token-total","generated_at":"2026-09-30T16:48:38.099274+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A self-contained bookkeeping model makes prefix and token-count semantics observable without a model runtime.","root_cause":"The whole proposal is charged as accepted.","sha256":"7a334ba09ed185e28c36c93a17a5539017661e7ef1258def50499c364a2fcb02","title":"Decoding: Rejected draft tokens inflate the accepted token total · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.429,"exit_code":1,"observations":[{"actual":2,"check":"partial prefix","expected":1,"passed":false},{"actual":1,"check":"none accepted","expected":0,"passed":false},{"actual":2,"check":"all accepted","expected":2,"passed":true},{"actual":0,"check":"empty proposal","expected":0,"passed":true},{"actual":1,"check":"clamp oversized count","expected":1,"passed":true},{"actual":-1,"check":"negative count clamps","expected":0,"passed":false},{"actual":1,"check":"singleton accepted","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial prefix\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"none accepted\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"all accepted\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"empty proposal\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"clamp oversized count\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"negative count clamps\", \"actual\": -1, \"expected\": 0, \"passed\": false}, {\"check\": \"singleton accepted\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.207,"exit_code":1,"observations":[{"actual":4,"check":"partial prefix","expected":1,"passed":false},{"actual":2,"check":"none accepted","expected":0,"passed":false},{"actual":2,"check":"all accepted","expected":2,"passed":true},{"actual":0,"check":"empty proposal","expected":0,"passed":true},{"actual":1,"check":"clamp oversized count","expected":1,"passed":true},{"actual":2,"check":"negative count clamps","expected":0,"passed":false},{"actual":1,"check":"singleton accepted","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial prefix\", \"actual\": 4, \"expected\": 1, \"passed\": false}, {\"check\": \"none accepted\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"all accepted\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"empty proposal\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"clamp oversized count\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"negative count clamps\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"singleton accepted\", \"actual\": 1, \"expected\": 1, \"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."}}