FA-46436 / Bounded deques / Open access
Deque block allocator returns a block without removing it from the free pool · case 01
Deque block allocator returns a block without removing it from the free pool.
ROOT CAUSE
Deque block allocator returns a block without removing it from the free pool.
THE FAILURE
Deque block allocator returns a block without removing it from the free pool.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Acquire a deque block from a LIFO free pool or a fresh monotonic ID. Increment its incarnation, clear every slot and initialize zero occupancy and owned state.
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):
pool,fresh,generations,width=x
identity=pool[-1] if pool else fresh
remaining=pool
next_id=fresh if pool else fresh+1
generation=generations.get(identity,0)+1
slots=[None]*width
used=0
state='owned'
return [identity,remaining,next_id,generation,slots,used,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[3,7],9,{7:N},4]), {1: [7, [3], 9, 2, [None, None, None, None], 0, 'owned'], 2: [7, [3], 9, 3, [None, None, None, None], 0, 'owned'], 3: [7, [3], 9, 4, [None, None, None, None], 0, 'owned'], 4: [7, [3], 9, 5, [None, None, None, None], 0, 'owned'], 5: [7, [3], 9, 6, [None, None, None, None], 0, 'owned']}[N])
check('1', solve([[],9,{},3]), {1: [9, [], 10, 1, [None, None, None], 0, 'owned'], 2: [9, [], 10, 1, [None, None, None], 0, 'owned'], 3: [9, [], 10, 1, [None, None, None], 0, 'owned'], 4: [9, [], 10, 1, [None, None, None], 0, 'owned'], 5: [9, [], 10, 1, [None, None, None], 0, 'owned']}[N])
check('2', solve([[2],7,{2:N+1},1]), {1: [2, [], 7, 3, [None], 0, 'owned'], 2: [2, [], 7, 4, [None], 0, 'owned'], 3: [2, [], 7, 5, [None], 0, 'owned'], 4: [2, [], 7, 6, [None], 0, 'owned'], 5: [2, [], 7, 7, [None], 0, 'owned']}[N])
check('3', solve([[1,4,6],8,{6:N+2},2]), {1: [6, [1, 4], 8, 4, [None, None], 0, 'owned'], 2: [6, [1, 4], 8, 5, [None, None], 0, 'owned'], 3: [6, [1, 4], 8, 6, [None, None], 0, 'owned'], 4: [6, [1, 4], 8, 7, [None, None], 0, 'owned'], 5: [6, [1, 4], 8, 8, [None, None], 0, 'owned']}[N])
check('4', solve([[],N+10,{},5]), {1: [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'], 2: [12, [], 13, 1, [None, None, None, None, None], 0, 'owned'], 3: [13, [], 14, 1, [None, None, None, None, None], 0, 'owned'], 4: [14, [], 15, 1, [None, None, None, None, None], 0, 'owned'], 5: [15, [], 16, 1, [None, None, None, None, None], 0, 'owned']}[N])
check('5', solve([[4,8],11,{8:0},0]), {1: [8, [4], 11, 1, [], 0, 'owned'], 2: [8, [4], 11, 1, [], 0, 'owned'], 3: [8, [4], 11, 1, [], 0, 'owned'], 4: [8, [4], 11, 1, [], 0, 'owned'], 5: [8, [4], 11, 1, [], 0, 'owned']}[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 | [7, [3, 7], 9, 2, [None, None, None, None], 0, 'owned'] | [7, [3], 9, 2, [None, None, None, None], 0, 'owned'] | Failed |
| 1 | [9, [], 10, 1, [None, None, None], 0, 'owned'] | [9, [], 10, 1, [None, None, None], 0, 'owned'] | Passed |
| 2 | [2, [2], 7, 3, [None], 0, 'owned'] | [2, [], 7, 3, [None], 0, 'owned'] | Failed |
| 3 | [6, [1, 4, 6], 8, 4, [None, None], 0, 'owned'] | [6, [1, 4], 8, 4, [None, None], 0, 'owned'] | Failed |
| 4 | [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'] | [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'] | Passed |
| 5 | [8, [4, 8], 11, 1, [], 0, 'owned'] | [8, [4], 11, 1, [], 0, 'owned'] | Failed |
SHA-256 / 47a843f1fa1f2e78adced54285b0a3eff70bdb641d97b647778d790c35dad3ba
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
pool,fresh,generations,width=x
identity=pool[-1] if pool else fresh
remaining=pool[:-1] if len(pool)==1 else pool
next_id=fresh if pool else fresh+1
generation=generations.get(identity,0)+1
slots=[None]*width
used=0
state='owned'
return [identity,remaining,next_id,generation,slots,used,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[3,7],9,{7:N},4]), {1: [7, [3], 9, 2, [None, None, None, None], 0, 'owned'], 2: [7, [3], 9, 3, [None, None, None, None], 0, 'owned'], 3: [7, [3], 9, 4, [None, None, None, None], 0, 'owned'], 4: [7, [3], 9, 5, [None, None, None, None], 0, 'owned'], 5: [7, [3], 9, 6, [None, None, None, None], 0, 'owned']}[N])
check('1', solve([[],9,{},3]), {1: [9, [], 10, 1, [None, None, None], 0, 'owned'], 2: [9, [], 10, 1, [None, None, None], 0, 'owned'], 3: [9, [], 10, 1, [None, None, None], 0, 'owned'], 4: [9, [], 10, 1, [None, None, None], 0, 'owned'], 5: [9, [], 10, 1, [None, None, None], 0, 'owned']}[N])
check('2', solve([[2],7,{2:N+1},1]), {1: [2, [], 7, 3, [None], 0, 'owned'], 2: [2, [], 7, 4, [None], 0, 'owned'], 3: [2, [], 7, 5, [None], 0, 'owned'], 4: [2, [], 7, 6, [None], 0, 'owned'], 5: [2, [], 7, 7, [None], 0, 'owned']}[N])
check('3', solve([[1,4,6],8,{6:N+2},2]), {1: [6, [1, 4], 8, 4, [None, None], 0, 'owned'], 2: [6, [1, 4], 8, 5, [None, None], 0, 'owned'], 3: [6, [1, 4], 8, 6, [None, None], 0, 'owned'], 4: [6, [1, 4], 8, 7, [None, None], 0, 'owned'], 5: [6, [1, 4], 8, 8, [None, None], 0, 'owned']}[N])
check('4', solve([[],N+10,{},5]), {1: [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'], 2: [12, [], 13, 1, [None, None, None, None, None], 0, 'owned'], 3: [13, [], 14, 1, [None, None, None, None, None], 0, 'owned'], 4: [14, [], 15, 1, [None, None, None, None, None], 0, 'owned'], 5: [15, [], 16, 1, [None, None, None, None, None], 0, 'owned']}[N])
check('5', solve([[4,8],11,{8:0},0]), {1: [8, [4], 11, 1, [], 0, 'owned'], 2: [8, [4], 11, 1, [], 0, 'owned'], 3: [8, [4], 11, 1, [], 0, 'owned'], 4: [8, [4], 11, 1, [], 0, 'owned'], 5: [8, [4], 11, 1, [], 0, 'owned']}[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 | [7, [3, 7], 9, 2, [None, None, None, None], 0, 'owned'] | [7, [3], 9, 2, [None, None, None, None], 0, 'owned'] | Failed |
| 1 | [9, [], 10, 1, [None, None, None], 0, 'owned'] | [9, [], 10, 1, [None, None, None], 0, 'owned'] | Passed |
| 2 | [2, [], 7, 3, [None], 0, 'owned'] | [2, [], 7, 3, [None], 0, 'owned'] | Passed |
| 3 | [6, [1, 4, 6], 8, 4, [None, None], 0, 'owned'] | [6, [1, 4], 8, 4, [None, None], 0, 'owned'] | Failed |
| 4 | [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'] | [11, [], 12, 1, [None, None, None, None, None], 0, 'owned'] | Passed |
| 5 | [8, [4, 8], 11, 1, [], 0, 'owned'] | [8, [4], 11, 1, [], 0, 'owned'] | Failed |
SHA-256 / b1acd60e3f2a85dc44ca9a16272ea8cd586c691b6ea9b1c4bbc5bc5701664e25
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:32.274554+00:00.
Case digest / da080e117bff61ff486b9c0364b1fca0cbd92f0c39fcf96cfb81fe99210460d6