FA-98556 / KV cache position mapping / Open access
Paged cache position selects the correct block · case 01
A logical position at a page boundary is assigned to the preceding block.
ROOT CAUSE
Block selection uses a ceiling-like boundary rule.
THE FAILURE
Block selection uses a ceiling-like boundary rule.
Unsuccessful approach: Correctly selecting the block while returning the logical position as its offset breaks boundary writes.
Case contract
For nonnegative position and positive page_size, return (block_number, offset_within_block).
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(position, page_size):
return ((position+page_size-1)//page_size, position%page_size)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first page',solve(N,4),(N//4,N%4))
check('boundary',solve(8,4),(2,0))
check('last offset',solve(7,4),(1,3))
check('zero position',solve(0,5),(0,0))
check('one page size',solve(4,4),(1,0))
check('single element page',solve(N,1),(N,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| first page | [1, 1] | [0, 1] | Failed |
| boundary | [2, 0] | [2, 0] | Passed |
| last offset | [2, 3] | [1, 3] | Failed |
| zero position | [0, 0] | [0, 0] | Passed |
| one page size | [1, 0] | [1, 0] | Passed |
| single element page | [1, 0] | [1, 0] | Passed |
SHA-256 / 09e6078fc4c8af166722a375367f9f5f2498eee269c802e8b6039e34ad141ef7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(position, page_size):
return (position//page_size, position)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first page',solve(N,4),(N//4,N%4))
check('boundary',solve(8,4),(2,0))
check('last offset',solve(7,4),(1,3))
check('zero position',solve(0,5),(0,0))
check('one page size',solve(4,4),(1,0))
check('single element page',solve(N,1),(N,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| first page | [0, 1] | [0, 1] | Passed |
| boundary | [2, 8] | [2, 0] | Failed |
| last offset | [1, 7] | [1, 3] | Failed |
| zero position | [0, 0] | [0, 0] | Passed |
| one page size | [1, 4] | [1, 0] | Failed |
| single element page | [1, 1] | [1, 0] | Failed |
SHA-256 / 166c4c556f332ad221d3eac95c2b550d55ffa99c1a03e12fb779b6a098e62846
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.105598+00:00.
Case digest / 096cdb5801d73016d4741d3443de66ea4d2df412fc196f72ad67e736ef0bf8b8