FAILURE MAP
← Case archive

FA-46481 / Bounded deques / Open access

Zero-sized free cache retains all released blocks · case 01

Zero-sized free cache retains all released blocks.

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

ROOT CAUSE

Zero-sized free cache retains all released blocks.

THE FAILURE

Zero-sized free cache retains all released blocks.

Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.

Case contract

A deque block with outstanding borrowers cannot be freed. Otherwise clear its live references, append to a bounded free-block cache and dispose the oldest surplus block identities.

Why this case matters

Controlled bounded deque implementation model with explicit storage and lifecycle observations.

1 / The failure

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

N = 1
observations = []
def solve(x):
    pool,identity,borrowed,limit,live=x
    if borrowed:return [pool,False,live,[]]
    references=[]
    combined=pool+[identity]
    saved=combined[-limit:]
    disposed=combined[:len(combined)-len(saved)]
    return [saved,True,references,disposed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[1,2],3,False,2,[N,N+1]]), {1: [[2, 3], True, [], [1]], 2: [[2, 3], True, [], [1]], 3: [[2, 3], True, [], [1]], 4: [[2, 3], True, [], [1]], 5: [[2, 3], True, [], [1]]}[N])
check('1', solve([[1],2,True,3,[N]]), {1: [[1], False, [1], []], 2: [[1], False, [2], []], 3: [[1], False, [3], []], 4: [[1], False, [4], []], 5: [[1], False, [5], []]}[N])
check('2', solve([[],4,False,0,[N,N+1]]), {1: [[], True, [], [4]], 2: [[], True, [], [4]], 3: [[], True, [], [4]], 4: [[], True, [], [4]], 5: [[], True, [], [4]]}[N])
check('3', solve([[2],5,False,3,[N]]), {1: [[2, 5], True, [], []], 2: [[2, 5], True, [], []], 3: [[2, 5], True, [], []], 4: [[2, 5], True, [], []], 5: [[2, 5], True, [], []]}[N])
check('4', solve([[1,2,3],4,False,1,[N]]), {1: [[4], True, [], [1, 2, 3]], 2: [[4], True, [], [1, 2, 3]], 3: [[4], True, [], [1, 2, 3]], 4: [[4], True, [], [1, 2, 3]], 5: [[4], True, [], [1, 2, 3]]}[N])
check('5', solve([[],7,False,2,[]]), {1: [[7], True, [], []], 2: [[7], True, [], []], 3: [[7], True, [], []], 4: [[7], True, [], []], 5: [[7], True, [], []]}[N])
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
0[[2, 3], True, [], [1]][[2, 3], True, [], [1]]Passed
1[[1], False, [1], []][[1], False, [1], []]Passed
2[[4], True, [], []][[], True, [], [4]]Failed
3[[2, 5], True, [], []][[2, 5], True, [], []]Passed
4[[4], True, [], [1, 2, 3]][[4], True, [], [1, 2, 3]]Passed
5[[7], True, [], []][[7], True, [], []]Passed

SHA-256 / 2b42e59884bb837f79233ee9c778eee4ac9920b758e381c811b7c138f298c258

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    pool,identity,borrowed,limit,live=x
    if borrowed:return [pool,False,live,[]]
    references=[]
    combined=pool+[identity]
    saved=combined[-limit:] if limit or live else []
    disposed=combined[:len(combined)-len(saved)]
    return [saved,True,references,disposed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[1,2],3,False,2,[N,N+1]]), {1: [[2, 3], True, [], [1]], 2: [[2, 3], True, [], [1]], 3: [[2, 3], True, [], [1]], 4: [[2, 3], True, [], [1]], 5: [[2, 3], True, [], [1]]}[N])
check('1', solve([[1],2,True,3,[N]]), {1: [[1], False, [1], []], 2: [[1], False, [2], []], 3: [[1], False, [3], []], 4: [[1], False, [4], []], 5: [[1], False, [5], []]}[N])
check('2', solve([[],4,False,0,[N,N+1]]), {1: [[], True, [], [4]], 2: [[], True, [], [4]], 3: [[], True, [], [4]], 4: [[], True, [], [4]], 5: [[], True, [], [4]]}[N])
check('3', solve([[2],5,False,3,[N]]), {1: [[2, 5], True, [], []], 2: [[2, 5], True, [], []], 3: [[2, 5], True, [], []], 4: [[2, 5], True, [], []], 5: [[2, 5], True, [], []]}[N])
check('4', solve([[1,2,3],4,False,1,[N]]), {1: [[4], True, [], [1, 2, 3]], 2: [[4], True, [], [1, 2, 3]], 3: [[4], True, [], [1, 2, 3]], 4: [[4], True, [], [1, 2, 3]], 5: [[4], True, [], [1, 2, 3]]}[N])
check('5', solve([[],7,False,2,[]]), {1: [[7], True, [], []], 2: [[7], True, [], []], 3: [[7], True, [], []], 4: [[7], True, [], []], 5: [[7], True, [], []]}[N])
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
0[[2, 3], True, [], [1]][[2, 3], True, [], [1]]Passed
1[[1], False, [1], []][[1], False, [1], []]Passed
2[[4], True, [], []][[], True, [], [4]]Failed
3[[2, 5], True, [], []][[2, 5], True, [], []]Passed
4[[4], True, [], [1, 2, 3]][[4], True, [], [1, 2, 3]]Passed
5[[7], True, [], []][[7], True, [], []]Passed

SHA-256 / 1da5dc189dd8d08fba450c2c6ed1dce77c06f1f742251a73508e85f60e97120c

HELD IN THE MEMBER ARCHIVE

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

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

Offline finite deterministic model; no claim of production implementation or concurrent memory-model conformance. 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:44:32.557073+00:00.

Case digest / b1e7a611d140faa0691176c62fdbc4abf3be6cb348afea2bc53c05865e21708e