FA-031 / Queues / Open access
A checkpoint advances past an unacknowledged item · case 01
After a partial batch failure, resumption skips work that never completed.
ROOT CAUSE
The checkpoint records attempted batch length instead of the acknowledged prefix.
VERIFIED REPAIR
Persist the first unacknowledged index as the next resume position.
Unsuccessful approach: Rolling back an extra position replays an already acknowledged item.
Case contract
Persist the first unacknowledged index as the next resume position.
Why this case matters
A compact reasoning and repair task with executable evidence.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(batch, failed_index):
return len(batch)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
batch = list(range(N+3))
check('partial failure', solve(batch, N), N)
check('first item fails', solve(batch, 0), 0)
check('complete batch', solve(batch, None), len(batch))
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 |
|---|---|---|---|
| partial failure | 4 | 1 | Failed |
| first item fails | 4 | 0 | Failed |
| complete batch | 4 | 4 | Passed |
SHA-256 / d9ede88a8d0577ff115ee0f70a43b2ecf292de7d1384e1e00509e3009dc5e289
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(batch, failed_index):
return max(0, failed_index - 1) if failed_index is not None else len(batch)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
batch = list(range(N+3))
check('partial failure', solve(batch, N), N)
check('first item fails', solve(batch, 0), 0)
check('complete batch', solve(batch, None), len(batch))
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 |
|---|---|---|---|
| partial failure | 0 | 1 | Failed |
| first item fails | 0 | 0 | Passed |
| complete batch | 4 | 4 | Passed |
SHA-256 / 83d7aab3319be99157ac3205fc3c7dcc518346e1c053ef281ef6550d17d0c33f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(batch, failed_index):
return failed_index if failed_index is not None else len(batch)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
batch = list(range(N+3))
check('partial failure', solve(batch, N), N)
check('first item fails', solve(batch, 0), 0)
check('complete batch', solve(batch, None), len(batch))
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 |
|---|---|---|---|
| partial failure | 1 | 1 | Passed |
| first item fails | 0 | 0 | Passed |
| complete batch | 4 | 4 | Passed |
SHA-256 / 45d32b7705d943f0e4b3909406637ed3f4142e2196a470b1ae45686b3201de7d
Verification & scope
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:36:49.870403+00:00.
Case digest / 44398ab763239ec3caeec50546a53c44e613098bcb472e440de543474d9fd16e