FA-45946 / Bounded deques / Open access
Unlink retains links on the removed intrusive node · case 01
Unlink retains links on the removed intrusive node.
ROOT CAUSE
The detached node remains traversable and can falsely appear owned.
THE FAILURE
The detached node remains traversable and can falsely appear owned.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Unlink one selected node from a finite doubly linked deque with sentinel S. Nodes are keyed by identity; return forward IDs, backward IDs, removed node links, size, sentinel endpoint links and reciprocal-link validity. Every input ID is unique.
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):
ids, victim = x
nodes = {'S': ['S','S']}
for i, value in enumerate(ids):
nodes[value] = [ids[i-1] if i else 'S', ids[i+1] if i+1 < len(ids) else 'S']
if ids:
nodes['S'] = [ids[-1],ids[0]]
size = len(ids)
left, right = nodes[victim]
nodes[left][1] = right
nodes[right][0] = left
nodes[victim] = [left,right]
size -= 1
forward = []
current = nodes['S'][1]
for _ in range(len(ids)+1):
if current == 'S' or current is None: break
forward.append(current)
current = nodes[current][1]
backward = []
current = nodes['S'][0]
for _ in range(len(ids)+1):
if current == 'S' or current is None: break
backward.append(current)
current = nodes[current][0]
valid = all(nodes[nodes[v][0]][1] == v and nodes[nodes[v][1]][0] == v for v in forward if nodes[v][0] is not None and nodes[v][1] is not None)
return [forward,backward,nodes[victim],size,nodes['S'],valid]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle unlink', solve([[N,N+1,N+2],N+1]), [[N,N+2],[N+2,N],[None,None],2,[N+2,N],True])
check('head unlink', solve([[N,N+1,N+2],N]), [[N+1,N+2],[N+2,N+1],[None,None],2,[N+2,N+1],True])
check('tail unlink', solve([[N,N+1,N+2],N+2]), [[N,N+1],[N+1,N],[None,None],2,[N+1,N],True])
check('only node', solve([[N],N]), [[],[],[None,None],0,["S","S"],True])
check('pair head', solve([[N,N+1],N]), [[N+1],[N+1],[None,None],1,[N+1,N+1],True])
check('long middle', solve([[N,N+1,N+2,N+3,N+4],N+2]), [[N,N+1,N+3,N+4],[N+4,N+3,N+1,N],[None,None],4,[N+4,N],True])
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 |
|---|---|---|---|
| middle unlink | [[1, 3], [3, 1], [1, 3], 2, [3, 1], True] | [[1, 3], [3, 1], [None, None], 2, [3, 1], True] | Failed |
| head unlink | [[2, 3], [3, 2], ['S', 2], 2, [3, 2], True] | [[2, 3], [3, 2], [None, None], 2, [3, 2], True] | Failed |
| tail unlink | [[1, 2], [2, 1], [2, 'S'], 2, [2, 1], True] | [[1, 2], [2, 1], [None, None], 2, [2, 1], True] | Failed |
| only node | [[], [], ['S', 'S'], 0, ['S', 'S'], True] | [[], [], [None, None], 0, ['S', 'S'], True] | Failed |
| pair head | [[2], [2], ['S', 2], 1, [2, 2], True] | [[2], [2], [None, None], 1, [2, 2], True] | Failed |
| long middle | [[1, 2, 4, 5], [5, 4, 2, 1], [2, 4], 4, [5, 1], True] | [[1, 2, 4, 5], [5, 4, 2, 1], [None, None], 4, [5, 1], True] | Failed |
SHA-256 / 671ed7577aa4f9335b374d7b19c0403b5038b3c5a3367561e179ad1de33c75d2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
ids, victim = x
nodes = {'S': ['S','S']}
for i, value in enumerate(ids):
nodes[value] = [ids[i-1] if i else 'S', ids[i+1] if i+1 < len(ids) else 'S']
if ids:
nodes['S'] = [ids[-1],ids[0]]
size = len(ids)
left, right = nodes[victim]
nodes[left][1] = right
nodes[right][0] = left
nodes[victim] = [None,right]
size -= 1
forward = []
current = nodes['S'][1]
for _ in range(len(ids)+1):
if current == 'S' or current is None: break
forward.append(current)
current = nodes[current][1]
backward = []
current = nodes['S'][0]
for _ in range(len(ids)+1):
if current == 'S' or current is None: break
backward.append(current)
current = nodes[current][0]
valid = all(nodes[nodes[v][0]][1] == v and nodes[nodes[v][1]][0] == v for v in forward if nodes[v][0] is not None and nodes[v][1] is not None)
return [forward,backward,nodes[victim],size,nodes['S'],valid]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('middle unlink', solve([[N,N+1,N+2],N+1]), [[N,N+2],[N+2,N],[None,None],2,[N+2,N],True])
check('head unlink', solve([[N,N+1,N+2],N]), [[N+1,N+2],[N+2,N+1],[None,None],2,[N+2,N+1],True])
check('tail unlink', solve([[N,N+1,N+2],N+2]), [[N,N+1],[N+1,N],[None,None],2,[N+1,N],True])
check('only node', solve([[N],N]), [[],[],[None,None],0,["S","S"],True])
check('pair head', solve([[N,N+1],N]), [[N+1],[N+1],[None,None],1,[N+1,N+1],True])
check('long middle', solve([[N,N+1,N+2,N+3,N+4],N+2]), [[N,N+1,N+3,N+4],[N+4,N+3,N+1,N],[None,None],4,[N+4,N],True])
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 |
|---|---|---|---|
| middle unlink | [[1, 3], [3, 1], [None, 3], 2, [3, 1], True] | [[1, 3], [3, 1], [None, None], 2, [3, 1], True] | Failed |
| head unlink | [[2, 3], [3, 2], [None, 2], 2, [3, 2], True] | [[2, 3], [3, 2], [None, None], 2, [3, 2], True] | Failed |
| tail unlink | [[1, 2], [2, 1], [None, 'S'], 2, [2, 1], True] | [[1, 2], [2, 1], [None, None], 2, [2, 1], True] | Failed |
| only node | [[], [], [None, 'S'], 0, ['S', 'S'], True] | [[], [], [None, None], 0, ['S', 'S'], True] | Failed |
| pair head | [[2], [2], [None, 2], 1, [2, 2], True] | [[2], [2], [None, None], 1, [2, 2], True] | Failed |
| long middle | [[1, 2, 4, 5], [5, 4, 2, 1], [None, 4], 4, [5, 1], True] | [[1, 2, 4, 5], [5, 4, 2, 1], [None, None], 4, [5, 1], True] | Failed |
SHA-256 / 7dcb2ff5637a71eb135448cacf848c386fb34ebfa77e8dbc96fc2119cc8f2281
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:27.429374+00:00.
Case digest / c0fe95f9fde3533fa2942df866d62fcea2f53b96074d3dc8b8b9545d2cfc622f