FA-47056 / Bounded deques / Open access
Deque strided view reports its exclusive stop as last position · case 01
Deque strided view reports its exclusive stop as last position.
ROOT CAUSE
Deque strided view reports its exclusive stop as last position.
VERIFIED REPAIR
Restore the documented last position invariant in strided-view.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Read an explicitly valid positive- or negative-stride bounded deque view. Preserve index order, capture an epoch, and report first/last source positions or null for an empty view.
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,step,epoch=x
indices=list(range(start,stop,step))
values=[a[i] for i in indices]
length=len(indices)
version=epoch
first=indices[0] if indices else None
last=stop if indices else None
return [values,indices,length,version,first,last]
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],0,5,2,4]), {1: [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4], 2: [[2, 4, 6], [0, 2, 4], 3, 4, 0, 4], 3: [[3, 5, 7], [0, 2, 4], 3, 4, 0, 4], 4: [[4, 6, 8], [0, 2, 4], 3, 4, 0, 4], 5: [[5, 7, 9], [0, 2, 4], 3, 4, 0, 4]}[N])
check('1', solve([[N,N+1,N+2,N+3,N+4],4,-1,-2,3]), {1: [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0], 2: [[6, 4, 2], [4, 2, 0], 3, 3, 4, 0], 3: [[7, 5, 3], [4, 2, 0], 3, 3, 4, 0], 4: [[8, 6, 4], [4, 2, 0], 3, 3, 4, 0], 5: [[9, 7, 5], [4, 2, 0], 3, 3, 4, 0]}[N])
check('2', solve([[N,N+1,N+2],1,1,1,2]), {1: [[], [], 0, 2, None, None], 2: [[], [], 0, 2, None, None], 3: [[], [], 0, 2, None, None], 4: [[], [], 0, 2, None, None], 5: [[], [], 0, 2, None, None]}[N])
check('3', solve([[N],0,1,1,0]), {1: [[1], [0], 1, 0, 0, 0], 2: [[2], [0], 1, 0, 0, 0], 3: [[3], [0], 1, 0, 0, 0], 4: [[4], [0], 1, 0, 0, 0], 5: [[5], [0], 1, 0, 0, 0]}[N])
check('4', solve([[N,N+1,N+2,N+3],1,4,2,7]), {1: [[2, 4], [1, 3], 2, 7, 1, 3], 2: [[3, 5], [1, 3], 2, 7, 1, 3], 3: [[4, 6], [1, 3], 2, 7, 1, 3], 4: [[5, 7], [1, 3], 2, 7, 1, 3], 5: [[6, 8], [1, 3], 2, 7, 1, 3]}[N])
check('5', solve([[N,N+1,N+2,N+3],3,0,-1,1]), {1: [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1], 2: [[5, 4, 3], [3, 2, 1], 3, 1, 3, 1], 3: [[6, 5, 4], [3, 2, 1], 3, 1, 3, 1], 4: [[7, 6, 5], [3, 2, 1], 3, 1, 3, 1], 5: [[8, 7, 6], [3, 2, 1], 3, 1, 3, 1]}[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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 0 | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 5] | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4] | Failed |
| 1 | [[5, 3, 1], [4, 2, 0], 3, 3, 4, -1] | [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0] | Failed |
| 2 | [[], [], 0, 2, None, None] | [[], [], 0, 2, None, None] | Passed |
| 3 | [[1], [0], 1, 0, 0, 1] | [[1], [0], 1, 0, 0, 0] | Failed |
| 4 | [[2, 4], [1, 3], 2, 7, 1, 4] | [[2, 4], [1, 3], 2, 7, 1, 3] | Failed |
| 5 | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 0] | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1] | Failed |
SHA-256 / 919122badcfd857736cf5acfc07af38d2541fc652de9f0b48df243f62a7d2cc1
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,step,epoch=x
indices=list(range(start,stop,step))
values=[a[i] for i in indices]
length=len(indices)
version=epoch
first=indices[0] if indices else None
last=indices[-1] if abs(step)==1 and indices else (stop if indices else None)
return [values,indices,length,version,first,last]
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],0,5,2,4]), {1: [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4], 2: [[2, 4, 6], [0, 2, 4], 3, 4, 0, 4], 3: [[3, 5, 7], [0, 2, 4], 3, 4, 0, 4], 4: [[4, 6, 8], [0, 2, 4], 3, 4, 0, 4], 5: [[5, 7, 9], [0, 2, 4], 3, 4, 0, 4]}[N])
check('1', solve([[N,N+1,N+2,N+3,N+4],4,-1,-2,3]), {1: [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0], 2: [[6, 4, 2], [4, 2, 0], 3, 3, 4, 0], 3: [[7, 5, 3], [4, 2, 0], 3, 3, 4, 0], 4: [[8, 6, 4], [4, 2, 0], 3, 3, 4, 0], 5: [[9, 7, 5], [4, 2, 0], 3, 3, 4, 0]}[N])
check('2', solve([[N,N+1,N+2],1,1,1,2]), {1: [[], [], 0, 2, None, None], 2: [[], [], 0, 2, None, None], 3: [[], [], 0, 2, None, None], 4: [[], [], 0, 2, None, None], 5: [[], [], 0, 2, None, None]}[N])
check('3', solve([[N],0,1,1,0]), {1: [[1], [0], 1, 0, 0, 0], 2: [[2], [0], 1, 0, 0, 0], 3: [[3], [0], 1, 0, 0, 0], 4: [[4], [0], 1, 0, 0, 0], 5: [[5], [0], 1, 0, 0, 0]}[N])
check('4', solve([[N,N+1,N+2,N+3],1,4,2,7]), {1: [[2, 4], [1, 3], 2, 7, 1, 3], 2: [[3, 5], [1, 3], 2, 7, 1, 3], 3: [[4, 6], [1, 3], 2, 7, 1, 3], 4: [[5, 7], [1, 3], 2, 7, 1, 3], 5: [[6, 8], [1, 3], 2, 7, 1, 3]}[N])
check('5', solve([[N,N+1,N+2,N+3],3,0,-1,1]), {1: [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1], 2: [[5, 4, 3], [3, 2, 1], 3, 1, 3, 1], 3: [[6, 5, 4], [3, 2, 1], 3, 1, 3, 1], 4: [[7, 6, 5], [3, 2, 1], 3, 1, 3, 1], 5: [[8, 7, 6], [3, 2, 1], 3, 1, 3, 1]}[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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 0 | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 5] | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4] | Failed |
| 1 | [[5, 3, 1], [4, 2, 0], 3, 3, 4, -1] | [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0] | Failed |
| 2 | [[], [], 0, 2, None, None] | [[], [], 0, 2, None, None] | Passed |
| 3 | [[1], [0], 1, 0, 0, 0] | [[1], [0], 1, 0, 0, 0] | Passed |
| 4 | [[2, 4], [1, 3], 2, 7, 1, 4] | [[2, 4], [1, 3], 2, 7, 1, 3] | Failed |
| 5 | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1] | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1] | Passed |
SHA-256 / da40442a6f8c41fb336661883bbc1a4d2931f58fc563161ba8f0c08e7ee7730e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
a,start,stop,step,epoch=x
indices=list(range(start,stop,step))
values=[a[i] for i in indices]
length=len(indices)
version=epoch
first=indices[0] if indices else None
last=indices[-1] if indices else None
return [values,indices,length,version,first,last]
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],0,5,2,4]), {1: [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4], 2: [[2, 4, 6], [0, 2, 4], 3, 4, 0, 4], 3: [[3, 5, 7], [0, 2, 4], 3, 4, 0, 4], 4: [[4, 6, 8], [0, 2, 4], 3, 4, 0, 4], 5: [[5, 7, 9], [0, 2, 4], 3, 4, 0, 4]}[N])
check('1', solve([[N,N+1,N+2,N+3,N+4],4,-1,-2,3]), {1: [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0], 2: [[6, 4, 2], [4, 2, 0], 3, 3, 4, 0], 3: [[7, 5, 3], [4, 2, 0], 3, 3, 4, 0], 4: [[8, 6, 4], [4, 2, 0], 3, 3, 4, 0], 5: [[9, 7, 5], [4, 2, 0], 3, 3, 4, 0]}[N])
check('2', solve([[N,N+1,N+2],1,1,1,2]), {1: [[], [], 0, 2, None, None], 2: [[], [], 0, 2, None, None], 3: [[], [], 0, 2, None, None], 4: [[], [], 0, 2, None, None], 5: [[], [], 0, 2, None, None]}[N])
check('3', solve([[N],0,1,1,0]), {1: [[1], [0], 1, 0, 0, 0], 2: [[2], [0], 1, 0, 0, 0], 3: [[3], [0], 1, 0, 0, 0], 4: [[4], [0], 1, 0, 0, 0], 5: [[5], [0], 1, 0, 0, 0]}[N])
check('4', solve([[N,N+1,N+2,N+3],1,4,2,7]), {1: [[2, 4], [1, 3], 2, 7, 1, 3], 2: [[3, 5], [1, 3], 2, 7, 1, 3], 3: [[4, 6], [1, 3], 2, 7, 1, 3], 4: [[5, 7], [1, 3], 2, 7, 1, 3], 5: [[6, 8], [1, 3], 2, 7, 1, 3]}[N])
check('5', solve([[N,N+1,N+2,N+3],3,0,-1,1]), {1: [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1], 2: [[5, 4, 3], [3, 2, 1], 3, 1, 3, 1], 3: [[6, 5, 4], [3, 2, 1], 3, 1, 3, 1], 4: [[7, 6, 5], [3, 2, 1], 3, 1, 3, 1], 5: [[8, 7, 6], [3, 2, 1], 3, 1, 3, 1]}[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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 0 | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4] | [[1, 3, 5], [0, 2, 4], 3, 4, 0, 4] | Passed |
| 1 | [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0] | [[5, 3, 1], [4, 2, 0], 3, 3, 4, 0] | Passed |
| 2 | [[], [], 0, 2, None, None] | [[], [], 0, 2, None, None] | Passed |
| 3 | [[1], [0], 1, 0, 0, 0] | [[1], [0], 1, 0, 0, 0] | Passed |
| 4 | [[2, 4], [1, 3], 2, 7, 1, 3] | [[2, 4], [1, 3], 2, 7, 1, 3] | Passed |
| 5 | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1] | [[4, 3, 2], [3, 2, 1], 3, 1, 3, 1] | Passed |
SHA-256 / 024a162e41d572a256d0e395aa985a068579d6c95912c79b542587fa6136ef5c
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:37.805825+00:00.
Case digest / 05c3c76aaef601e2c3630130d129ee963fd11bd28455c982f4fde134b22df975