FA-98571 / KV cache position mapping / Open access
Append rejects a discontinuous logical position · case 01
A skipped position is silently written as if it followed the cache tail.
ROOT CAUSE
The append path checks only that a position is larger than the last one.
THE FAILURE
The append path checks only that a position is larger than the last one.
Unsuccessful approach: Strictly requiring position zero prevents valid continuation from a trimmed prefix.
Case contract
Given cached logical positions and a candidate position, return whether the append is contiguous. Empty cache accepts any nonnegative position.
Why this case matters
A small in-memory model makes the cache address contract explicit for a serving component.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(positions, candidate):
return not positions or candidate>positions[-1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contiguous',solve([N,N+1],N+2),True)
check('gap',solve([N,N+1],N+3),False)
check('duplicate tail',solve([N,N+1],N+1),False)
check('empty starts at offset',solve([],N),True)
check('negative empty start',solve([],-1),False)
check('first position zero',solve([],0),True)
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 |
|---|---|---|---|
| contiguous | True | True | Passed |
| gap | True | False | Failed |
| duplicate tail | False | False | Passed |
| empty starts at offset | True | True | Passed |
| negative empty start | True | False | Failed |
| first position zero | True | True | Passed |
SHA-256 / 6e4324b8f35fe3f81f76f812a99c975e7e4b0ae5f47c78d86cdd33c2508cd32d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(positions, candidate):
return candidate==(positions[-1]+1 if positions else 0)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contiguous',solve([N,N+1],N+2),True)
check('gap',solve([N,N+1],N+3),False)
check('duplicate tail',solve([N,N+1],N+1),False)
check('empty starts at offset',solve([],N),True)
check('negative empty start',solve([],-1),False)
check('first position zero',solve([],0),True)
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 |
|---|---|---|---|
| contiguous | True | True | Passed |
| gap | False | False | Passed |
| duplicate tail | False | False | Passed |
| empty starts at offset | False | True | Failed |
| negative empty start | False | False | Passed |
| first position zero | True | True | Passed |
SHA-256 / b0ed4d849407ae3e121de05080ff15f2d5f4267ea5bd5633c180b746725a5170
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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 toy integer maps omit tensor layout, concurrency, device memory, and model-specific cache formats. 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:14.544523+00:00.
Case digest / 59a08fd67272666bb433b855137407f2452a7fdf0951274a48af5c83db123425