FAILURE MAP
← Case archive

FA-100656 / Speculative decoding bookkeeping / Open access

Decoding: Replacement token is inserted after the rejected draft token · case 01

Replacement token is inserted after the rejected draft token.

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

ROOT CAUSE

Replacement is appended after the rejected draft token.

THE FAILURE

Replacement is appended after the rejected draft token.

Unsuccessful approach: Replacing the final list element works only when rejection happens at the tail.

Case contract

For valid slot index k, replace draft[k] with replacement and preserve every other draft slot, including the suffix after k.

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, k, replacement):
    return draft[:k+1]+[replacement]+draft[k+1:]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle replacement', solve([1,2,3],1,9),[1,9,3])
check('first replacement', solve([1,2],0,8),[8,2])
check('last replacement', solve([1,2],1,7),[1,7])
check('singleton', solve([N],0,4),[4])
check('replacement zero', solve([0,1],0,0),[0,1])
check('preserve suffix', solve([1,2,3,4],1,8),[1,8,3,4])
check('vary token', solve([N,N+1],1,N+3),[N,N+3])
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 replacement[1, 2, 9, 3][1, 9, 3]Failed
first replacement[1, 8, 2][8, 2]Failed
last replacement[1, 2, 7][1, 7]Failed
singleton[1, 4][4]Failed
replacement zero[0, 0, 1][0, 1]Failed
preserve suffix[1, 2, 8, 3, 4][1, 8, 3, 4]Failed
vary token[1, 2, 4][1, 4]Failed

SHA-256 / 3b73c88943512307c57150668b5fa7e18c7a5269897576a32b70cd4e9065f90e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(draft, k, replacement):
    return draft[:k]+draft[k+1:]+[replacement]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle replacement', solve([1,2,3],1,9),[1,9,3])
check('first replacement', solve([1,2],0,8),[8,2])
check('last replacement', solve([1,2],1,7),[1,7])
check('singleton', solve([N],0,4),[4])
check('replacement zero', solve([0,1],0,0),[0,1])
check('preserve suffix', solve([1,2,3,4],1,8),[1,8,3,4])
check('vary token', solve([N,N+1],1,N+3),[N,N+3])
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 replacement[1, 3, 9][1, 9, 3]Failed
first replacement[2, 8][8, 2]Failed
last replacement[1, 7][1, 7]Passed
singleton[4][4]Passed
replacement zero[1, 0][0, 1]Failed
preserve suffix[1, 3, 4, 8][1, 8, 3, 4]Failed
vary token[1, 4][1, 4]Passed

SHA-256 / 7e69c882980fb38a613827b6e6577cc710caf7348f10cb062b6fe2987eec342c

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:38.100039+00:00.

Case digest / ccd3fb2ee0e7ffe3de6ff0f344e39a016ed6bd78899bfbddc05c2908ed889251