FA-46946 / Bounded deques / Open access
Empty deque reservation commit invalidates all iterators · case 01
Empty deque reservation commit invalidates all iterators.
ROOT CAUSE
Empty deque reservation commit invalidates all iterators.
THE FAILURE
Empty deque reservation commit invalidates all iterators.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
A bounded deque write reservation publishes exactly its initialized prefix. Reject negative, uninitialized, over-reserved or over-capacity commit counts atomically. Successful commit releases the entire reservation and advances structure epoch only for nonempty publication.
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,reserved,values,written,cap,epoch=x
if written<0 or written>len(values) or written>reserved:return [a,reserved,epoch,False,[]]
if len(a)+written>cap:return [a,reserved,epoch,False,[]]
published=values[:written]
state=a+published
remaining=0
version=epoch+1
unused=values[written:]
return [state,remaining,version,True,unused]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N],3,[N+1,N+2,N+3],2,5,4]), {1: [[1, 2, 3], 0, 5, True, [4]], 2: [[2, 3, 4], 0, 5, True, [5]], 3: [[3, 4, 5], 0, 5, True, [6]], 4: [[4, 5, 6], 0, 5, True, [7]], 5: [[5, 6, 7], 0, 5, True, [8]]}[N])
check('1', solve([[N],1,[N+1,N+2],2,4,2]), {1: [[1], 1, 2, False, []], 2: [[2], 1, 2, False, []], 3: [[3], 1, 2, False, []], 4: [[4], 1, 2, False, []], 5: [[5], 1, 2, False, []]}[N])
check('2', solve([[N],3,[N+1],2,5,1]), {1: [[1], 3, 1, False, []], 2: [[2], 3, 1, False, []], 3: [[3], 3, 1, False, []], 4: [[4], 3, 1, False, []], 5: [[5], 3, 1, False, []]}[N])
check('3', solve([[N,N+1],2,[N+2,N+3],2,3,5]), {1: [[1, 2], 2, 5, False, []], 2: [[2, 3], 2, 5, False, []], 3: [[3, 4], 2, 5, False, []], 4: [[4, 5], 2, 5, False, []], 5: [[5, 6], 2, 5, False, []]}[N])
check('4', solve([[N],2,[N+1,N+2],0,4,7]), {1: [[1], 0, 7, True, [2, 3]], 2: [[2], 0, 7, True, [3, 4]], 3: [[3], 0, 7, True, [4, 5]], 4: [[4], 0, 7, True, [5, 6]], 5: [[5], 0, 7, True, [6, 7]]}[N])
check('5', solve([[],2,[N,N+1],2,2,0]), {1: [[1, 2], 0, 1, True, []], 2: [[2, 3], 0, 1, True, []], 3: [[3, 4], 0, 1, True, []], 4: [[4, 5], 0, 1, True, []], 5: [[5, 6], 0, 1, True, []]}[N])
check('6', solve([[N],2,[N+1],-1,4,1]), {1: [[1], 2, 1, False, []], 2: [[2], 2, 1, False, []], 3: [[3], 2, 1, False, []], 4: [[4], 2, 1, False, []], 5: [[5], 2, 1, False, []]}[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, 2, 3], 0, 5, True, [4]] | [[1, 2, 3], 0, 5, True, [4]] | Passed |
| 1 | [[1], 1, 2, False, []] | [[1], 1, 2, False, []] | Passed |
| 2 | [[1], 3, 1, False, []] | [[1], 3, 1, False, []] | Passed |
| 3 | [[1, 2], 2, 5, False, []] | [[1, 2], 2, 5, False, []] | Passed |
| 4 | [[1], 0, 8, True, [2, 3]] | [[1], 0, 7, True, [2, 3]] | Failed |
| 5 | [[1, 2], 0, 1, True, []] | [[1, 2], 0, 1, True, []] | Passed |
| 6 | [[1], 2, 1, False, []] | [[1], 2, 1, False, []] | Passed |
SHA-256 / 64c2470deda08dd058b4a279da40ddb4f826e6b97bb56411eb7476b2e7c0ab39
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
a,reserved,values,written,cap,epoch=x
if written<0 or written>len(values) or written>reserved:return [a,reserved,epoch,False,[]]
if len(a)+written>cap:return [a,reserved,epoch,False,[]]
published=values[:written]
state=a+published
remaining=0
version=epoch+1 if values else epoch
unused=values[written:]
return [state,remaining,version,True,unused]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N],3,[N+1,N+2,N+3],2,5,4]), {1: [[1, 2, 3], 0, 5, True, [4]], 2: [[2, 3, 4], 0, 5, True, [5]], 3: [[3, 4, 5], 0, 5, True, [6]], 4: [[4, 5, 6], 0, 5, True, [7]], 5: [[5, 6, 7], 0, 5, True, [8]]}[N])
check('1', solve([[N],1,[N+1,N+2],2,4,2]), {1: [[1], 1, 2, False, []], 2: [[2], 1, 2, False, []], 3: [[3], 1, 2, False, []], 4: [[4], 1, 2, False, []], 5: [[5], 1, 2, False, []]}[N])
check('2', solve([[N],3,[N+1],2,5,1]), {1: [[1], 3, 1, False, []], 2: [[2], 3, 1, False, []], 3: [[3], 3, 1, False, []], 4: [[4], 3, 1, False, []], 5: [[5], 3, 1, False, []]}[N])
check('3', solve([[N,N+1],2,[N+2,N+3],2,3,5]), {1: [[1, 2], 2, 5, False, []], 2: [[2, 3], 2, 5, False, []], 3: [[3, 4], 2, 5, False, []], 4: [[4, 5], 2, 5, False, []], 5: [[5, 6], 2, 5, False, []]}[N])
check('4', solve([[N],2,[N+1,N+2],0,4,7]), {1: [[1], 0, 7, True, [2, 3]], 2: [[2], 0, 7, True, [3, 4]], 3: [[3], 0, 7, True, [4, 5]], 4: [[4], 0, 7, True, [5, 6]], 5: [[5], 0, 7, True, [6, 7]]}[N])
check('5', solve([[],2,[N,N+1],2,2,0]), {1: [[1, 2], 0, 1, True, []], 2: [[2, 3], 0, 1, True, []], 3: [[3, 4], 0, 1, True, []], 4: [[4, 5], 0, 1, True, []], 5: [[5, 6], 0, 1, True, []]}[N])
check('6', solve([[N],2,[N+1],-1,4,1]), {1: [[1], 2, 1, False, []], 2: [[2], 2, 1, False, []], 3: [[3], 2, 1, False, []], 4: [[4], 2, 1, False, []], 5: [[5], 2, 1, False, []]}[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, 2, 3], 0, 5, True, [4]] | [[1, 2, 3], 0, 5, True, [4]] | Passed |
| 1 | [[1], 1, 2, False, []] | [[1], 1, 2, False, []] | Passed |
| 2 | [[1], 3, 1, False, []] | [[1], 3, 1, False, []] | Passed |
| 3 | [[1, 2], 2, 5, False, []] | [[1, 2], 2, 5, False, []] | Passed |
| 4 | [[1], 0, 8, True, [2, 3]] | [[1], 0, 7, True, [2, 3]] | Failed |
| 5 | [[1, 2], 0, 1, True, []] | [[1, 2], 0, 1, True, []] | Passed |
| 6 | [[1], 2, 1, False, []] | [[1], 2, 1, False, []] | Passed |
SHA-256 / b840e35ce885aa4eb9047dbee852ac234f20ff3f79c29966a4a1317dca9b01e9
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:40.448254+00:00.
Case digest / 540372b888a7e64cf1a6ceb518a1162456dac17ed1bb507ef0b5e2caf5e20a33