FA-46076 / Bounded deques / Open access
Deque partition sets its boundary to the rejected count · case 01
Deque partition sets its boundary to the rejected count.
ROOT CAUSE
Deque partition sets its boundary to the rejected count.
THE FAILURE
Deque partition sets its boundary to the rejected count.
Unsuccessful approach: The partial repair still applies the incorrect transition to an admitted boundary or multi-element case.
Case contract
Stably partition a bounded deque into accepted and rejected values using an explicit set. Return the concatenation, split cursor, and rejected sequence.
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):
items, allowed = x
yes = [v for v in items if v in allowed]
no = [v for v in items if v not in allowed]
result = yes + no
boundary = len(no)
return [result,boundary,no]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('alternating', solve([[N,N+1,N+2,N+1,N], [N,N+2]]), {1: [[1, 3, 1, 2, 2], 3, [2, 2]], 2: [[2, 4, 2, 3, 3], 3, [3, 3]], 3: [[3, 5, 3, 4, 4], 3, [4, 4]], 4: [[4, 6, 4, 5, 5], 3, [5, 5]], 5: [[5, 7, 5, 6, 6], 3, [6, 6]]}[N])
check('all reject', solve([[N,N+1],[]]), {1: [[1, 2], 0, [1, 2]], 2: [[2, 3], 0, [2, 3]], 3: [[3, 4], 0, [3, 4]], 4: [[4, 5], 0, [4, 5]], 5: [[5, 6], 0, [5, 6]]}[N])
check('all accept', solve([[N,N+1,N],[N,N+1]]), {1: [[1, 2, 1], 3, []], 2: [[2, 3, 2], 3, []], 3: [[3, 4, 3], 3, []], 4: [[4, 5, 4], 3, []], 5: [[5, 6, 5], 3, []]}[N])
check('empty', solve([[],[N]]), {1: [[], 0, []], 2: [[], 0, []], 3: [[], 0, []], 4: [[], 0, []], 5: [[], 0, []]}[N])
check('duplicate reject', solve([[N+1,N,N+1,N+2],[N]]), {1: [[1, 2, 2, 3], 1, [2, 2, 3]], 2: [[2, 3, 3, 4], 1, [3, 3, 4]], 3: [[3, 4, 4, 5], 1, [4, 4, 5]], 4: [[4, 5, 5, 6], 1, [5, 5, 6]], 5: [[5, 6, 6, 7], 1, [6, 6, 7]]}[N])
check('accepted reversed values', solve([[N+2,N,N+1],[N,N+2]]), {1: [[3, 1, 2], 2, [2]], 2: [[4, 2, 3], 2, [3]], 3: [[5, 3, 4], 2, [4]], 4: [[6, 4, 5], 2, [5]], 5: [[7, 5, 6], 2, [6]]}[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 |
|---|---|---|---|
| alternating | [[1, 3, 1, 2, 2], 2, [2, 2]] | [[1, 3, 1, 2, 2], 3, [2, 2]] | Failed |
| all reject | [[1, 2], 2, [1, 2]] | [[1, 2], 0, [1, 2]] | Failed |
| all accept | [[1, 2, 1], 0, []] | [[1, 2, 1], 3, []] | Failed |
| empty | [[], 0, []] | [[], 0, []] | Passed |
| duplicate reject | [[1, 2, 2, 3], 3, [2, 2, 3]] | [[1, 2, 2, 3], 1, [2, 2, 3]] | Failed |
| accepted reversed values | [[3, 1, 2], 1, [2]] | [[3, 1, 2], 2, [2]] | Failed |
SHA-256 / ee1ef8b05e2694f0de67a24abac107cf1f2e3c1b2be55309da09df097451d872
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
items, allowed = x
yes = [v for v in items if v in allowed]
no = [v for v in items if v not in allowed]
result = yes + no
boundary = len(yes) if not no else len(no)
return [result,boundary,no]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('alternating', solve([[N,N+1,N+2,N+1,N], [N,N+2]]), {1: [[1, 3, 1, 2, 2], 3, [2, 2]], 2: [[2, 4, 2, 3, 3], 3, [3, 3]], 3: [[3, 5, 3, 4, 4], 3, [4, 4]], 4: [[4, 6, 4, 5, 5], 3, [5, 5]], 5: [[5, 7, 5, 6, 6], 3, [6, 6]]}[N])
check('all reject', solve([[N,N+1],[]]), {1: [[1, 2], 0, [1, 2]], 2: [[2, 3], 0, [2, 3]], 3: [[3, 4], 0, [3, 4]], 4: [[4, 5], 0, [4, 5]], 5: [[5, 6], 0, [5, 6]]}[N])
check('all accept', solve([[N,N+1,N],[N,N+1]]), {1: [[1, 2, 1], 3, []], 2: [[2, 3, 2], 3, []], 3: [[3, 4, 3], 3, []], 4: [[4, 5, 4], 3, []], 5: [[5, 6, 5], 3, []]}[N])
check('empty', solve([[],[N]]), {1: [[], 0, []], 2: [[], 0, []], 3: [[], 0, []], 4: [[], 0, []], 5: [[], 0, []]}[N])
check('duplicate reject', solve([[N+1,N,N+1,N+2],[N]]), {1: [[1, 2, 2, 3], 1, [2, 2, 3]], 2: [[2, 3, 3, 4], 1, [3, 3, 4]], 3: [[3, 4, 4, 5], 1, [4, 4, 5]], 4: [[4, 5, 5, 6], 1, [5, 5, 6]], 5: [[5, 6, 6, 7], 1, [6, 6, 7]]}[N])
check('accepted reversed values', solve([[N+2,N,N+1],[N,N+2]]), {1: [[3, 1, 2], 2, [2]], 2: [[4, 2, 3], 2, [3]], 3: [[5, 3, 4], 2, [4]], 4: [[6, 4, 5], 2, [5]], 5: [[7, 5, 6], 2, [6]]}[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 |
|---|---|---|---|
| alternating | [[1, 3, 1, 2, 2], 2, [2, 2]] | [[1, 3, 1, 2, 2], 3, [2, 2]] | Failed |
| all reject | [[1, 2], 2, [1, 2]] | [[1, 2], 0, [1, 2]] | Failed |
| all accept | [[1, 2, 1], 3, []] | [[1, 2, 1], 3, []] | Passed |
| empty | [[], 0, []] | [[], 0, []] | Passed |
| duplicate reject | [[1, 2, 2, 3], 3, [2, 2, 3]] | [[1, 2, 2, 3], 1, [2, 2, 3]] | Failed |
| accepted reversed values | [[3, 1, 2], 1, [2]] | [[3, 1, 2], 2, [2]] | Failed |
SHA-256 / 0c26f79f614dcfe7393deb7c72ad996bdc9e6aab6d8c59653dc3f1e2963c27d3
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:28.592481+00:00.
Case digest / 090bdcb773e90b79b4292fb6926cc291e4c9d06d3f638d0e1b9dd7f5e4740487