FA-45886 / Bounded deques / Open access
Consume flags a boundary-touch as a split memory region · case 01
Consume flags a boundary-touch as a split memory region.
ROOT CAUSE
An end-exclusive interval touching the boundary is mistaken for crossing it.
THE FAILURE
An end-exclusive interval touching the boundary is mistaken for crossing it.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Consume min(requested,size) slots from a ring. Report new head, count, cleared physical slots, and whether its occupied arc crossed the physical boundary.
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):
cap, head, size, requested = x
count = min(requested, size)
cleared = [(head + i) % cap for i in range(count)]
new_head = (head + count) % cap
remaining = size - count
crossed = head + count >= cap
return [new_head, remaining, cleared, crossed]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('wrap consume', solve([N+5,N+4,4,3]), [2,1,[N+4,0,1],True])
check('oversized consume', solve([N+5,1,2,4]), [3,0,[1,2],False])
check('empty', solve([N+5,2,0,4]), [2,0,[],False])
check('zero consume', solve([N+5,2,3,0]), [2,3,[],False])
check('exact boundary', solve([N+5,N+3,2,2]), [0,0,[N+3,N+4],False])
check('single retained', solve([N+5,1,3,2]), [3,1,[1,2],False])
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 |
|---|---|---|---|
| wrap consume | [2, 1, [5, 0, 1], True] | [2, 1, [5, 0, 1], True] | Passed |
| oversized consume | [3, 0, [1, 2], False] | [3, 0, [1, 2], False] | Passed |
| empty | [2, 0, [], False] | [2, 0, [], False] | Passed |
| zero consume | [2, 3, [], False] | [2, 3, [], False] | Passed |
| exact boundary | [0, 0, [4, 5], True] | [0, 0, [4, 5], False] | Failed |
| single retained | [3, 1, [1, 2], False] | [3, 1, [1, 2], False] | Passed |
SHA-256 / 03dae7593aed420b86f8627e512497250a011be38cd17f0e36a238510c1cf9d5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
cap, head, size, requested = x
count = min(requested, size)
cleared = [(head + i) % cap for i in range(count)]
new_head = (head + count) % cap
remaining = size - count
crossed = count > 0 and head + count >= cap
return [new_head, remaining, cleared, crossed]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('wrap consume', solve([N+5,N+4,4,3]), [2,1,[N+4,0,1],True])
check('oversized consume', solve([N+5,1,2,4]), [3,0,[1,2],False])
check('empty', solve([N+5,2,0,4]), [2,0,[],False])
check('zero consume', solve([N+5,2,3,0]), [2,3,[],False])
check('exact boundary', solve([N+5,N+3,2,2]), [0,0,[N+3,N+4],False])
check('single retained', solve([N+5,1,3,2]), [3,1,[1,2],False])
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 |
|---|---|---|---|
| wrap consume | [2, 1, [5, 0, 1], True] | [2, 1, [5, 0, 1], True] | Passed |
| oversized consume | [3, 0, [1, 2], False] | [3, 0, [1, 2], False] | Passed |
| empty | [2, 0, [], False] | [2, 0, [], False] | Passed |
| zero consume | [2, 3, [], False] | [2, 3, [], False] | Passed |
| exact boundary | [0, 0, [4, 5], True] | [0, 0, [4, 5], False] | Failed |
| single retained | [3, 1, [1, 2], False] | [3, 1, [1, 2], False] | Passed |
SHA-256 / 6d945225b4d39b042b3cfc997fecf6bbdd04d82ca9f0bc55c0cebfbecca07ecb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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:26.745919+00:00.
Case digest / 5f57658e984645814a928fab5011c5e9ea68a81b836c3ea73ca1efcc2ce62101