FAILURE MAP
← Case archive

FA-46691 / Bounded deques / Open access

Split prefix captures a new rather than original deque epoch · case 01

Split prefix captures a new rather than original deque epoch.

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

ROOT CAUSE

Split prefix captures a new rather than original deque epoch.

THE FAILURE

Split prefix captures a new rather than original deque epoch.

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

Case contract

Split an iterator range into disjoint prefix and suffix if its length meets a positive minimum. Both halves retain the same captured deque epoch and cover every original element exactly once.

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):
    a,start,stop,minimum,epoch=x
    length=stop-start
    if length<minimum:return [None,[start,stop,epoch],a[start:stop]]
    middle=start+length//2
    prefix=[start,middle,epoch+1]
    suffix=[middle,stop,epoch]
    visited=a[start:middle]+a[middle:stop]
    return [prefix,suffix,visited]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1,N+2,N+3,N+4],1,5,2,7]), {1: [[1, 3, 7], [3, 5, 7], [2, 3, 4, 5]], 2: [[1, 3, 7], [3, 5, 7], [3, 4, 5, 6]], 3: [[1, 3, 7], [3, 5, 7], [4, 5, 6, 7]], 4: [[1, 3, 7], [3, 5, 7], [5, 6, 7, 8]], 5: [[1, 3, 7], [3, 5, 7], [6, 7, 8, 9]]}[N])
check('1', solve([[N,N+1,N+2],0,3,2,4]), {1: [[0, 1, 4], [1, 3, 4], [1, 2, 3]], 2: [[0, 1, 4], [1, 3, 4], [2, 3, 4]], 3: [[0, 1, 4], [1, 3, 4], [3, 4, 5]], 4: [[0, 1, 4], [1, 3, 4], [4, 5, 6]], 5: [[0, 1, 4], [1, 3, 4], [5, 6, 7]]}[N])
check('2', solve([[N],0,1,2,3]), {1: [None, [0, 1, 3], [1]], 2: [None, [0, 1, 3], [2]], 3: [None, [0, 1, 3], [3]], 4: [None, [0, 1, 3], [4]], 5: [None, [0, 1, 3], [5]]}[N])
check('3', solve([[],0,0,1,0]), {1: [None, [0, 0, 0], []], 2: [None, [0, 0, 0], []], 3: [None, [0, 0, 0], []], 4: [None, [0, 0, 0], []], 5: [None, [0, 0, 0], []]}[N])
check('4', solve([[N,N+1,N+2,N+3],2,4,2,8]), {1: [[2, 3, 8], [3, 4, 8], [3, 4]], 2: [[2, 3, 8], [3, 4, 8], [4, 5]], 3: [[2, 3, 8], [3, 4, 8], [5, 6]], 4: [[2, 3, 8], [3, 4, 8], [6, 7]], 5: [[2, 3, 8], [3, 4, 8], [7, 8]]}[N])
check('5', solve([[N,N+1,N+2,N+3,N+4],0,5,3,1]), {1: [[0, 2, 1], [2, 5, 1], [1, 2, 3, 4, 5]], 2: [[0, 2, 1], [2, 5, 1], [2, 3, 4, 5, 6]], 3: [[0, 2, 1], [2, 5, 1], [3, 4, 5, 6, 7]], 4: [[0, 2, 1], [2, 5, 1], [4, 5, 6, 7, 8]], 5: [[0, 2, 1], [2, 5, 1], [5, 6, 7, 8, 9]]}[N])
check('short shifted remainder', solve([[N,N+1,N+2],2,3,2,6]), [None,[2,3,6],[N+2]])
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[[1, 3, 8], [3, 5, 7], [2, 3, 4, 5]][[1, 3, 7], [3, 5, 7], [2, 3, 4, 5]]Failed
1[[0, 1, 5], [1, 3, 4], [1, 2, 3]][[0, 1, 4], [1, 3, 4], [1, 2, 3]]Failed
2[None, [0, 1, 3], [1]][None, [0, 1, 3], [1]]Passed
3[None, [0, 0, 0], []][None, [0, 0, 0], []]Passed
4[[2, 3, 9], [3, 4, 8], [3, 4]][[2, 3, 8], [3, 4, 8], [3, 4]]Failed
5[[0, 2, 2], [2, 5, 1], [1, 2, 3, 4, 5]][[0, 2, 1], [2, 5, 1], [1, 2, 3, 4, 5]]Failed
short shifted remainder[None, [2, 3, 6], [3]][None, [2, 3, 6], [3]]Passed

SHA-256 / a1afb4662ca5e206d1d5194f2b33735293ebf855209d59e11a77f25195d01fa8

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    a,start,stop,minimum,epoch=x
    length=stop-start
    if length<minimum:return [None,[start,stop,epoch],a[start:stop]]
    middle=start+length//2
    prefix=[start,middle,epoch if start==0 else epoch+1]
    suffix=[middle,stop,epoch]
    visited=a[start:middle]+a[middle:stop]
    return [prefix,suffix,visited]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1,N+2,N+3,N+4],1,5,2,7]), {1: [[1, 3, 7], [3, 5, 7], [2, 3, 4, 5]], 2: [[1, 3, 7], [3, 5, 7], [3, 4, 5, 6]], 3: [[1, 3, 7], [3, 5, 7], [4, 5, 6, 7]], 4: [[1, 3, 7], [3, 5, 7], [5, 6, 7, 8]], 5: [[1, 3, 7], [3, 5, 7], [6, 7, 8, 9]]}[N])
check('1', solve([[N,N+1,N+2],0,3,2,4]), {1: [[0, 1, 4], [1, 3, 4], [1, 2, 3]], 2: [[0, 1, 4], [1, 3, 4], [2, 3, 4]], 3: [[0, 1, 4], [1, 3, 4], [3, 4, 5]], 4: [[0, 1, 4], [1, 3, 4], [4, 5, 6]], 5: [[0, 1, 4], [1, 3, 4], [5, 6, 7]]}[N])
check('2', solve([[N],0,1,2,3]), {1: [None, [0, 1, 3], [1]], 2: [None, [0, 1, 3], [2]], 3: [None, [0, 1, 3], [3]], 4: [None, [0, 1, 3], [4]], 5: [None, [0, 1, 3], [5]]}[N])
check('3', solve([[],0,0,1,0]), {1: [None, [0, 0, 0], []], 2: [None, [0, 0, 0], []], 3: [None, [0, 0, 0], []], 4: [None, [0, 0, 0], []], 5: [None, [0, 0, 0], []]}[N])
check('4', solve([[N,N+1,N+2,N+3],2,4,2,8]), {1: [[2, 3, 8], [3, 4, 8], [3, 4]], 2: [[2, 3, 8], [3, 4, 8], [4, 5]], 3: [[2, 3, 8], [3, 4, 8], [5, 6]], 4: [[2, 3, 8], [3, 4, 8], [6, 7]], 5: [[2, 3, 8], [3, 4, 8], [7, 8]]}[N])
check('5', solve([[N,N+1,N+2,N+3,N+4],0,5,3,1]), {1: [[0, 2, 1], [2, 5, 1], [1, 2, 3, 4, 5]], 2: [[0, 2, 1], [2, 5, 1], [2, 3, 4, 5, 6]], 3: [[0, 2, 1], [2, 5, 1], [3, 4, 5, 6, 7]], 4: [[0, 2, 1], [2, 5, 1], [4, 5, 6, 7, 8]], 5: [[0, 2, 1], [2, 5, 1], [5, 6, 7, 8, 9]]}[N])
check('short shifted remainder', solve([[N,N+1,N+2],2,3,2,6]), [None,[2,3,6],[N+2]])
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[[1, 3, 8], [3, 5, 7], [2, 3, 4, 5]][[1, 3, 7], [3, 5, 7], [2, 3, 4, 5]]Failed
1[[0, 1, 4], [1, 3, 4], [1, 2, 3]][[0, 1, 4], [1, 3, 4], [1, 2, 3]]Passed
2[None, [0, 1, 3], [1]][None, [0, 1, 3], [1]]Passed
3[None, [0, 0, 0], []][None, [0, 0, 0], []]Passed
4[[2, 3, 9], [3, 4, 8], [3, 4]][[2, 3, 8], [3, 4, 8], [3, 4]]Failed
5[[0, 2, 1], [2, 5, 1], [1, 2, 3, 4, 5]][[0, 2, 1], [2, 5, 1], [1, 2, 3, 4, 5]]Passed
short shifted remainder[None, [2, 3, 6], [3]][None, [2, 3, 6], [3]]Passed

SHA-256 / 4d06586bacda5f2e2483c0913485737f999df9dca5851b55b4da2cc514bc98ad

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:34.584630+00:00.

Case digest / 31fd2d33c1291420a4e8ed3274430488430ca00d4c36e3294cb9d6215d6d7eb8