{"abstract":"Replacement token is missing from the emitted-token count.","category":"Speculative decoding bookkeeping","checks":7,"contract":"Output length is accepted draft prefix length plus one replacement token after a rejection.","contract_signature":"draft, accepted","evaluation_group":"spec-emitted-count","failed_approach":"Adding the whole rejected suffix counts draft tokens that are discarded.","family":"w3-speculative-decoding-bookkeeping-emitted-count","id":"FA-100676","implementations":{"attempt":{"sha256":"b9101fbfbb38fbebffee5bc34e39ee8e42240dee8f7525b850e2dada8ff3a6fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draft, accepted):\n    return accepted + len(draft)-accepted\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial', solve([1,2,3],1),2)\ncheck('reject first', solve([1],0),1)\ncheck('last rejected', solve([1,2],1),2)\ncheck('empty proposal rejection', solve([],0),1)\ncheck('vary accepted', solve(list(range(N+1)),N),N+1)\ncheck('all but one', solve([1,2,3,4],3),4)\ncheck('zero prefix', solve([1,2,3],0),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":"a340fe9e69a822e54631a222475fd19fe4c7c2a367f299b321c5f624aef672c1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draft, accepted):\n    return accepted\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial', solve([1,2,3],1),2)\ncheck('reject first', solve([1],0),1)\ncheck('last rejected', solve([1,2],1),2)\ncheck('empty proposal rejection', solve([],0),1)\ncheck('vary accepted', solve(list(range(N+1)),N),N+1)\ncheck('all but one', solve([1,2,3,4],3),4)\ncheck('zero prefix', solve([1,2,3],0),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-emitted-count","generated_at":"2026-09-30T16:48:38.099094+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 replacement is omitted from accounting.","sha256":"1565f8e472bf4e98768a18b667af94cc5640aba44fcfbfa92acce781299c9284","title":"Decoding: Replacement token is missing from the emitted-token count · 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.433,"exit_code":1,"observations":[{"actual":3,"check":"partial","expected":2,"passed":false},{"actual":1,"check":"reject first","expected":1,"passed":true},{"actual":2,"check":"last rejected","expected":2,"passed":true},{"actual":0,"check":"empty proposal rejection","expected":1,"passed":false},{"actual":2,"check":"vary accepted","expected":2,"passed":true},{"actual":4,"check":"all but one","expected":4,"passed":true},{"actual":3,"check":"zero prefix","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial\", \"actual\": 3, \"expected\": 2, \"passed\": false}, {\"check\": \"reject first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"last rejected\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"empty proposal rejection\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"vary accepted\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"all but one\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"zero prefix\", \"actual\": 3, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.811,"exit_code":1,"observations":[{"actual":1,"check":"partial","expected":2,"passed":false},{"actual":0,"check":"reject first","expected":1,"passed":false},{"actual":1,"check":"last rejected","expected":2,"passed":false},{"actual":0,"check":"empty proposal rejection","expected":1,"passed":false},{"actual":1,"check":"vary accepted","expected":2,"passed":false},{"actual":3,"check":"all but one","expected":4,"passed":false},{"actual":0,"check":"zero prefix","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"reject first\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"last rejected\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"empty proposal rejection\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"vary accepted\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"all but one\", \"actual\": 3, \"expected\": 4, \"passed\": false}, {\"check\": \"zero prefix\", \"actual\": 0, \"expected\": 1, \"passed\": false}], \"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."}}