FAILURE MAP
← Case archive

FA-46446 / Bounded deques / Open access

Reacquired deque block keeps its previous incarnation · case 01

Reacquired deque block keeps its previous incarnation.

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

ROOT CAUSE

Reacquired deque block keeps its previous incarnation.

VERIFIED REPAIR

Restore the documented incarnation invariant in block-acquire.

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

Case contract

Acquire a deque block from a LIFO free pool or a fresh monotonic ID. Increment its incarnation, clear every slot and initialize zero occupancy and owned state.

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,fresh,generations,width=x
    identity=pool[-1] if pool else fresh
    remaining=pool[:-1] if pool else []
    next_id=fresh if pool else fresh+1
    generation=generations.get(identity,0)
    slots=[None]*width
    used=0
    state='owned'
    return [identity,remaining,next_id,generation,slots,used,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[3,7],9,{7:N},4]), {1: [7, [3], 9, 2, [None, None, None, None], 0, 'owned'], 2: [7, [3], 9, 3, [None, None, None, None], 0, 'owned'], 3: [7, [3], 9, 4, [None, None, None, None], 0, 'owned'], 4: [7, [3], 9, 5, [None, None, None, None], 0, 'owned'], 5: [7, [3], 9, 6, [None, None, None, None], 0, 'owned']}[N])
check('1', solve([[],9,{},3]), {1: [9, [], 10, 1, [None, None, None], 0, 'owned'], 2: [9, [], 10, 1, [None, None, None], 0, 'owned'], 3: [9, [], 10, 1, [None, None, None], 0, 'owned'], 4: [9, [], 10, 1, [None, None, None], 0, 'owned'], 5: [9, [], 10, 1, [None, None, None], 0, 'owned']}[N])
check('2', solve([[2],7,{2:N+1},1]), {1: [2, [], 7, 3, [None], 0, 'owned'], 2: [2, [], 7, 4, [None], 0, 'owned'], 3: [2, [], 7, 5, [None], 0, 'owned'], 4: [2, [], 7, 6, [None], 0, 'owned'], 5: [2, [], 7, 7, [None], 0, 'owned']}[N])
check('3', solve([[1,4,6],8,{6:N+2},2]), {1: [6, [1, 4], 8, 4, [None, None], 0, 'owned'], 2: [6, [1, 4], 8, 5, [None, None], 0, 'owned'], 3: [6, [1, 4], 8, 6, [None, None], 0, 'owned'], 4: [6, [1, 4], 8, 7, [None, None], 0, 'owned'], 5: [6, [1, 4], 8, 8, [None, None], 0, 'owned']}[N])
check('4', solve([[],N+10,{},5]), {1: [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'], 2: [12, [], 13, 1, [None, None, None, None, None], 0, 'owned'], 3: [13, [], 14, 1, [None, None, None, None, None], 0, 'owned'], 4: [14, [], 15, 1, [None, None, None, None, None], 0, 'owned'], 5: [15, [], 16, 1, [None, None, None, None, None], 0, 'owned']}[N])
check('5', solve([[4,8],11,{8:0},0]), {1: [8, [4], 11, 1, [], 0, 'owned'], 2: [8, [4], 11, 1, [], 0, 'owned'], 3: [8, [4], 11, 1, [], 0, 'owned'], 4: [8, [4], 11, 1, [], 0, 'owned'], 5: [8, [4], 11, 1, [], 0, 'owned']}[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[7, [3], 9, 1, [None, None, None, None], 0, 'owned'][7, [3], 9, 2, [None, None, None, None], 0, 'owned']Failed
1[9, [], 10, 0, [None, None, None], 0, 'owned'][9, [], 10, 1, [None, None, None], 0, 'owned']Failed
2[2, [], 7, 2, [None], 0, 'owned'][2, [], 7, 3, [None], 0, 'owned']Failed
3[6, [1, 4], 8, 3, [None, None], 0, 'owned'][6, [1, 4], 8, 4, [None, None], 0, 'owned']Failed
4[11, [], 12, 0, [None, None, None, None, None], 0, 'owned'][11, [], 12, 1, [None, None, None, None, None], 0, 'owned']Failed
5[8, [4], 11, 0, [], 0, 'owned'][8, [4], 11, 1, [], 0, 'owned']Failed

SHA-256 / 04f6bec36d54b8a5e1ddaed1b84905a59df40849cb222a378bef6c5ab9940aa7

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    pool,fresh,generations,width=x
    identity=pool[-1] if pool else fresh
    remaining=pool[:-1] if pool else []
    next_id=fresh if pool else fresh+1
    generation=1 if identity not in generations else generations[identity]
    slots=[None]*width
    used=0
    state='owned'
    return [identity,remaining,next_id,generation,slots,used,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[3,7],9,{7:N},4]), {1: [7, [3], 9, 2, [None, None, None, None], 0, 'owned'], 2: [7, [3], 9, 3, [None, None, None, None], 0, 'owned'], 3: [7, [3], 9, 4, [None, None, None, None], 0, 'owned'], 4: [7, [3], 9, 5, [None, None, None, None], 0, 'owned'], 5: [7, [3], 9, 6, [None, None, None, None], 0, 'owned']}[N])
check('1', solve([[],9,{},3]), {1: [9, [], 10, 1, [None, None, None], 0, 'owned'], 2: [9, [], 10, 1, [None, None, None], 0, 'owned'], 3: [9, [], 10, 1, [None, None, None], 0, 'owned'], 4: [9, [], 10, 1, [None, None, None], 0, 'owned'], 5: [9, [], 10, 1, [None, None, None], 0, 'owned']}[N])
check('2', solve([[2],7,{2:N+1},1]), {1: [2, [], 7, 3, [None], 0, 'owned'], 2: [2, [], 7, 4, [None], 0, 'owned'], 3: [2, [], 7, 5, [None], 0, 'owned'], 4: [2, [], 7, 6, [None], 0, 'owned'], 5: [2, [], 7, 7, [None], 0, 'owned']}[N])
check('3', solve([[1,4,6],8,{6:N+2},2]), {1: [6, [1, 4], 8, 4, [None, None], 0, 'owned'], 2: [6, [1, 4], 8, 5, [None, None], 0, 'owned'], 3: [6, [1, 4], 8, 6, [None, None], 0, 'owned'], 4: [6, [1, 4], 8, 7, [None, None], 0, 'owned'], 5: [6, [1, 4], 8, 8, [None, None], 0, 'owned']}[N])
check('4', solve([[],N+10,{},5]), {1: [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'], 2: [12, [], 13, 1, [None, None, None, None, None], 0, 'owned'], 3: [13, [], 14, 1, [None, None, None, None, None], 0, 'owned'], 4: [14, [], 15, 1, [None, None, None, None, None], 0, 'owned'], 5: [15, [], 16, 1, [None, None, None, None, None], 0, 'owned']}[N])
check('5', solve([[4,8],11,{8:0},0]), {1: [8, [4], 11, 1, [], 0, 'owned'], 2: [8, [4], 11, 1, [], 0, 'owned'], 3: [8, [4], 11, 1, [], 0, 'owned'], 4: [8, [4], 11, 1, [], 0, 'owned'], 5: [8, [4], 11, 1, [], 0, 'owned']}[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[7, [3], 9, 1, [None, None, None, None], 0, 'owned'][7, [3], 9, 2, [None, None, None, None], 0, 'owned']Failed
1[9, [], 10, 1, [None, None, None], 0, 'owned'][9, [], 10, 1, [None, None, None], 0, 'owned']Passed
2[2, [], 7, 2, [None], 0, 'owned'][2, [], 7, 3, [None], 0, 'owned']Failed
3[6, [1, 4], 8, 3, [None, None], 0, 'owned'][6, [1, 4], 8, 4, [None, None], 0, 'owned']Failed
4[11, [], 12, 1, [None, None, None, None, None], 0, 'owned'][11, [], 12, 1, [None, None, None, None, None], 0, 'owned']Passed
5[8, [4], 11, 0, [], 0, 'owned'][8, [4], 11, 1, [], 0, 'owned']Failed

SHA-256 / d1500a32913acef26278b5ca0c1b7fdc7f8a20e6d1bbe2610a7adda55d01d26a

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    pool,fresh,generations,width=x
    identity=pool[-1] if pool else fresh
    remaining=pool[:-1] if pool else []
    next_id=fresh if pool else fresh+1
    generation=generations.get(identity,0)+1
    slots=[None]*width
    used=0
    state='owned'
    return [identity,remaining,next_id,generation,slots,used,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[3,7],9,{7:N},4]), {1: [7, [3], 9, 2, [None, None, None, None], 0, 'owned'], 2: [7, [3], 9, 3, [None, None, None, None], 0, 'owned'], 3: [7, [3], 9, 4, [None, None, None, None], 0, 'owned'], 4: [7, [3], 9, 5, [None, None, None, None], 0, 'owned'], 5: [7, [3], 9, 6, [None, None, None, None], 0, 'owned']}[N])
check('1', solve([[],9,{},3]), {1: [9, [], 10, 1, [None, None, None], 0, 'owned'], 2: [9, [], 10, 1, [None, None, None], 0, 'owned'], 3: [9, [], 10, 1, [None, None, None], 0, 'owned'], 4: [9, [], 10, 1, [None, None, None], 0, 'owned'], 5: [9, [], 10, 1, [None, None, None], 0, 'owned']}[N])
check('2', solve([[2],7,{2:N+1},1]), {1: [2, [], 7, 3, [None], 0, 'owned'], 2: [2, [], 7, 4, [None], 0, 'owned'], 3: [2, [], 7, 5, [None], 0, 'owned'], 4: [2, [], 7, 6, [None], 0, 'owned'], 5: [2, [], 7, 7, [None], 0, 'owned']}[N])
check('3', solve([[1,4,6],8,{6:N+2},2]), {1: [6, [1, 4], 8, 4, [None, None], 0, 'owned'], 2: [6, [1, 4], 8, 5, [None, None], 0, 'owned'], 3: [6, [1, 4], 8, 6, [None, None], 0, 'owned'], 4: [6, [1, 4], 8, 7, [None, None], 0, 'owned'], 5: [6, [1, 4], 8, 8, [None, None], 0, 'owned']}[N])
check('4', solve([[],N+10,{},5]), {1: [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'], 2: [12, [], 13, 1, [None, None, None, None, None], 0, 'owned'], 3: [13, [], 14, 1, [None, None, None, None, None], 0, 'owned'], 4: [14, [], 15, 1, [None, None, None, None, None], 0, 'owned'], 5: [15, [], 16, 1, [None, None, None, None, None], 0, 'owned']}[N])
check('5', solve([[4,8],11,{8:0},0]), {1: [8, [4], 11, 1, [], 0, 'owned'], 2: [8, [4], 11, 1, [], 0, 'owned'], 3: [8, [4], 11, 1, [], 0, 'owned'], 4: [8, [4], 11, 1, [], 0, 'owned'], 5: [8, [4], 11, 1, [], 0, 'owned']}[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[7, [3], 9, 2, [None, None, None, None], 0, 'owned'][7, [3], 9, 2, [None, None, None, None], 0, 'owned']Passed
1[9, [], 10, 1, [None, None, None], 0, 'owned'][9, [], 10, 1, [None, None, None], 0, 'owned']Passed
2[2, [], 7, 3, [None], 0, 'owned'][2, [], 7, 3, [None], 0, 'owned']Passed
3[6, [1, 4], 8, 4, [None, None], 0, 'owned'][6, [1, 4], 8, 4, [None, None], 0, 'owned']Passed
4[11, [], 12, 1, [None, None, None, None, None], 0, 'owned'][11, [], 12, 1, [None, None, None, None, None], 0, 'owned']Passed
5[8, [4], 11, 1, [], 0, 'owned'][8, [4], 11, 1, [], 0, 'owned']Passed

SHA-256 / 23ee30e7e8a2e63f60d772d88e4ef153563453572f54ff8c0c158a6172d81091

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

Case digest / e0aa3412e9cebd0d76d96458b5dfbf08d2c987d4d29ea26df72d8ea8333d88b8