FAILURE MAP
← Case archive

FA-46201 / Bounded deques / Open access

Partial claim commits the entire claimed prefix · case 01

Partial claim commits the entire claimed prefix.

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

ROOT CAUSE

Partial claim commits the entire claimed prefix.

VERIFIED REPAIR

Restore the documented partial ack invariant in consumer-claim.

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

Case contract

Claim a valid prefix of a bounded deque, then commit all, abort all, or commit its first item. Unconsumed claimed items rejoin ahead of unclaimed items before new entries fill remaining capacity.

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):
    items,count,action,cap,incoming=x
    claimed=items[:count]
    remaining=items[count:]
    if action=='abort': remaining=claimed+remaining
    elif action=='partial': remaining=remaining
    room=cap-len(remaining)
    accepted=incoming[:room]
    return [remaining+accepted,claimed,incoming[len(accepted):]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('abort restores head', solve([[N,N+1,N+2],2,"abort",5,[N+3,N+4,N+5]]), {1: [[1, 2, 3, 4, 5], [1, 2], [6]], 2: [[2, 3, 4, 5, 6], [2, 3], [7]], 3: [[3, 4, 5, 6, 7], [3, 4], [8]], 4: [[4, 5, 6, 7, 8], [4, 5], [9]], 5: [[5, 6, 7, 8, 9], [5, 6], [10]]}[N])
check('partial claim', solve([[N,N+1,N+2],2,"partial",4,[N+3,N+4]]), {1: [[2, 3, 4, 5], [1, 2], []], 2: [[3, 4, 5, 6], [2, 3], []], 3: [[4, 5, 6, 7], [3, 4], []], 4: [[5, 6, 7, 8], [4, 5], []], 5: [[6, 7, 8, 9], [5, 6], []]}[N])
check('commit claim', solve([[N,N+1,N+2],2,"commit",4,[N+3,N+4,N+5,N+6]]), {1: [[3, 4, 5, 6], [1, 2], [7]], 2: [[4, 5, 6, 7], [2, 3], [8]], 3: [[5, 6, 7, 8], [3, 4], [9]], 4: [[6, 7, 8, 9], [4, 5], [10]], 5: [[7, 8, 9, 10], [5, 6], [11]]}[N])
check('zero claim', solve([[N],0,"abort",3,[N+1]]), {1: [[1, 2], [], []], 2: [[2, 3], [], []], 3: [[3, 4], [], []], 4: [[4, 5], [], []], 5: [[5, 6], [], []]}[N])
check('whole abort', solve([[N,N+1],2,"abort",2,[N+2]]), {1: [[1, 2], [1, 2], [3]], 2: [[2, 3], [2, 3], [4]], 3: [[3, 4], [3, 4], [5]], 4: [[4, 5], [4, 5], [6]], 5: [[5, 6], [5, 6], [7]]}[N])
check('single partial', solve([[N,N+1],1,"partial",3,[N+2]]), {1: [[2, 3], [1], []], 2: [[3, 4], [2], []], 3: [[4, 5], [3], []], 4: [[5, 6], [4], []], 5: [[6, 7], [5], []]}[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
abort restores head[[1, 2, 3, 4, 5], [1, 2], [6]][[1, 2, 3, 4, 5], [1, 2], [6]]Passed
partial claim[[3, 4, 5], [1, 2], []][[2, 3, 4, 5], [1, 2], []]Failed
commit claim[[3, 4, 5, 6], [1, 2], [7]][[3, 4, 5, 6], [1, 2], [7]]Passed
zero claim[[1, 2], [], []][[1, 2], [], []]Passed
whole abort[[1, 2], [1, 2], [3]][[1, 2], [1, 2], [3]]Passed
single partial[[2, 3], [1], []][[2, 3], [1], []]Passed

SHA-256 / 48da0612c441c91c664030e077a9e89314bdc73dbfaf5edd8628198767516676

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    items,count,action,cap,incoming=x
    claimed=items[:count]
    remaining=items[count:]
    if action=='abort': remaining=claimed+remaining
    elif action=='partial': remaining=claimed[1:]+remaining if count<=1 else remaining
    room=cap-len(remaining)
    accepted=incoming[:room]
    return [remaining+accepted,claimed,incoming[len(accepted):]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('abort restores head', solve([[N,N+1,N+2],2,"abort",5,[N+3,N+4,N+5]]), {1: [[1, 2, 3, 4, 5], [1, 2], [6]], 2: [[2, 3, 4, 5, 6], [2, 3], [7]], 3: [[3, 4, 5, 6, 7], [3, 4], [8]], 4: [[4, 5, 6, 7, 8], [4, 5], [9]], 5: [[5, 6, 7, 8, 9], [5, 6], [10]]}[N])
check('partial claim', solve([[N,N+1,N+2],2,"partial",4,[N+3,N+4]]), {1: [[2, 3, 4, 5], [1, 2], []], 2: [[3, 4, 5, 6], [2, 3], []], 3: [[4, 5, 6, 7], [3, 4], []], 4: [[5, 6, 7, 8], [4, 5], []], 5: [[6, 7, 8, 9], [5, 6], []]}[N])
check('commit claim', solve([[N,N+1,N+2],2,"commit",4,[N+3,N+4,N+5,N+6]]), {1: [[3, 4, 5, 6], [1, 2], [7]], 2: [[4, 5, 6, 7], [2, 3], [8]], 3: [[5, 6, 7, 8], [3, 4], [9]], 4: [[6, 7, 8, 9], [4, 5], [10]], 5: [[7, 8, 9, 10], [5, 6], [11]]}[N])
check('zero claim', solve([[N],0,"abort",3,[N+1]]), {1: [[1, 2], [], []], 2: [[2, 3], [], []], 3: [[3, 4], [], []], 4: [[4, 5], [], []], 5: [[5, 6], [], []]}[N])
check('whole abort', solve([[N,N+1],2,"abort",2,[N+2]]), {1: [[1, 2], [1, 2], [3]], 2: [[2, 3], [2, 3], [4]], 3: [[3, 4], [3, 4], [5]], 4: [[4, 5], [4, 5], [6]], 5: [[5, 6], [5, 6], [7]]}[N])
check('single partial', solve([[N,N+1],1,"partial",3,[N+2]]), {1: [[2, 3], [1], []], 2: [[3, 4], [2], []], 3: [[4, 5], [3], []], 4: [[5, 6], [4], []], 5: [[6, 7], [5], []]}[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
abort restores head[[1, 2, 3, 4, 5], [1, 2], [6]][[1, 2, 3, 4, 5], [1, 2], [6]]Passed
partial claim[[3, 4, 5], [1, 2], []][[2, 3, 4, 5], [1, 2], []]Failed
commit claim[[3, 4, 5, 6], [1, 2], [7]][[3, 4, 5, 6], [1, 2], [7]]Passed
zero claim[[1, 2], [], []][[1, 2], [], []]Passed
whole abort[[1, 2], [1, 2], [3]][[1, 2], [1, 2], [3]]Passed
single partial[[2, 3], [1], []][[2, 3], [1], []]Passed

SHA-256 / 9a776742c863fd856a0fc8d1f0b851a0fce8999af80c4ca4518fbf9720d0381f

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    items,count,action,cap,incoming=x
    claimed=items[:count]
    remaining=items[count:]
    if action=='abort': remaining=claimed+remaining
    elif action=='partial': remaining=claimed[1:]+remaining
    room=cap-len(remaining)
    accepted=incoming[:room]
    return [remaining+accepted,claimed,incoming[len(accepted):]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('abort restores head', solve([[N,N+1,N+2],2,"abort",5,[N+3,N+4,N+5]]), {1: [[1, 2, 3, 4, 5], [1, 2], [6]], 2: [[2, 3, 4, 5, 6], [2, 3], [7]], 3: [[3, 4, 5, 6, 7], [3, 4], [8]], 4: [[4, 5, 6, 7, 8], [4, 5], [9]], 5: [[5, 6, 7, 8, 9], [5, 6], [10]]}[N])
check('partial claim', solve([[N,N+1,N+2],2,"partial",4,[N+3,N+4]]), {1: [[2, 3, 4, 5], [1, 2], []], 2: [[3, 4, 5, 6], [2, 3], []], 3: [[4, 5, 6, 7], [3, 4], []], 4: [[5, 6, 7, 8], [4, 5], []], 5: [[6, 7, 8, 9], [5, 6], []]}[N])
check('commit claim', solve([[N,N+1,N+2],2,"commit",4,[N+3,N+4,N+5,N+6]]), {1: [[3, 4, 5, 6], [1, 2], [7]], 2: [[4, 5, 6, 7], [2, 3], [8]], 3: [[5, 6, 7, 8], [3, 4], [9]], 4: [[6, 7, 8, 9], [4, 5], [10]], 5: [[7, 8, 9, 10], [5, 6], [11]]}[N])
check('zero claim', solve([[N],0,"abort",3,[N+1]]), {1: [[1, 2], [], []], 2: [[2, 3], [], []], 3: [[3, 4], [], []], 4: [[4, 5], [], []], 5: [[5, 6], [], []]}[N])
check('whole abort', solve([[N,N+1],2,"abort",2,[N+2]]), {1: [[1, 2], [1, 2], [3]], 2: [[2, 3], [2, 3], [4]], 3: [[3, 4], [3, 4], [5]], 4: [[4, 5], [4, 5], [6]], 5: [[5, 6], [5, 6], [7]]}[N])
check('single partial', solve([[N,N+1],1,"partial",3,[N+2]]), {1: [[2, 3], [1], []], 2: [[3, 4], [2], []], 3: [[4, 5], [3], []], 4: [[5, 6], [4], []], 5: [[6, 7], [5], []]}[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
abort restores head[[1, 2, 3, 4, 5], [1, 2], [6]][[1, 2, 3, 4, 5], [1, 2], [6]]Passed
partial claim[[2, 3, 4, 5], [1, 2], []][[2, 3, 4, 5], [1, 2], []]Passed
commit claim[[3, 4, 5, 6], [1, 2], [7]][[3, 4, 5, 6], [1, 2], [7]]Passed
zero claim[[1, 2], [], []][[1, 2], [], []]Passed
whole abort[[1, 2], [1, 2], [3]][[1, 2], [1, 2], [3]]Passed
single partial[[2, 3], [1], []][[2, 3], [1], []]Passed

SHA-256 / 9465b75cc60aeb37dfdc15b28874e7e2399a2d8d036e5d3872726b3f2869c592

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

Case digest / dc79668ed29e3a29933e79fcadf0128925d5e9305d225767028f4d1ef201ee94