FA-10516 / Caching / Open access
A sliding cache read moves the deadline even when the entry has already expired · case 01
A sliding cache read moves the deadline even when the entry has already expired.
ROOT CAUSE
A stale physical record is extended after its logical lifetime has ended.
VERIFIED REPAIR
Preserve the cache-state invariant: For a physical hit strictly before exclusive expiration, set deadline to now plus nonnegative TTL. Misses and already expired records preserve their old deadline; this operation only computes the deadline.
Unsuccessful approach: Adding TTL to the old deadline accumulates time independent of actual access.
Case contract
For a physical hit strictly before exclusive expiration, set deadline to now plus nonnegative TTL. Misses and already expired records preserve their old deadline; this operation only computes the deadline.
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(expires, now, ttl, hit):
return now+ttl if hit else expires
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(10, 11, 5, True)), 10)
check('fixture 2', solve(*(10, 8, 5, True)), 13)
check('fixture 3', solve(*(10, 8, 5, False)), 10)
check('fixture 4', solve(*(10, 10, 5, True)), 10)
check('fixture 5', solve(*(10, 8, 0, True)), 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 |
|---|---|---|---|
| fixture 1 | 16 | 10 | Failed |
| fixture 2 | 13 | 13 | Passed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 15 | 10 | Failed |
| fixture 5 | 8 | 8 | Passed |
SHA-256 / b5a555ffc8fa7d09a634ed7d147c0dfdc48ec5a64705d3236ebb13ca54a16f0f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(expires, now, ttl, hit):
return expires+ttl if hit and now<expires else expires
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(10, 11, 5, True)), 10)
check('fixture 2', solve(*(10, 8, 5, True)), 13)
check('fixture 3', solve(*(10, 8, 5, False)), 10)
check('fixture 4', solve(*(10, 10, 5, True)), 10)
check('fixture 5', solve(*(10, 8, 0, True)), 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 |
|---|---|---|---|
| fixture 1 | 10 | 10 | Passed |
| fixture 2 | 15 | 13 | Failed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 10 | 10 | Passed |
| fixture 5 | 10 | 8 | Failed |
SHA-256 / 49cfdf3494387a36a35e4ee75fe8393b76679d806df259bfca821404b9851a13
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(expires, now, ttl, hit):
return now+ttl if hit and now<expires else expires
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(10, 11, 5, True)), 10)
check('fixture 2', solve(*(10, 8, 5, True)), 13)
check('fixture 3', solve(*(10, 8, 5, False)), 10)
check('fixture 4', solve(*(10, 10, 5, True)), 10)
check('fixture 5', solve(*(10, 8, 0, True)), 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 |
|---|---|---|---|
| fixture 1 | 10 | 10 | Passed |
| fixture 2 | 13 | 13 | Passed |
| fixture 3 | 10 | 10 | Passed |
| fixture 4 | 10 | 10 | Passed |
| fixture 5 | 8 | 8 | Passed |
SHA-256 / d2367205b8ef3d21ecd37d624ada59a3e8332576d57cd6f0dd08d1fa2a770658
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:39.746889+00:00.
Case digest / 4c8158608ebaad42b5c1a6a4ed1223f8ab3079f18f3631de4568df0d389c711b