FA-46926 / Bounded deques / Open access
Deque commit exceeds the producer reserved grant · case 01
Deque commit exceeds the producer reserved grant.
ROOT CAUSE
Deque commit exceeds the producer reserved grant.
THE FAILURE
Deque commit exceeds the producer reserved grant.
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>cap: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+(written>0)
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, 2, 3], 0, 3, True, []] | [[1], 1, 2, False, []] | Failed |
| 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, 7, True, [2, 3]] | [[1], 0, 7, True, [2, 3]] | Passed |
| 5 | [[1, 2], 0, 1, True, []] | [[1, 2], 0, 1, True, []] | Passed |
| 6 | [[1], 2, 1, False, []] | [[1], 2, 1, False, []] | Passed |
SHA-256 / 05b5058ee32ba7421ca14ec1cff4e61db2c6736e08498ecfc76a17fbd2fa78ed
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 and reserved==0: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+(written>0)
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, 2, 3], 0, 3, True, []] | [[1], 1, 2, False, []] | Failed |
| 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, 7, True, [2, 3]] | [[1], 0, 7, True, [2, 3]] | Passed |
| 5 | [[1, 2], 0, 1, True, []] | [[1, 2], 0, 1, True, []] | Passed |
| 6 | [[1], 2, 1, False, []] | [[1], 2, 1, False, []] | Passed |
SHA-256 / b417f74560939f6bfec43ab5c6fcdb995dc78f72bcd6cfdbc9d2582da86ae779
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 / e83178d1be79005d6442009868067a146ed4d3e24d8e9e8c69740f0702737def