FAILURE MAP
← Case archive

FA-46406 / Bounded deques / Open access

Merged right block remains live in the directory · case 01

Merged right block remains live in the directory.

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

ROOT CAUSE

Merged right block remains live in the directory.

THE FAILURE

Merged right block remains live in the directory.

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

Case contract

Merge adjacent deque storage blocks if combined occupancy fits one block. Preserve the left block ID, retire the right ID once, and advance the directory epoch only on success.

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):
    a,b,aid,bid,cap,epoch=x
    fits=len(a)+len(b)<=cap
    if not fits:return [a,b,False,aid,[],epoch]
    joined=a+b
    right=b
    identity=aid
    retired=[bid]
    version=epoch+1
    return [joined,right,True,identity,retired,version]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1],[N+2],4,5,3,0]), {1: [[1, 2, 3], [], True, 4, [5], 1], 2: [[2, 3, 4], [], True, 4, [5], 1], 3: [[3, 4, 5], [], True, 4, [5], 1], 4: [[4, 5, 6], [], True, 4, [5], 1], 5: [[5, 6, 7], [], True, 4, [5], 1]}[N])
check('1', solve([[N,N+1],[N+2,N+3],4,5,3,2]), {1: [[1, 2], [3, 4], False, 4, [], 2], 2: [[2, 3], [4, 5], False, 4, [], 2], 3: [[3, 4], [5, 6], False, 4, [], 2], 4: [[4, 5], [6, 7], False, 4, [], 2], 5: [[5, 6], [7, 8], False, 4, [], 2]}[N])
check('2', solve([[],[N,N+1],7,8,4,3]), {1: [[1, 2], [], True, 7, [8], 4], 2: [[2, 3], [], True, 7, [8], 4], 3: [[3, 4], [], True, 7, [8], 4], 4: [[4, 5], [], True, 7, [8], 4], 5: [[5, 6], [], True, 7, [8], 4]}[N])
check('3', solve([[N],[],2,6,3,4]), {1: [[1], [], True, 2, [6], 5], 2: [[2], [], True, 2, [6], 5], 3: [[3], [], True, 2, [6], 5], 4: [[4], [], True, 2, [6], 5], 5: [[5], [], True, 2, [6], 5]}[N])
check('4', solve([[],[],1,3,2,8]), {1: [[], [], True, 1, [3], 9], 2: [[], [], True, 1, [3], 9], 3: [[], [], True, 1, [3], 9], 4: [[], [], True, 1, [3], 9], 5: [[], [], True, 1, [3], 9]}[N])
check('5', solve([[N],[N+1,N+2],6,9,5,1]), {1: [[1, 2, 3], [], True, 6, [9], 2], 2: [[2, 3, 4], [], True, 6, [9], 2], 3: [[3, 4, 5], [], True, 6, [9], 2], 4: [[4, 5, 6], [], True, 6, [9], 2], 5: [[5, 6, 7], [], True, 6, [9], 2]}[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[[1, 2, 3], [3], True, 4, [5], 1][[1, 2, 3], [], True, 4, [5], 1]Failed
1[[1, 2], [3, 4], False, 4, [], 2][[1, 2], [3, 4], False, 4, [], 2]Passed
2[[1, 2], [1, 2], True, 7, [8], 4][[1, 2], [], True, 7, [8], 4]Failed
3[[1], [], True, 2, [6], 5][[1], [], True, 2, [6], 5]Passed
4[[], [], True, 1, [3], 9][[], [], True, 1, [3], 9]Passed
5[[1, 2, 3], [2, 3], True, 6, [9], 2][[1, 2, 3], [], True, 6, [9], 2]Failed

SHA-256 / 542cd348480a7668ea8f20ab6e445e4566b747e6b2ce85bf2fb11f82e3ada1bd

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    a,b,aid,bid,cap,epoch=x
    fits=len(a)+len(b)<=cap
    if not fits:return [a,b,False,aid,[],epoch]
    joined=a+b
    right=[] if len(b)<=1 else b
    identity=aid
    retired=[bid]
    version=epoch+1
    return [joined,right,True,identity,retired,version]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1],[N+2],4,5,3,0]), {1: [[1, 2, 3], [], True, 4, [5], 1], 2: [[2, 3, 4], [], True, 4, [5], 1], 3: [[3, 4, 5], [], True, 4, [5], 1], 4: [[4, 5, 6], [], True, 4, [5], 1], 5: [[5, 6, 7], [], True, 4, [5], 1]}[N])
check('1', solve([[N,N+1],[N+2,N+3],4,5,3,2]), {1: [[1, 2], [3, 4], False, 4, [], 2], 2: [[2, 3], [4, 5], False, 4, [], 2], 3: [[3, 4], [5, 6], False, 4, [], 2], 4: [[4, 5], [6, 7], False, 4, [], 2], 5: [[5, 6], [7, 8], False, 4, [], 2]}[N])
check('2', solve([[],[N,N+1],7,8,4,3]), {1: [[1, 2], [], True, 7, [8], 4], 2: [[2, 3], [], True, 7, [8], 4], 3: [[3, 4], [], True, 7, [8], 4], 4: [[4, 5], [], True, 7, [8], 4], 5: [[5, 6], [], True, 7, [8], 4]}[N])
check('3', solve([[N],[],2,6,3,4]), {1: [[1], [], True, 2, [6], 5], 2: [[2], [], True, 2, [6], 5], 3: [[3], [], True, 2, [6], 5], 4: [[4], [], True, 2, [6], 5], 5: [[5], [], True, 2, [6], 5]}[N])
check('4', solve([[],[],1,3,2,8]), {1: [[], [], True, 1, [3], 9], 2: [[], [], True, 1, [3], 9], 3: [[], [], True, 1, [3], 9], 4: [[], [], True, 1, [3], 9], 5: [[], [], True, 1, [3], 9]}[N])
check('5', solve([[N],[N+1,N+2],6,9,5,1]), {1: [[1, 2, 3], [], True, 6, [9], 2], 2: [[2, 3, 4], [], True, 6, [9], 2], 3: [[3, 4, 5], [], True, 6, [9], 2], 4: [[4, 5, 6], [], True, 6, [9], 2], 5: [[5, 6, 7], [], True, 6, [9], 2]}[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[[1, 2, 3], [], True, 4, [5], 1][[1, 2, 3], [], True, 4, [5], 1]Passed
1[[1, 2], [3, 4], False, 4, [], 2][[1, 2], [3, 4], False, 4, [], 2]Passed
2[[1, 2], [1, 2], True, 7, [8], 4][[1, 2], [], True, 7, [8], 4]Failed
3[[1], [], True, 2, [6], 5][[1], [], True, 2, [6], 5]Passed
4[[], [], True, 1, [3], 9][[], [], True, 1, [3], 9]Passed
5[[1, 2, 3], [2, 3], True, 6, [9], 2][[1, 2, 3], [], True, 6, [9], 2]Failed

SHA-256 / 6e7933e5fa2876d1371f3ce016035a5ec0eefa122ed42864b659672cc6887d7c

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

Case digest / 08b26f3fbf46584b7a4101dfb2d434f4ad75d8a16d0ca7e8167136a54b1c10ac