FA-98601 / KV cache position mapping / Open access
Prefix cache reuse crosses namespace boundaries · case 01
Matching token prefixes are reused across incompatible cache namespaces.
ROOT CAUSE
The lookup key includes token content but omits model or adapter identity.
THE FAILURE
The lookup key includes token content but omits model or adapter identity.
Unsuccessful approach: Checking namespace equality but returning the shorter sequence length ignores a token mismatch inside that namespace.
Case contract
Return the common token prefix length only when cache_namespace equals request_namespace; otherwise return zero.
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(cache_namespace, request_namespace, cached_tokens, requested_tokens):
return sum(a==b for a,b in zip(cached_tokens,requested_tokens))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same namespace prefix',solve('m','m',['a']*N,['a']*N+['b']),N)
check('different model',solve('m1','m2',['a','b'],['a','b']),0)
check('same namespace mismatch',solve('x','x',['a','b'],['a','c']),1)
check('same namespace empty',solve('x','x',[],['a']),0)
check('different namespace empty',solve('x','y',['a'],[]),0)
check('same namespace full',solve('ad','ad',['q'],['q']),1)
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 |
|---|---|---|---|
| same namespace prefix | 1 | 1 | Passed |
| different model | 2 | 0 | Failed |
| same namespace mismatch | 1 | 1 | Passed |
| same namespace empty | 0 | 0 | Passed |
| different namespace empty | 0 | 0 | Passed |
| same namespace full | 1 | 1 | Passed |
SHA-256 / c0f17e5133a634fee01f91b2d7756054e6d8f16f992650969c46dfe8b7c30038
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cache_namespace, request_namespace, cached_tokens, requested_tokens):
return 0 if cache_namespace!=request_namespace else min(len(cached_tokens),len(requested_tokens))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same namespace prefix',solve('m','m',['a']*N,['a']*N+['b']),N)
check('different model',solve('m1','m2',['a','b'],['a','b']),0)
check('same namespace mismatch',solve('x','x',['a','b'],['a','c']),1)
check('same namespace empty',solve('x','x',[],['a']),0)
check('different namespace empty',solve('x','y',['a'],[]),0)
check('same namespace full',solve('ad','ad',['q'],['q']),1)
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 |
|---|---|---|---|
| same namespace prefix | 1 | 1 | Passed |
| different model | 0 | 0 | Passed |
| same namespace mismatch | 2 | 1 | Failed |
| same namespace empty | 0 | 0 | Passed |
| different namespace empty | 0 | 0 | Passed |
| same namespace full | 1 | 1 | Passed |
SHA-256 / 36de0d8c913eb43955c0cd9fe2f0afb88f3125d2f9db4144e0e099d71b3a5978
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.973463+00:00.
Case digest / 26879dd220025eec4a05d22672fb0e191fc9576ee0194cabd8d05b7195affe98