FAILURE MAP
← Case archive

FA-98541 / KV cache position mapping / Open access

Absolute positions map relative to the cache origin · case 01

Writes land at an absolute index instead of an index relative to the cache origin.

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

ROOT CAUSE

The address calculation writes the logical position itself as the physical slot, ignoring both origins.

THE FAILURE

The address calculation writes the logical position itself as the physical slot, ignoring both origins.

Unsuccessful approach: Subtracting the origin but dropping the physical slot origin still addresses the wrong segment.

Case contract

For inclusive logical positions [origin, position], return (logical, slot_origin + logical - origin) pairs. position before origin yields an empty list.

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(origin, slot_origin, position):
    return [(p, p) for p in range(origin, position+1)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('shifted window',solve(N,7,N+2),[(N,7),(N+1,8),(N+2,9)])
check('nonzero origin',solve(4,3,6),[(4,3),(5,4),(6,5)])
check('origin only',solve(N,2,N),[(N,2)])
check('empty range',solve(5,9,4),[])
check('large origin',solve(100,0,101),[(100,0),(101,1)])
check('different physical base',solve(2,20,3),[(2,20),(3,21)])
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
shifted window[[1, 1], [2, 2], [3, 3]][[1, 7], [2, 8], [3, 9]]Failed
nonzero origin[[4, 4], [5, 5], [6, 6]][[4, 3], [5, 4], [6, 5]]Failed
origin only[[1, 1]][[1, 2]]Failed
empty range[][]Passed
large origin[[100, 100], [101, 101]][[100, 0], [101, 1]]Failed
different physical base[[2, 2], [3, 3]][[2, 20], [3, 21]]Failed

SHA-256 / 2eba6b02359433cff93d3c9302809964df72c646f46bdb678d03b61b3b353b32

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(origin, slot_origin, position):
    return [(p, p-origin) for p in range(origin, position+1)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('shifted window',solve(N,7,N+2),[(N,7),(N+1,8),(N+2,9)])
check('nonzero origin',solve(4,3,6),[(4,3),(5,4),(6,5)])
check('origin only',solve(N,2,N),[(N,2)])
check('empty range',solve(5,9,4),[])
check('large origin',solve(100,0,101),[(100,0),(101,1)])
check('different physical base',solve(2,20,3),[(2,20),(3,21)])
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
shifted window[[1, 0], [2, 1], [3, 2]][[1, 7], [2, 8], [3, 9]]Failed
nonzero origin[[4, 0], [5, 1], [6, 2]][[4, 3], [5, 4], [6, 5]]Failed
origin only[[1, 0]][[1, 2]]Failed
empty range[][]Passed
large origin[[100, 0], [101, 1]][[100, 0], [101, 1]]Passed
different physical base[[2, 0], [3, 1]][[2, 20], [3, 21]]Failed

SHA-256 / 32306e8f40e08a690fa15ab497086c1659ebba3d1d6a4ffc93ee894762e09594

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

Case digest / 6e3f7d8af54391083994f6e748d8050eac4f03030671fd0e77c4741eced12697