FAILURE MAP
← Case archive

FA-100701 / Speculative decoding bookkeeping / Open access

Decoding: Committed prefix is reversed before output · case 01

Committed prefix is reversed before output.

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

ROOT CAUSE

The accepted prefix is reversed during output assembly.

THE FAILURE

The accepted prefix is reversed during output assembly.

Unsuccessful approach: Sorting the accepted tokens changes valid sequence order.

Case contract

Return the first k draft tokens in their original order.

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, accepted):
    return list(reversed(draft[:accepted]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordered prefix', solve([3,1,2],2),[3,1])
check('full sequence', solve([2,0,1],3),[2,0,1])
check('empty acceptance', solve([N],0),[])
check('singleton', solve([N],1),[N])
check('duplicate tokens', solve([4,4,2],2),[4,4])
check('long prefix', solve([5,1,4,2],3),[5,1,4])
check('empty draft', solve([],0),[])
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
ordered prefix[1, 3][3, 1]Failed
full sequence[1, 0, 2][2, 0, 1]Failed
empty acceptance[][]Passed
singleton[1][1]Passed
duplicate tokens[4, 4][4, 4]Passed
long prefix[4, 1, 5][5, 1, 4]Failed
empty draft[][]Passed

SHA-256 / a172e9a79f15d7eada56840f609623da0722a2b3f523528c8951418d141641f6

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(draft, accepted):
    return sorted(draft[:accepted])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ordered prefix', solve([3,1,2],2),[3,1])
check('full sequence', solve([2,0,1],3),[2,0,1])
check('empty acceptance', solve([N],0),[])
check('singleton', solve([N],1),[N])
check('duplicate tokens', solve([4,4,2],2),[4,4])
check('long prefix', solve([5,1,4,2],3),[5,1,4])
check('empty draft', solve([],0),[])
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
ordered prefix[1, 3][3, 1]Failed
full sequence[0, 1, 2][2, 0, 1]Failed
empty acceptance[][]Passed
singleton[1][1]Passed
duplicate tokens[4, 4][4, 4]Passed
long prefix[1, 4, 5][5, 1, 4]Failed
empty draft[][]Passed

SHA-256 / cd530e7df0484cab5f21939bfa62c5f173424ca6ad9764043b60914e14258fb8

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

Case digest / b1f2187cb3a6f28d4ac4f3e6d2946d455d6c998e3be3a520771b61d02cc1d820