FA-46511 / Bounded deques / Open access
Copy-on-write exposes detached writes through the old view · case 01
Copy-on-write exposes detached writes through the old view.
ROOT CAUSE
Copy-on-write exposes detached writes through the old view.
THE FAILURE
Copy-on-write exposes detached writes through the old view.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Write one logical deque position under copy-on-write. Shared storage is detached, leaving the old view unchanged and decrementing its reference count. Exclusive storage keeps identity. Every write advances the value epoch.
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,refs,index,value,identity,fresh,epoch=x
shared=refs>1
new=a[:]
new[index]=value
old=new[:]
old_refs=refs-1 if shared else 1
new_refs=1
new_id=fresh if shared else identity
next_id=fresh+1 if shared else fresh
return [old,new,old_refs,new_refs,new_id,next_id,epoch+1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1],2,0,N+3,4,8,0]), {1: [[1, 2], [4, 2], 1, 1, 8, 9, 1], 2: [[2, 3], [5, 3], 1, 1, 8, 9, 1], 3: [[3, 4], [6, 4], 1, 1, 8, 9, 1], 4: [[4, 5], [7, 5], 1, 1, 8, 9, 1], 5: [[5, 6], [8, 6], 1, 1, 8, 9, 1]}[N])
check('1', solve([[N,N+1,N+2],3,1,N+4,5,9,2]), {1: [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], 2: [[2, 3, 4], [2, 6, 4], 2, 1, 9, 10, 3], 3: [[3, 4, 5], [3, 7, 5], 2, 1, 9, 10, 3], 4: [[4, 5, 6], [4, 8, 6], 2, 1, 9, 10, 3], 5: [[5, 6, 7], [5, 9, 7], 2, 1, 9, 10, 3]}[N])
check('2', solve([[N],1,0,N+1,2,3,5]), {1: [[2], [2], 1, 1, 2, 3, 6], 2: [[3], [3], 1, 1, 2, 3, 6], 3: [[4], [4], 1, 1, 2, 3, 6], 4: [[5], [5], 1, 1, 2, 3, 6], 5: [[6], [6], 1, 1, 2, 3, 6]}[N])
check('3', solve([[N,N+1],1,1,N+4,6,8,1]), {1: [[1, 5], [1, 5], 1, 1, 6, 8, 2], 2: [[2, 6], [2, 6], 1, 1, 6, 8, 2], 3: [[3, 7], [3, 7], 1, 1, 6, 8, 2], 4: [[4, 8], [4, 8], 1, 1, 6, 8, 2], 5: [[5, 9], [5, 9], 1, 1, 6, 8, 2]}[N])
check('4', solve([[N,N+1,N+2],4,2,N+5,3,10,8]), {1: [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], 2: [[2, 3, 4], [2, 3, 7], 3, 1, 10, 11, 9], 3: [[3, 4, 5], [3, 4, 8], 3, 1, 10, 11, 9], 4: [[4, 5, 6], [4, 5, 9], 3, 1, 10, 11, 9], 5: [[5, 6, 7], [5, 6, 10], 3, 1, 10, 11, 9]}[N])
check('5', solve([[N,N+1],2,1,N,1,7,4]), {1: [[1, 2], [1, 1], 1, 1, 7, 8, 5], 2: [[2, 3], [2, 2], 1, 1, 7, 8, 5], 3: [[3, 4], [3, 3], 1, 1, 7, 8, 5], 4: [[4, 5], [4, 4], 1, 1, 7, 8, 5], 5: [[5, 6], [5, 5], 1, 1, 7, 8, 5]}[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 | [[4, 2], [4, 2], 1, 1, 8, 9, 1] | [[1, 2], [4, 2], 1, 1, 8, 9, 1] | Failed |
| 1 | [[1, 5, 3], [1, 5, 3], 2, 1, 9, 10, 3] | [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3] | Failed |
| 2 | [[2], [2], 1, 1, 2, 3, 6] | [[2], [2], 1, 1, 2, 3, 6] | Passed |
| 3 | [[1, 5], [1, 5], 1, 1, 6, 8, 2] | [[1, 5], [1, 5], 1, 1, 6, 8, 2] | Passed |
| 4 | [[1, 2, 6], [1, 2, 6], 3, 1, 10, 11, 9] | [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9] | Failed |
| 5 | [[1, 1], [1, 1], 1, 1, 7, 8, 5] | [[1, 2], [1, 1], 1, 1, 7, 8, 5] | Failed |
SHA-256 / 707614934bd8552c12dcd66eb5ec90d0242198eba0c214d162f03849dfe8b08a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
a,refs,index,value,identity,fresh,epoch=x
shared=refs>1
new=a[:]
new[index]=value
old=a[:] if shared and refs>2 else new[:]
old_refs=refs-1 if shared else 1
new_refs=1
new_id=fresh if shared else identity
next_id=fresh+1 if shared else fresh
return [old,new,old_refs,new_refs,new_id,next_id,epoch+1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([[N,N+1],2,0,N+3,4,8,0]), {1: [[1, 2], [4, 2], 1, 1, 8, 9, 1], 2: [[2, 3], [5, 3], 1, 1, 8, 9, 1], 3: [[3, 4], [6, 4], 1, 1, 8, 9, 1], 4: [[4, 5], [7, 5], 1, 1, 8, 9, 1], 5: [[5, 6], [8, 6], 1, 1, 8, 9, 1]}[N])
check('1', solve([[N,N+1,N+2],3,1,N+4,5,9,2]), {1: [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3], 2: [[2, 3, 4], [2, 6, 4], 2, 1, 9, 10, 3], 3: [[3, 4, 5], [3, 7, 5], 2, 1, 9, 10, 3], 4: [[4, 5, 6], [4, 8, 6], 2, 1, 9, 10, 3], 5: [[5, 6, 7], [5, 9, 7], 2, 1, 9, 10, 3]}[N])
check('2', solve([[N],1,0,N+1,2,3,5]), {1: [[2], [2], 1, 1, 2, 3, 6], 2: [[3], [3], 1, 1, 2, 3, 6], 3: [[4], [4], 1, 1, 2, 3, 6], 4: [[5], [5], 1, 1, 2, 3, 6], 5: [[6], [6], 1, 1, 2, 3, 6]}[N])
check('3', solve([[N,N+1],1,1,N+4,6,8,1]), {1: [[1, 5], [1, 5], 1, 1, 6, 8, 2], 2: [[2, 6], [2, 6], 1, 1, 6, 8, 2], 3: [[3, 7], [3, 7], 1, 1, 6, 8, 2], 4: [[4, 8], [4, 8], 1, 1, 6, 8, 2], 5: [[5, 9], [5, 9], 1, 1, 6, 8, 2]}[N])
check('4', solve([[N,N+1,N+2],4,2,N+5,3,10,8]), {1: [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9], 2: [[2, 3, 4], [2, 3, 7], 3, 1, 10, 11, 9], 3: [[3, 4, 5], [3, 4, 8], 3, 1, 10, 11, 9], 4: [[4, 5, 6], [4, 5, 9], 3, 1, 10, 11, 9], 5: [[5, 6, 7], [5, 6, 10], 3, 1, 10, 11, 9]}[N])
check('5', solve([[N,N+1],2,1,N,1,7,4]), {1: [[1, 2], [1, 1], 1, 1, 7, 8, 5], 2: [[2, 3], [2, 2], 1, 1, 7, 8, 5], 3: [[3, 4], [3, 3], 1, 1, 7, 8, 5], 4: [[4, 5], [4, 4], 1, 1, 7, 8, 5], 5: [[5, 6], [5, 5], 1, 1, 7, 8, 5]}[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 | [[4, 2], [4, 2], 1, 1, 8, 9, 1] | [[1, 2], [4, 2], 1, 1, 8, 9, 1] | Failed |
| 1 | [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3] | [[1, 2, 3], [1, 5, 3], 2, 1, 9, 10, 3] | Passed |
| 2 | [[2], [2], 1, 1, 2, 3, 6] | [[2], [2], 1, 1, 2, 3, 6] | Passed |
| 3 | [[1, 5], [1, 5], 1, 1, 6, 8, 2] | [[1, 5], [1, 5], 1, 1, 6, 8, 2] | Passed |
| 4 | [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9] | [[1, 2, 3], [1, 2, 6], 3, 1, 10, 11, 9] | Passed |
| 5 | [[1, 1], [1, 1], 1, 1, 7, 8, 5] | [[1, 2], [1, 1], 1, 1, 7, 8, 5] | Failed |
SHA-256 / 4a90af53589bf22230157013c609230c589ec666678815ef7c4423574e732743
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.947355+00:00.
Case digest / 4a07ad257c78f0c5257fa5104fa0b873d0204947dc7ef054df10c9b93b1c09d0