FAILURE MAP
← Case archive

FA-10506 / Caching / Open access

An older refresh completion overwrites a newer cached representation · case 01

An older refresh completion overwrites a newer cached representation.

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

ROOT CAUSE

Completion arrival order replaces authoritative version ordering.

VERIFIED REPAIR

Preserve the cache-state invariant: Entries are [globally comparable integer version,value]. Install incoming only when its version is strictly greater; equal or older completions preserve current state.

Unsuccessful approach: Requiring a gap larger than one rejects the immediate next valid revision.

Case contract

Entries are [globally comparable integer version,value]. Install incoming only when its version is strictly greater; equal or older completions preserve current state.

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, incoming):
    return list(incoming)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([3, 'new'], [2, 'old'])), [3, 'new'])
check('fixture 2', solve(*([3, 'old'], [4, 'new'])), [4, 'new'])
check('fixture 3', solve(*([3, 'kept'], [3, 'duplicate'])), [3, 'kept'])
check('fixture 4', solve(*([0, None], [5, 'value'])), [5, 'value'])
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 1[2, 'old'][3, 'new']Failed
fixture 2[4, 'new'][4, 'new']Passed
fixture 3[3, 'duplicate'][3, 'kept']Failed
fixture 4[5, 'value'][5, 'value']Passed

SHA-256 / 110c15001ea4d4777198e9f7d893573cee44600c407d269a53bb56081717badc

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(entry, incoming):
    return list(incoming) if incoming[0]>entry[0]+1 else list(entry)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([3, 'new'], [2, 'old'])), [3, 'new'])
check('fixture 2', solve(*([3, 'old'], [4, 'new'])), [4, 'new'])
check('fixture 3', solve(*([3, 'kept'], [3, 'duplicate'])), [3, 'kept'])
check('fixture 4', solve(*([0, None], [5, 'value'])), [5, 'value'])
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 1[3, 'new'][3, 'new']Passed
fixture 2[3, 'old'][4, 'new']Failed
fixture 3[3, 'kept'][3, 'kept']Passed
fixture 4[5, 'value'][5, 'value']Passed

SHA-256 / 74e6093311b261227dd0b4c1bfb533da608126a49413c8d632bed129f78b41e8

3 / The verified repair

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

N = 1
observations = []
def solve(entry, incoming):
    return list(incoming) if incoming[0]>entry[0] else list(entry)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([3, 'new'], [2, 'old'])), [3, 'new'])
check('fixture 2', solve(*([3, 'old'], [4, 'new'])), [4, 'new'])
check('fixture 3', solve(*([3, 'kept'], [3, 'duplicate'])), [3, 'kept'])
check('fixture 4', solve(*([0, None], [5, 'value'])), [5, 'value'])
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 1[3, 'new'][3, 'new']Passed
fixture 2[4, 'new'][4, 'new']Passed
fixture 3[3, 'kept'][3, 'kept']Passed
fixture 4[5, 'value'][5, 'value']Passed

SHA-256 / 2d245f60bf8a7feeda636a8a555debbe90e4cc07bc96d93b9b857b2a41a05c78

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

Case digest / faed05f7635531b8c3cd7f897800a2386ba9f8b619c60191900ead0e0320cb39