FA-10381 / Caching / Open access
A cache hit leaves the entry at the eviction end · case 01
A cache hit leaves the entry at the eviction end.
ROOT CAUSE
Successful reads do not update least-to-most-recent order.
VERIFIED REPAIR
Preserve the cache-state invariant: Given unique keys ordered least to most recent, move an existing hit to the end; misses do not alter order.
Unsuccessful approach: Moving a hit to the front makes it the next eviction victim.
Case contract
Given unique keys ordered least to most recent, move an existing hit to the end; misses do not alter order.
Why this case matters
A deterministic cache state transformation. Inputs are copied or treated as immutable; no remote storage, real clock, or concurrent interleaving is simulated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, key):
return list(order)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b', 'c'], 'a')), ['b', 'c', 'a'])
check('fixture 2', solve(*(['a', 'b', 'c'], 'c')), ['a', 'b', 'c'])
check('fixture 3', solve(*(['a'], 'absent')), ['a'])
check('fixture 4', solve(*([], 'a')), [])
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 |
|---|---|---|---|
| fixture 1 | ['a', 'b', 'c'] | ['b', 'c', 'a'] | Failed |
| fixture 2 | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / b39d4fecedc3b351f4c4bb4455ad0f00c13468da19c80f5649db1260ae386f38
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, key):
return [key]+[x for x in order if x != key] if key in order else list(order)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b', 'c'], 'a')), ['b', 'c', 'a'])
check('fixture 2', solve(*(['a', 'b', 'c'], 'c')), ['a', 'b', 'c'])
check('fixture 3', solve(*(['a'], 'absent')), ['a'])
check('fixture 4', solve(*([], 'a')), [])
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 |
|---|---|---|---|
| fixture 1 | ['a', 'b', 'c'] | ['b', 'c', 'a'] | Failed |
| fixture 2 | ['c', 'a', 'b'] | ['a', 'b', 'c'] | Failed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / e9c5dd504aa1bcbedefcc95fedbae8137b8261e8c69e0b7e5ef72e3070b8f60c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(order, key):
return [x for x in order if x != key]+[key] if key in order else list(order)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b', 'c'], 'a')), ['b', 'c', 'a'])
check('fixture 2', solve(*(['a', 'b', 'c'], 'c')), ['a', 'b', 'c'])
check('fixture 3', solve(*(['a'], 'absent')), ['a'])
check('fixture 4', solve(*([], 'a')), [])
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 |
|---|---|---|---|
| fixture 1 | ['b', 'c', 'a'] | ['b', 'c', 'a'] | Passed |
| fixture 2 | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 9877a0fdb37fd93cc1b6d30683930139abed16503ff4718e5c164b430dc8bbd6
Verification & scope
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-29T14:38:38.510988+00:00.
Case digest / 6476e380c5ed5c7b151ce207c71fbd7641fb0ffed05c342945c691cb86cc4619