FAILURE MAP
← Case archive

FA-98616 / KV cache position mapping / Open access

Batch row ownership follows request IDs · case 01

Cache rows are assigned by transient request list position.

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

ROOT CAUSE

The batch reorder step assumes the input order is the stable cache owner order.

THE FAILURE

The batch reorder step assumes the input order is the stable cache owner order.

Unsuccessful approach: Returning rows by owner-table iteration ignores the requested batch order.

Case contract

Given request_id to row mapping and an ordered ID list, return corresponding rows; unknown IDs map to None.

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(owners, request_ids):
    return [list(owners.values())[i] if i<len(owners) else None for i,_ in enumerate(request_ids)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
owners={'a':['A'],'b':['B'],'c':['C']}
check('reordered batch',solve(owners,['c','a']),[['C'],['A']])
check('unknown owner',solve(owners,['x']),[None])
check('repeat request',solve(owners,['b','b']),[['B'],['B']])
check('empty request',solve(owners,[]),[])
check('empty owners',solve({},['a']),[None])
check('original order',solve(owners,['a','b','c']),[['A'],['B'],['C']])
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
reordered batch[['A'], ['B']][['C'], ['A']]Failed
unknown owner[['A']][None]Failed
repeat request[['A'], ['B']][['B'], ['B']]Failed
empty request[][]Passed
empty owners[None][None]Passed
original order[['A'], ['B'], ['C']][['A'], ['B'], ['C']]Passed

SHA-256 / d43c43ab3583b4a0c8f6c577e46ab45f4dd0744470088c6b1f12617dee06363e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(owners, request_ids):
    return [owners[k] for k in owners if k in request_ids]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
owners={'a':['A'],'b':['B'],'c':['C']}
check('reordered batch',solve(owners,['c','a']),[['C'],['A']])
check('unknown owner',solve(owners,['x']),[None])
check('repeat request',solve(owners,['b','b']),[['B'],['B']])
check('empty request',solve(owners,[]),[])
check('empty owners',solve({},['a']),[None])
check('original order',solve(owners,['a','b','c']),[['A'],['B'],['C']])
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
reordered batch[['A'], ['C']][['C'], ['A']]Failed
unknown owner[][None]Failed
repeat request[['B']][['B'], ['B']]Failed
empty request[][]Passed
empty owners[][None]Failed
original order[['A'], ['B'], ['C']][['A'], ['B'], ['C']]Passed

SHA-256 / 7363668da90197456d46b94ac4525a0e1834d21cb39f123296843b5bef16acb8

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

Case digest / 2d850f419f3dcfbdae7d3bef7cabbaa85fcbd282f5e04840d558480d08355e52