FAILURE MAP
← Case archive

FA-46551 / Bounded deques / Open access

Deque block view consumes one ID per selected block · case 01

Deque block view consumes one ID per selected block.

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

ROOT CAUSE

Deque block view consumes one ID per selected block.

VERIFIED REPAIR

Restore the documented id counter invariant in block-view-fork.

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

Case contract

Create a read-only deque block-range view over a valid half-open block interval. Pin each selected block exactly once, allocate one view identity, and retain the parent owner ID.

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):
    blocks,refs,start,stop,owner,fresh=x
    selected=blocks[start:stop]
    counts=dict(refs)
    for block in selected:counts[block]+=1
    view_id=fresh
    next_id=fresh+len(selected)
    parent=owner
    writable=False
    return [selected,counts,view_id,next_id,parent,writable,len(selected)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[2,4,7],{2:1,4:N,7:2},1,3,8,9]), {1: [[4, 7], {2: 1, 4: 2, 7: 3}, 9, 10, 8, False, 2], 2: [[4, 7], {2: 1, 4: 3, 7: 3}, 9, 10, 8, False, 2], 3: [[4, 7], {2: 1, 4: 4, 7: 3}, 9, 10, 8, False, 2], 4: [[4, 7], {2: 1, 4: 5, 7: 3}, 9, 10, 8, False, 2], 5: [[4, 7], {2: 1, 4: 6, 7: 3}, 9, 10, 8, False, 2]}[N])
check('1', solve([[1],{1:N},0,1,3,6]), {1: [[1], {1: 2}, 6, 7, 3, False, 1], 2: [[1], {1: 3}, 6, 7, 3, False, 1], 3: [[1], {1: 4}, 6, 7, 3, False, 1], 4: [[1], {1: 5}, 6, 7, 3, False, 1], 5: [[1], {1: 6}, 6, 7, 3, False, 1]}[N])
check('2', solve([[2,5],{2:1,5:3},1,1,8,12]), {1: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 2: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 3: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 4: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 5: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0]}[N])
check('3', solve([[],{},0,0,4,7]), {1: [[], {}, 7, 8, 4, False, 0], 2: [[], {}, 7, 8, 4, False, 0], 3: [[], {}, 7, 8, 4, False, 0], 4: [[], {}, 7, 8, 4, False, 0], 5: [[], {}, 7, 8, 4, False, 0]}[N])
check('4', solve([[1,3,6,8],{1:1,3:N,6:2,8:1},1,3,11,14]), {1: [[3, 6], {1: 1, 3: 2, 6: 3, 8: 1}, 14, 15, 11, False, 2], 2: [[3, 6], {1: 1, 3: 3, 6: 3, 8: 1}, 14, 15, 11, False, 2], 3: [[3, 6], {1: 1, 3: 4, 6: 3, 8: 1}, 14, 15, 11, False, 2], 4: [[3, 6], {1: 1, 3: 5, 6: 3, 8: 1}, 14, 15, 11, False, 2], 5: [[3, 6], {1: 1, 3: 6, 6: 3, 8: 1}, 14, 15, 11, False, 2]}[N])
check('5', solve([[2,7],{2:N,7:2},0,2,4,8]), {1: [[2, 7], {2: 2, 7: 3}, 8, 9, 4, False, 2], 2: [[2, 7], {2: 3, 7: 3}, 8, 9, 4, False, 2], 3: [[2, 7], {2: 4, 7: 3}, 8, 9, 4, False, 2], 4: [[2, 7], {2: 5, 7: 3}, 8, 9, 4, False, 2], 5: [[2, 7], {2: 6, 7: 3}, 8, 9, 4, False, 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[[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 11, 8, False, 2][[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2]Failed
1[[1], {'1': 2}, 6, 7, 3, False, 1][[1], {'1': 2}, 6, 7, 3, False, 1]Passed
2[[], {'2': 1, '5': 3}, 12, 12, 8, False, 0][[], {'2': 1, '5': 3}, 12, 13, 8, False, 0]Failed
3[[], {}, 7, 7, 4, False, 0][[], {}, 7, 8, 4, False, 0]Failed
4[[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 16, 11, False, 2][[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 15, 11, False, 2]Failed
5[[2, 7], {'2': 2, '7': 3}, 8, 10, 4, False, 2][[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2]Failed

SHA-256 / 1c2ed29ff199a84dd2875ece5f9d8c6c2b7bcc037780a7d01640ac408bb55c3c

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    blocks,refs,start,stop,owner,fresh=x
    selected=blocks[start:stop]
    counts=dict(refs)
    for block in selected:counts[block]+=1
    view_id=fresh
    next_id=fresh+1 if not selected else fresh+len(selected)
    parent=owner
    writable=False
    return [selected,counts,view_id,next_id,parent,writable,len(selected)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[2,4,7],{2:1,4:N,7:2},1,3,8,9]), {1: [[4, 7], {2: 1, 4: 2, 7: 3}, 9, 10, 8, False, 2], 2: [[4, 7], {2: 1, 4: 3, 7: 3}, 9, 10, 8, False, 2], 3: [[4, 7], {2: 1, 4: 4, 7: 3}, 9, 10, 8, False, 2], 4: [[4, 7], {2: 1, 4: 5, 7: 3}, 9, 10, 8, False, 2], 5: [[4, 7], {2: 1, 4: 6, 7: 3}, 9, 10, 8, False, 2]}[N])
check('1', solve([[1],{1:N},0,1,3,6]), {1: [[1], {1: 2}, 6, 7, 3, False, 1], 2: [[1], {1: 3}, 6, 7, 3, False, 1], 3: [[1], {1: 4}, 6, 7, 3, False, 1], 4: [[1], {1: 5}, 6, 7, 3, False, 1], 5: [[1], {1: 6}, 6, 7, 3, False, 1]}[N])
check('2', solve([[2,5],{2:1,5:3},1,1,8,12]), {1: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 2: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 3: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 4: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 5: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0]}[N])
check('3', solve([[],{},0,0,4,7]), {1: [[], {}, 7, 8, 4, False, 0], 2: [[], {}, 7, 8, 4, False, 0], 3: [[], {}, 7, 8, 4, False, 0], 4: [[], {}, 7, 8, 4, False, 0], 5: [[], {}, 7, 8, 4, False, 0]}[N])
check('4', solve([[1,3,6,8],{1:1,3:N,6:2,8:1},1,3,11,14]), {1: [[3, 6], {1: 1, 3: 2, 6: 3, 8: 1}, 14, 15, 11, False, 2], 2: [[3, 6], {1: 1, 3: 3, 6: 3, 8: 1}, 14, 15, 11, False, 2], 3: [[3, 6], {1: 1, 3: 4, 6: 3, 8: 1}, 14, 15, 11, False, 2], 4: [[3, 6], {1: 1, 3: 5, 6: 3, 8: 1}, 14, 15, 11, False, 2], 5: [[3, 6], {1: 1, 3: 6, 6: 3, 8: 1}, 14, 15, 11, False, 2]}[N])
check('5', solve([[2,7],{2:N,7:2},0,2,4,8]), {1: [[2, 7], {2: 2, 7: 3}, 8, 9, 4, False, 2], 2: [[2, 7], {2: 3, 7: 3}, 8, 9, 4, False, 2], 3: [[2, 7], {2: 4, 7: 3}, 8, 9, 4, False, 2], 4: [[2, 7], {2: 5, 7: 3}, 8, 9, 4, False, 2], 5: [[2, 7], {2: 6, 7: 3}, 8, 9, 4, False, 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[[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 11, 8, False, 2][[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2]Failed
1[[1], {'1': 2}, 6, 7, 3, False, 1][[1], {'1': 2}, 6, 7, 3, False, 1]Passed
2[[], {'2': 1, '5': 3}, 12, 13, 8, False, 0][[], {'2': 1, '5': 3}, 12, 13, 8, False, 0]Passed
3[[], {}, 7, 8, 4, False, 0][[], {}, 7, 8, 4, False, 0]Passed
4[[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 16, 11, False, 2][[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 15, 11, False, 2]Failed
5[[2, 7], {'2': 2, '7': 3}, 8, 10, 4, False, 2][[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2]Failed

SHA-256 / 1b566d55b32388df3a03cf906a73057160fd3a361b7188fdb185f9586e41353c

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    blocks,refs,start,stop,owner,fresh=x
    selected=blocks[start:stop]
    counts=dict(refs)
    for block in selected:counts[block]+=1
    view_id=fresh
    next_id=fresh+1
    parent=owner
    writable=False
    return [selected,counts,view_id,next_id,parent,writable,len(selected)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[2,4,7],{2:1,4:N,7:2},1,3,8,9]), {1: [[4, 7], {2: 1, 4: 2, 7: 3}, 9, 10, 8, False, 2], 2: [[4, 7], {2: 1, 4: 3, 7: 3}, 9, 10, 8, False, 2], 3: [[4, 7], {2: 1, 4: 4, 7: 3}, 9, 10, 8, False, 2], 4: [[4, 7], {2: 1, 4: 5, 7: 3}, 9, 10, 8, False, 2], 5: [[4, 7], {2: 1, 4: 6, 7: 3}, 9, 10, 8, False, 2]}[N])
check('1', solve([[1],{1:N},0,1,3,6]), {1: [[1], {1: 2}, 6, 7, 3, False, 1], 2: [[1], {1: 3}, 6, 7, 3, False, 1], 3: [[1], {1: 4}, 6, 7, 3, False, 1], 4: [[1], {1: 5}, 6, 7, 3, False, 1], 5: [[1], {1: 6}, 6, 7, 3, False, 1]}[N])
check('2', solve([[2,5],{2:1,5:3},1,1,8,12]), {1: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 2: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 3: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 4: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0], 5: [[], {2: 1, 5: 3}, 12, 13, 8, False, 0]}[N])
check('3', solve([[],{},0,0,4,7]), {1: [[], {}, 7, 8, 4, False, 0], 2: [[], {}, 7, 8, 4, False, 0], 3: [[], {}, 7, 8, 4, False, 0], 4: [[], {}, 7, 8, 4, False, 0], 5: [[], {}, 7, 8, 4, False, 0]}[N])
check('4', solve([[1,3,6,8],{1:1,3:N,6:2,8:1},1,3,11,14]), {1: [[3, 6], {1: 1, 3: 2, 6: 3, 8: 1}, 14, 15, 11, False, 2], 2: [[3, 6], {1: 1, 3: 3, 6: 3, 8: 1}, 14, 15, 11, False, 2], 3: [[3, 6], {1: 1, 3: 4, 6: 3, 8: 1}, 14, 15, 11, False, 2], 4: [[3, 6], {1: 1, 3: 5, 6: 3, 8: 1}, 14, 15, 11, False, 2], 5: [[3, 6], {1: 1, 3: 6, 6: 3, 8: 1}, 14, 15, 11, False, 2]}[N])
check('5', solve([[2,7],{2:N,7:2},0,2,4,8]), {1: [[2, 7], {2: 2, 7: 3}, 8, 9, 4, False, 2], 2: [[2, 7], {2: 3, 7: 3}, 8, 9, 4, False, 2], 3: [[2, 7], {2: 4, 7: 3}, 8, 9, 4, False, 2], 4: [[2, 7], {2: 5, 7: 3}, 8, 9, 4, False, 2], 5: [[2, 7], {2: 6, 7: 3}, 8, 9, 4, False, 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[[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2][[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2]Passed
1[[1], {'1': 2}, 6, 7, 3, False, 1][[1], {'1': 2}, 6, 7, 3, False, 1]Passed
2[[], {'2': 1, '5': 3}, 12, 13, 8, False, 0][[], {'2': 1, '5': 3}, 12, 13, 8, False, 0]Passed
3[[], {}, 7, 8, 4, False, 0][[], {}, 7, 8, 4, False, 0]Passed
4[[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 15, 11, False, 2][[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 15, 11, False, 2]Passed
5[[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2][[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2]Passed

SHA-256 / 8d956068cb510968b7a6190582c2df69ba82421806319bb3d9663c768b619ec9

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

Case digest / d856dd7e8b1ab8da9bb41a0f6e7cdd0b4aabd23e35a313ef2e768622d49d81e6