FAILURE MAP
← Case archive

FA-10496 / Caching / Open access

A refresh failure destroys a still-usable stale cache entry · case 01

A refresh failure destroys a still-usable stale cache entry.

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

ROOT CAUSE

Failed revalidation is treated as an authoritative deletion.

VERIFIED REPAIR

Preserve the cache-state invariant: For this stale-allowed cache policy, error preserves the prior value; success replaces it with body, including zero or None. Expiration eligibility is handled before this operation.

Unsuccessful approach: Always preserving the old entry prevents successful refresh from updating it.

Case contract

For this stale-allowed cache policy, error preserves the prior value; success replaces it with body, including zero or None. Expiration eligibility is handled before this operation.

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(entry, outcome, body):
    return None if outcome=='error' else body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*('stale', 'error', None)), 'stale')
check('fixture 2', solve(*('old', 'success', 'new')), 'new')
check('fixture 3', solve(*(None, 'success', 0)), 0)
check('fixture 4', solve(*('', 'error', None)), '')
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
fixture 1NonestaleFailed
fixture 2newnewPassed
fixture 300Passed
fixture 4NoneFailed

SHA-256 / 6f236f1531a31a414792c6c90a904144d2cd2954387f466c6f851fdff116ecf4

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(entry, outcome, body):
    return entry
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*('stale', 'error', None)), 'stale')
check('fixture 2', solve(*('old', 'success', 'new')), 'new')
check('fixture 3', solve(*(None, 'success', 0)), 0)
check('fixture 4', solve(*('', 'error', None)), '')
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
fixture 1stalestalePassed
fixture 2oldnewFailed
fixture 3None0Failed
fixture 4Passed

SHA-256 / 2f1ebe6eb07c3342836e5fb436881858b81aaa9f34ccc21fc3266e96a6525f3e

3 / The verified repair

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

N = 1
observations = []
def solve(entry, outcome, body):
    return entry if outcome=='error' else body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*('stale', 'error', None)), 'stale')
check('fixture 2', solve(*('old', 'success', 'new')), 'new')
check('fixture 3', solve(*(None, 'success', 0)), 0)
check('fixture 4', solve(*('', 'error', None)), '')
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
fixture 1stalestalePassed
fixture 2newnewPassed
fixture 300Passed
fixture 4Passed

SHA-256 / 82777af5910292c8852cd33f3ca98bcedef002f2d497cabdc3950fd4016e2e8d

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

Case digest / a7d9e9620d9d49c308ebaccde836dd7380e2372da5480b5cefc253622b0d2538