FA-46041 / Bounded deques / Open access
Self-splice extracts the range from its successor boundary · case 01
Self-splice extracts the range from its successor boundary.
ROOT CAUSE
Self-splice extracts the range from its successor boundary.
VERIFIED REPAIR
Restore the documented snapshot range invariant in self-splice.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Move a range within one bounded deque, preserving size and stable element identity. Gaps inside or at either boundary of the range are no-ops.
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,gap = x
if start <= gap <= stop: return a
piece = a[start+1:stop+1]
rest = a[:start]+a[stop:]
new_gap = gap - (stop-start) if gap > stop else gap
return rest[:new_gap]+piece+rest[new_gap:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('move left', solve([[N,N+1,N+2,N+3,N+4],2,4,0]), {1: [3, 4, 1, 2, 5], 2: [4, 5, 2, 3, 6], 3: [5, 6, 3, 4, 7], 4: [6, 7, 4, 5, 8], 5: [7, 8, 5, 6, 9]}[N])
check('move right', solve([[N,N+1,N+2,N+3,N+4],0,2,5]), {1: [3, 4, 5, 1, 2], 2: [4, 5, 6, 2, 3], 3: [5, 6, 7, 3, 4], 4: [6, 7, 8, 4, 5], 5: [7, 8, 9, 5, 6]}[N])
check('inside no op', solve([[N,N+1,N+2,N+3],1,3,2]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('end boundary', solve([[N,N+1,N+2,N+3],1,3,3]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('empty range', solve([[N,N+1,N+2],1,1,3]), {1: [1, 2, 3], 2: [2, 3, 4], 3: [3, 4, 5], 4: [4, 5, 6], 5: [5, 6, 7]}[N])
check('interior right', solve([[N,N+1,N+2,N+3,N+4,N+5],1,3,5]), {1: [1, 4, 5, 2, 3, 6], 2: [2, 5, 6, 3, 4, 7], 3: [3, 6, 7, 4, 5, 8], 4: [4, 7, 8, 5, 6, 9], 5: [5, 8, 9, 6, 7, 10]}[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 |
|---|---|---|---|
| move left | [4, 5, 1, 2, 5] | [3, 4, 1, 2, 5] | Failed |
| move right | [3, 4, 5, 2, 3] | [3, 4, 5, 1, 2] | Failed |
| inside no op | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| end boundary | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| empty range | [1, 2, 3] | [1, 2, 3] | Passed |
| interior right | [1, 4, 5, 3, 4, 6] | [1, 4, 5, 2, 3, 6] | Failed |
SHA-256 / 79aad3bfb2c9117c1f0d8336b62093b312e10a855afa49bfc240ce4b4dc6de45
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,gap = x
if start <= gap <= stop: return a
piece = a[start:stop] if start==stop else a[start+1:stop+1]
rest = a[:start]+a[stop:]
new_gap = gap - (stop-start) if gap > stop else gap
return rest[:new_gap]+piece+rest[new_gap:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('move left', solve([[N,N+1,N+2,N+3,N+4],2,4,0]), {1: [3, 4, 1, 2, 5], 2: [4, 5, 2, 3, 6], 3: [5, 6, 3, 4, 7], 4: [6, 7, 4, 5, 8], 5: [7, 8, 5, 6, 9]}[N])
check('move right', solve([[N,N+1,N+2,N+3,N+4],0,2,5]), {1: [3, 4, 5, 1, 2], 2: [4, 5, 6, 2, 3], 3: [5, 6, 7, 3, 4], 4: [6, 7, 8, 4, 5], 5: [7, 8, 9, 5, 6]}[N])
check('inside no op', solve([[N,N+1,N+2,N+3],1,3,2]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('end boundary', solve([[N,N+1,N+2,N+3],1,3,3]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('empty range', solve([[N,N+1,N+2],1,1,3]), {1: [1, 2, 3], 2: [2, 3, 4], 3: [3, 4, 5], 4: [4, 5, 6], 5: [5, 6, 7]}[N])
check('interior right', solve([[N,N+1,N+2,N+3,N+4,N+5],1,3,5]), {1: [1, 4, 5, 2, 3, 6], 2: [2, 5, 6, 3, 4, 7], 3: [3, 6, 7, 4, 5, 8], 4: [4, 7, 8, 5, 6, 9], 5: [5, 8, 9, 6, 7, 10]}[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 |
|---|---|---|---|
| move left | [4, 5, 1, 2, 5] | [3, 4, 1, 2, 5] | Failed |
| move right | [3, 4, 5, 2, 3] | [3, 4, 5, 1, 2] | Failed |
| inside no op | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| end boundary | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| empty range | [1, 2, 3] | [1, 2, 3] | Passed |
| interior right | [1, 4, 5, 3, 4, 6] | [1, 4, 5, 2, 3, 6] | Failed |
SHA-256 / 541cb8df202ea9eef6256b37841a9586f7697e841137cc5cdc40228b9e590337
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,gap = x
if start <= gap <= stop: return a
piece = a[start:stop]
rest = a[:start]+a[stop:]
new_gap = gap - (stop-start) if gap > stop else gap
return rest[:new_gap]+piece+rest[new_gap:]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('move left', solve([[N,N+1,N+2,N+3,N+4],2,4,0]), {1: [3, 4, 1, 2, 5], 2: [4, 5, 2, 3, 6], 3: [5, 6, 3, 4, 7], 4: [6, 7, 4, 5, 8], 5: [7, 8, 5, 6, 9]}[N])
check('move right', solve([[N,N+1,N+2,N+3,N+4],0,2,5]), {1: [3, 4, 5, 1, 2], 2: [4, 5, 6, 2, 3], 3: [5, 6, 7, 3, 4], 4: [6, 7, 8, 4, 5], 5: [7, 8, 9, 5, 6]}[N])
check('inside no op', solve([[N,N+1,N+2,N+3],1,3,2]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('end boundary', solve([[N,N+1,N+2,N+3],1,3,3]), {1: [1, 2, 3, 4], 2: [2, 3, 4, 5], 3: [3, 4, 5, 6], 4: [4, 5, 6, 7], 5: [5, 6, 7, 8]}[N])
check('empty range', solve([[N,N+1,N+2],1,1,3]), {1: [1, 2, 3], 2: [2, 3, 4], 3: [3, 4, 5], 4: [4, 5, 6], 5: [5, 6, 7]}[N])
check('interior right', solve([[N,N+1,N+2,N+3,N+4,N+5],1,3,5]), {1: [1, 4, 5, 2, 3, 6], 2: [2, 5, 6, 3, 4, 7], 3: [3, 6, 7, 4, 5, 8], 4: [4, 7, 8, 5, 6, 9], 5: [5, 8, 9, 6, 7, 10]}[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 |
|---|---|---|---|
| move left | [3, 4, 1, 2, 5] | [3, 4, 1, 2, 5] | Passed |
| move right | [3, 4, 5, 1, 2] | [3, 4, 5, 1, 2] | Passed |
| inside no op | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| end boundary | [1, 2, 3, 4] | [1, 2, 3, 4] | Passed |
| empty range | [1, 2, 3] | [1, 2, 3] | Passed |
| interior right | [1, 4, 5, 2, 3, 6] | [1, 4, 5, 2, 3, 6] | Passed |
SHA-256 / 51d5500dee52c34b4dc3a63dd7e7764a5a93b4308cb3e25c8fb11efc2efe34e6
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:28.279709+00:00.
Case digest / 75b4e619ab5bb576195e9f89fb42327324075e2571bc5407487a7d6edc704d23