FAILURE MAP
← Case archive

FA-46561 / Bounded deques / Open access

Deque snapshot view is accidentally write-enabled · case 01

Deque snapshot view is accidentally write-enabled.

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

ROOT CAUSE

Deque snapshot view is accidentally write-enabled.

THE FAILURE

Deque snapshot view is accidentally write-enabled.

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+1
    parent=owner
    writable=True
    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, True, 2][[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2]Failed
1[[1], {'1': 2}, 6, 7, 3, True, 1][[1], {'1': 2}, 6, 7, 3, False, 1]Failed
2[[], {'2': 1, '5': 3}, 12, 13, 8, True, 0][[], {'2': 1, '5': 3}, 12, 13, 8, False, 0]Failed
3[[], {}, 7, 8, 4, True, 0][[], {}, 7, 8, 4, False, 0]Failed
4[[3, 6], {'1': 1, '3': 2, '6': 3, '8': 1}, 14, 15, 11, True, 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, 9, 4, True, 2][[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2]Failed

SHA-256 / 4b630b31bf9dcc09c5f650760a409b4604bedc03ea3e05ca27c04624418d7a47

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
    parent=owner
    writable=bool(selected)
    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, True, 2][[4, 7], {'2': 1, '4': 2, '7': 3}, 9, 10, 8, False, 2]Failed
1[[1], {'1': 2}, 6, 7, 3, True, 1][[1], {'1': 2}, 6, 7, 3, False, 1]Failed
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, True, 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, 9, 4, True, 2][[2, 7], {'2': 2, '7': 3}, 8, 9, 4, False, 2]Failed

SHA-256 / 024ab2aef375aad5cde0302b459cba122895733a43431f21701668479b22384a

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

Case digest / ecd130381e602e830568d010026372c9f4c1658df6077093101892b94eb5ea49