FAILURE MAP
← Case archive

FA-10511 / Caching / Open access

An expiration sweep stops at a live entry and leaves later expired entries · case 01

An expiration sweep stops at a live entry and leaves later expired entries.

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

ROOT CAUSE

An access-ordered cache is incorrectly treated as expiration-ordered.

THE FAILURE

An access-ordered cache is incorrectly treated as expiration-ordered.

Unsuccessful approach: Scanning all entries while making expiration inclusive leaves entries at their deadline.

Case contract

Entries have arbitrary order and are [key,exclusive expiration timestamp]. Sweep every expired entry while preserving survivor order; do not assume expiration and recency share 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(entries, now):
    out=list(entries)
    while out and out[0][1]<=now:
        out.pop(0)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['a', 20], ['b', 5], ['c', 30]], 10)), [['a', 20], ['c', 30]])
check('fixture 2', solve(*([['a', 10], ['b', 11]], 10)), [['b', 11]])
check('fixture 3', solve(*([], 10)), [])
check('fixture 4', solve(*([['a', 1], ['b', 2]], 10)), [])
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[['a', 20], ['b', 5], ['c', 30]][['a', 20], ['c', 30]]Failed
fixture 2[['b', 11]][['b', 11]]Passed
fixture 3[][]Passed
fixture 4[][]Passed

SHA-256 / 1bbe6fefaf963aaf46bd52d60aaa6e58a1b8bdf4da6b42cfd0547430f9f9516b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(entries, now):
    return [x for x in entries if x[1]>=now]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['a', 20], ['b', 5], ['c', 30]], 10)), [['a', 20], ['c', 30]])
check('fixture 2', solve(*([['a', 10], ['b', 11]], 10)), [['b', 11]])
check('fixture 3', solve(*([], 10)), [])
check('fixture 4', solve(*([['a', 1], ['b', 2]], 10)), [])
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[['a', 20], ['c', 30]][['a', 20], ['c', 30]]Passed
fixture 2[['a', 10], ['b', 11]][['b', 11]]Failed
fixture 3[][]Passed
fixture 4[][]Passed

SHA-256 / 032a03d76b6d5fffcd27b7eb25a13e5904d0cafdea6af152db1a726cb7a497d3

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 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

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

Case digest / b1dc701fbcccd9f118d6f6accc5c8877c91ed7513dcf02106a773313fc199896