FA-100691 / Speculative decoding bookkeeping / Open access
Decoding: Layered cache commit preserves only positions before rejection · case 01
Layered cache commit preserves only positions before rejection.
ROOT CAUSE
Commit logic slices the flattened cache by token count, so it mistakes layer records for token positions and can erase history or keep an incomplete layer.
THE FAILURE
Commit logic slices the flattened cache by token count, so it mistakes layer records for token positions and can erase history or keep an incomplete layer.
Unsuccessful approach: An inclusive cutoff removes later speculative entries but still commits the rejected position itself.
Case contract
Cache records are [layer, absolute_position, payload] in arbitrary order. Given proposal start position p and accepted count k, retain every layer record at positions before p+k, preserving history and accepted positions; discard the rejected position and all later speculative positions.
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(cache, start, accepted):
return cache[:accepted]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p=N+10
cache=[[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B'],[0,p+2,'c'],[1,p+2,'C']]
check('both layers through verified prefix', solve(cache,p,2),cache[:4])
check('history survives with one accepted position', solve([[0,p-2,'old'],[1,p-2,'OLD'],[0,p,'x'],[1,p,'X'],[0,p+1,'y']],p,1),[[0,p-2,'old'],[1,p-2,'OLD'],[0,p,'x'],[1,p,'X']])
check('zero acceptance keeps history only', solve([[0,p-1,'h'],[1,p-1,'H'],[0,p,'r'],[1,p,'R']],p,0),[[0,p-1,'h'],[1,p-1,'H']])
check('reordered layer records', solve([[1,p+1,'B'],[0,p-1,'old'],[0,p+1,'b'],[1,p-1,'OLD']],p,2),[[1,p+1,'B'],[0,p-1,'old'],[0,p+1,'b'],[1,p-1,'OLD']])
check('full proposal acceptance boundary', solve([[0,p-1,'h'],[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B'],[0,p+2,'stale']],p,2),[[0,p-1,'h'],[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B']])
check('empty cache', solve([],p,2),[])
check('duplicate records remain duplicated', solve([[0,p,'x'],[0,p,'x'],[1,p,'X'],[1,p+1,'R']],p,1),[[0,p,'x'],[0,p,'x'],[1,p,'X']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| both layers through verified prefix | [[0, 11, 'a'], [1, 11, 'A']] | [[0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B']] | Failed |
| history survives with one accepted position | [[0, 9, 'old']] | [[0, 9, 'old'], [1, 9, 'OLD'], [0, 11, 'x'], [1, 11, 'X']] | Failed |
| zero acceptance keeps history only | [] | [[0, 10, 'h'], [1, 10, 'H']] | Failed |
| reordered layer records | [[1, 12, 'B'], [0, 10, 'old']] | [[1, 12, 'B'], [0, 10, 'old'], [0, 12, 'b'], [1, 10, 'OLD']] | Failed |
| full proposal acceptance boundary | [[0, 10, 'h'], [0, 11, 'a']] | [[0, 10, 'h'], [0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B']] | Failed |
| empty cache | [] | [] | Passed |
| duplicate records remain duplicated | [[0, 11, 'x']] | [[0, 11, 'x'], [0, 11, 'x'], [1, 11, 'X']] | Failed |
SHA-256 / 1707178a4976cc539f7c186a4d9e2ad22147a425438b89b7a5bf718088f5d400
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cache, start, accepted):
return [r for r in cache if r[1] <= start+accepted]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
p=N+10
cache=[[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B'],[0,p+2,'c'],[1,p+2,'C']]
check('both layers through verified prefix', solve(cache,p,2),cache[:4])
check('history survives with one accepted position', solve([[0,p-2,'old'],[1,p-2,'OLD'],[0,p,'x'],[1,p,'X'],[0,p+1,'y']],p,1),[[0,p-2,'old'],[1,p-2,'OLD'],[0,p,'x'],[1,p,'X']])
check('zero acceptance keeps history only', solve([[0,p-1,'h'],[1,p-1,'H'],[0,p,'r'],[1,p,'R']],p,0),[[0,p-1,'h'],[1,p-1,'H']])
check('reordered layer records', solve([[1,p+1,'B'],[0,p-1,'old'],[0,p+1,'b'],[1,p-1,'OLD']],p,2),[[1,p+1,'B'],[0,p-1,'old'],[0,p+1,'b'],[1,p-1,'OLD']])
check('full proposal acceptance boundary', solve([[0,p-1,'h'],[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B'],[0,p+2,'stale']],p,2),[[0,p-1,'h'],[0,p,'a'],[1,p,'A'],[0,p+1,'b'],[1,p+1,'B']])
check('empty cache', solve([],p,2),[])
check('duplicate records remain duplicated', solve([[0,p,'x'],[0,p,'x'],[1,p,'X'],[1,p+1,'R']],p,1),[[0,p,'x'],[0,p,'x'],[1,p,'X']])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| both layers through verified prefix | [[0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B'], [0, 13, 'c'], [1, 13, 'C']] | [[0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B']] | Failed |
| history survives with one accepted position | [[0, 9, 'old'], [1, 9, 'OLD'], [0, 11, 'x'], [1, 11, 'X'], [0, 12, 'y']] | [[0, 9, 'old'], [1, 9, 'OLD'], [0, 11, 'x'], [1, 11, 'X']] | Failed |
| zero acceptance keeps history only | [[0, 10, 'h'], [1, 10, 'H'], [0, 11, 'r'], [1, 11, 'R']] | [[0, 10, 'h'], [1, 10, 'H']] | Failed |
| reordered layer records | [[1, 12, 'B'], [0, 10, 'old'], [0, 12, 'b'], [1, 10, 'OLD']] | [[1, 12, 'B'], [0, 10, 'old'], [0, 12, 'b'], [1, 10, 'OLD']] | Passed |
| full proposal acceptance boundary | [[0, 10, 'h'], [0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B'], [0, 13, 'stale']] | [[0, 10, 'h'], [0, 11, 'a'], [1, 11, 'A'], [0, 12, 'b'], [1, 12, 'B']] | Failed |
| empty cache | [] | [] | Passed |
| duplicate records remain duplicated | [[0, 11, 'x'], [0, 11, 'x'], [1, 11, 'X'], [1, 12, 'R']] | [[0, 11, 'x'], [0, 11, 'x'], [1, 11, 'X']] | Failed |
SHA-256 / 8d412f6a177b21c680835768b47bc7d3cc7bac675ed1cb4add336e4397327a31
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.598966+00:00.
Case digest / cd9b9c3f91b17be42ef700c4c90197ef265c9e0c28b7bf376986a1c668afe118