FA-98606 / KV cache position mapping / Open access
Rewriting a logical position replaces its prior slot · case 01
A retry creates two slot entries for the same logical position.
ROOT CAUSE
Writes append mappings without enforcing unique logical ownership.
THE FAILURE
Writes append mappings without enforcing unique logical ownership.
Unsuccessful approach: Removing every entry that uses the destination slot can delete a different logical position instead of updating only the requested position.
Case contract
Entries are ordered (logical_position, slot). Apply one update; replace that position in place or append if absent.
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(entries, logical_position, new_slot):
return entries+[(logical_position,new_slot)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('replace middle',solve([(1,4),(2,5),(3,6)],2,9),[(1,4),(2,9),(3,6)])
check('append new',solve([(1,4)],2,8),[(1,4),(2,8)])
check('move to occupied slot',solve([(1,4),(2,5)],1,5),[(1,5),(2,5)])
check('empty',solve([],N,7),[(N,7)])
check('replace only',solve([(N,2)],N,3),[(N,3)])
check('duplicate input normalized',solve([(1,4),(1,5)],1,8),[(1,8)])
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 |
|---|---|---|---|
| replace middle | [[1, 4], [2, 5], [3, 6], [2, 9]] | [[1, 4], [2, 9], [3, 6]] | Failed |
| append new | [[1, 4], [2, 8]] | [[1, 4], [2, 8]] | Passed |
| move to occupied slot | [[1, 4], [2, 5], [1, 5]] | [[1, 5], [2, 5]] | Failed |
| empty | [[1, 7]] | [[1, 7]] | Passed |
| replace only | [[1, 2], [1, 3]] | [[1, 3]] | Failed |
| duplicate input normalized | [[1, 4], [1, 5], [1, 8]] | [[1, 8]] | Failed |
SHA-256 / 412cf22d10da14a1f8e734cc6d9c71f4fcbe9a25b9da4b0222b037eaefd682b8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries, logical_position, new_slot):
out=[e for e in entries if e[1]!=new_slot]; out.append((logical_position,new_slot)); return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('replace middle',solve([(1,4),(2,5),(3,6)],2,9),[(1,4),(2,9),(3,6)])
check('append new',solve([(1,4)],2,8),[(1,4),(2,8)])
check('move to occupied slot',solve([(1,4),(2,5)],1,5),[(1,5),(2,5)])
check('empty',solve([],N,7),[(N,7)])
check('replace only',solve([(N,2)],N,3),[(N,3)])
check('duplicate input normalized',solve([(1,4),(1,5)],1,8),[(1,8)])
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 |
|---|---|---|---|
| replace middle | [[1, 4], [2, 5], [3, 6], [2, 9]] | [[1, 4], [2, 9], [3, 6]] | Failed |
| append new | [[1, 4], [2, 8]] | [[1, 4], [2, 8]] | Passed |
| move to occupied slot | [[1, 4], [1, 5]] | [[1, 5], [2, 5]] | Failed |
| empty | [[1, 7]] | [[1, 7]] | Passed |
| replace only | [[1, 2], [1, 3]] | [[1, 3]] | Failed |
| duplicate input normalized | [[1, 4], [1, 5], [1, 8]] | [[1, 8]] | Failed |
SHA-256 / b9da4345c0c8fbb53ea9b863137e282a6479b7223dbf8b21e0cede6b4547d5c0
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.973507+00:00.
Case digest / 7fcc5efef573446e22de1b45b827b913f10909a6230f1c55341c6b4555fb6611