FAILURE MAP
← Case archive

FA-46196 / Bounded deques / Open access

Aborted consumer claim is restored behind newer entries · case 01

Aborted consumer claim is restored behind newer entries.

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

ROOT CAUSE

Aborted consumer claim is restored behind newer entries.

VERIFIED REPAIR

Restore the documented abort order 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=remaining+claimed
    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[[3, 1, 2, 4, 5], [1, 2], [6]][[1, 2, 3, 4, 5], [1, 2], [6]]Failed
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 / bc2ae864a5a0c81da615ff3820d2ea0f4882a6f754cd45473d016a8c907d57cc

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 if count==len(items) else remaining+claimed
    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[[3, 1, 2, 4, 5], [1, 2], [6]][[1, 2, 3, 4, 5], [1, 2], [6]]Failed
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 / 9a11427182489e075e4a06c409861945c3ef16ab30c679c87dbf21761bf81b5d

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

Case digest / 25be47344ac7a0b412e4470ff5bccb621be2ed97293a305f813f216cad81dee4