FAILURE MAP
← Case archive

FA-100726 / Speculative decoding bookkeeping / Open access

Decoding: Mismatch report returns the draft token instead of the verified token · case 01

Mismatch report returns the draft token instead of the verified token.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The draft token at the mismatch position is reported as if it were verified.

THE FAILURE

The draft token at the mismatch position is reported as if it were verified.

Unsuccessful approach: Returning the first verified token fixes only rejection at position zero.

Case contract

For a nonnegative zero-based rejection index k, return verified[k] when present, otherwise None.

Why this case matters

A self-contained bookkeeping model makes prefix and token-count semantics observable without a model runtime.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(draft, verified, k):
    return draft[k] if k < len(draft) else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle mismatch', solve([1,2,3],[1,9,3],1),9)
check('first mismatch', solve([5],[8],0),8)
check('beyond verified', solve([1,2],[1],1),None)
check('empty verified', solve([1],[],0),None)
check('later position', solve([1,2,3],[1,2,7],2),7)
check('singleton token', solve([N],[N+1],0),N+1)
check('short draft but verified slot', solve([1],[1,4],1),4)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
middle mismatch29Failed
first mismatch58Failed
beyond verified2NoneFailed
empty verified1NoneFailed
later position37Failed
singleton token12Failed
short draft but verified slotNone4Failed

SHA-256 / 48d57797d59a024da873f6f81118eb63d629e90029a8a78fcb20fb62691cc76b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(draft, verified, k):
    return verified[0] if verified else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle mismatch', solve([1,2,3],[1,9,3],1),9)
check('first mismatch', solve([5],[8],0),8)
check('beyond verified', solve([1,2],[1],1),None)
check('empty verified', solve([1],[],0),None)
check('later position', solve([1,2,3],[1,2,7],2),7)
check('singleton token', solve([N],[N+1],0),N+1)
check('short draft but verified slot', solve([1],[1,4],1),4)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
middle mismatch19Failed
first mismatch88Passed
beyond verified1NoneFailed
empty verifiedNoneNonePassed
later position17Failed
singleton token22Passed
short draft but verified slot14Failed

SHA-256 / 69d617011432d660b18541974d54df696317f5bece1b68aab3bf8fae5810d685

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:39.096632+00:00.

Case digest / 3558247370b7b9aba6b6dfc37fb9f268ce4278036796da584cde0dfce9ba30a0