FA-44696 / Data systems / Open access
A filtered update publishes insertion before retraction · case 01
A filtered update publishes insertion before retraction.
ROOT CAUSE
delta-filter-before-after: A filtered update publishes insertion before retraction.
THE FAILURE
delta-filter-before-after: A filtered update publishes insertion before retraction.
Unsuccessful approach: Globally grouping insertions first still breaks per-update before-after order.
Case contract
Convert a sequence of [id,before,after] updates into signed filtered rows, with None denoting absent row. The predicate is value>=cutoff. Emit qualifying before-images negatively before qualifying after-images positively; suppress unchanged qualifying values.
Why this case matters
A bounded deterministic data engine model makes representation and changelog faults reproducible.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
cutoff,updates=d
out=[]
for ident,before,after in updates:
old=before is not None and before>=cutoff
new=after is not None and after>=cutoff
if old and new and before==after: continue
if old: out.append([ident,before,-1])
if new: out.append([ident,after,1])
return list(reversed(out))
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('leaves filter', solve([1, [[7, 3, 0]]]), [[7, 3, -1]])
check('enters filter', solve([1, [[7, 0, 3]]]), [[7, 3, 1]])
check('changes within filter', solve([1, [[7, 2, 3]]]), [[7, 2, -1], [7, 3, 1]])
check('unchanged', solve([1, [[7, 1, 1]]]), [])
check('insert', solve([1, [[7, None, 2]]]), [[7, 2, 1]])
check('delete', solve([1, [[7, 2, None]]]), [[7, 2, -1]])
check('outside both', solve([1, [[7, -1, 0]]]), [])
check('no updates', solve([1, []]), [])
elif N == 2:
check('leaves filter', solve([2, [[7, 4, 1]]]), [[7, 4, -1]])
check('enters filter', solve([2, [[7, 1, 4]]]), [[7, 4, 1]])
check('changes within filter', solve([2, [[7, 3, 4]]]), [[7, 3, -1], [7, 4, 1]])
check('unchanged', solve([2, [[7, 2, 2]]]), [])
check('insert', solve([2, [[7, None, 3]]]), [[7, 3, 1]])
check('delete', solve([2, [[7, 3, None]]]), [[7, 3, -1]])
check('outside both', solve([2, [[7, 0, 1]]]), [])
check('no updates', solve([2, []]), [])
elif N == 3:
check('leaves filter', solve([3, [[7, 5, 2]]]), [[7, 5, -1]])
check('enters filter', solve([3, [[7, 2, 5]]]), [[7, 5, 1]])
check('changes within filter', solve([3, [[7, 4, 5]]]), [[7, 4, -1], [7, 5, 1]])
check('unchanged', solve([3, [[7, 3, 3]]]), [])
check('insert', solve([3, [[7, None, 4]]]), [[7, 4, 1]])
check('delete', solve([3, [[7, 4, None]]]), [[7, 4, -1]])
check('outside both', solve([3, [[7, 1, 2]]]), [])
check('no updates', solve([3, []]), [])
elif N == 4:
check('leaves filter', solve([4, [[7, 6, 3]]]), [[7, 6, -1]])
check('enters filter', solve([4, [[7, 3, 6]]]), [[7, 6, 1]])
check('changes within filter', solve([4, [[7, 5, 6]]]), [[7, 5, -1], [7, 6, 1]])
check('unchanged', solve([4, [[7, 4, 4]]]), [])
check('insert', solve([4, [[7, None, 5]]]), [[7, 5, 1]])
check('delete', solve([4, [[7, 5, None]]]), [[7, 5, -1]])
check('outside both', solve([4, [[7, 2, 3]]]), [])
check('no updates', solve([4, []]), [])
elif N == 5:
check('leaves filter', solve([5, [[7, 7, 4]]]), [[7, 7, -1]])
check('enters filter', solve([5, [[7, 4, 7]]]), [[7, 7, 1]])
check('changes within filter', solve([5, [[7, 6, 7]]]), [[7, 6, -1], [7, 7, 1]])
check('unchanged', solve([5, [[7, 5, 5]]]), [])
check('insert', solve([5, [[7, None, 6]]]), [[7, 6, 1]])
check('delete', solve([5, [[7, 6, None]]]), [[7, 6, -1]])
check('outside both', solve([5, [[7, 3, 4]]]), [])
check('no updates', solve([5, []]), [])
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 |
|---|---|---|---|
| leaves filter | [[7, 3, -1]] | [[7, 3, -1]] | Passed |
| enters filter | [[7, 3, 1]] | [[7, 3, 1]] | Passed |
| changes within filter | [[7, 3, 1], [7, 2, -1]] | [[7, 2, -1], [7, 3, 1]] | Failed |
| unchanged | [] | [] | Passed |
| insert | [[7, 2, 1]] | [[7, 2, 1]] | Passed |
| delete | [[7, 2, -1]] | [[7, 2, -1]] | Passed |
| outside both | [] | [] | Passed |
| no updates | [] | [] | Passed |
SHA-256 / 11c11e2432c34fd71269676ff8aefe24878ed7980dfe5634477dfbbf469ca31a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
cutoff,updates=d
out=[]
for ident,before,after in updates:
old=before is not None and before>=cutoff
new=after is not None and after>=cutoff
if old and new and before==after: continue
if old: out.append([ident,before,-1])
if new: out.append([ident,after,1])
return sorted(out,key=lambda r:-r[2])
except (IndexError, KeyError, ValueError, StopIteration) as exc:
return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('leaves filter', solve([1, [[7, 3, 0]]]), [[7, 3, -1]])
check('enters filter', solve([1, [[7, 0, 3]]]), [[7, 3, 1]])
check('changes within filter', solve([1, [[7, 2, 3]]]), [[7, 2, -1], [7, 3, 1]])
check('unchanged', solve([1, [[7, 1, 1]]]), [])
check('insert', solve([1, [[7, None, 2]]]), [[7, 2, 1]])
check('delete', solve([1, [[7, 2, None]]]), [[7, 2, -1]])
check('outside both', solve([1, [[7, -1, 0]]]), [])
check('no updates', solve([1, []]), [])
elif N == 2:
check('leaves filter', solve([2, [[7, 4, 1]]]), [[7, 4, -1]])
check('enters filter', solve([2, [[7, 1, 4]]]), [[7, 4, 1]])
check('changes within filter', solve([2, [[7, 3, 4]]]), [[7, 3, -1], [7, 4, 1]])
check('unchanged', solve([2, [[7, 2, 2]]]), [])
check('insert', solve([2, [[7, None, 3]]]), [[7, 3, 1]])
check('delete', solve([2, [[7, 3, None]]]), [[7, 3, -1]])
check('outside both', solve([2, [[7, 0, 1]]]), [])
check('no updates', solve([2, []]), [])
elif N == 3:
check('leaves filter', solve([3, [[7, 5, 2]]]), [[7, 5, -1]])
check('enters filter', solve([3, [[7, 2, 5]]]), [[7, 5, 1]])
check('changes within filter', solve([3, [[7, 4, 5]]]), [[7, 4, -1], [7, 5, 1]])
check('unchanged', solve([3, [[7, 3, 3]]]), [])
check('insert', solve([3, [[7, None, 4]]]), [[7, 4, 1]])
check('delete', solve([3, [[7, 4, None]]]), [[7, 4, -1]])
check('outside both', solve([3, [[7, 1, 2]]]), [])
check('no updates', solve([3, []]), [])
elif N == 4:
check('leaves filter', solve([4, [[7, 6, 3]]]), [[7, 6, -1]])
check('enters filter', solve([4, [[7, 3, 6]]]), [[7, 6, 1]])
check('changes within filter', solve([4, [[7, 5, 6]]]), [[7, 5, -1], [7, 6, 1]])
check('unchanged', solve([4, [[7, 4, 4]]]), [])
check('insert', solve([4, [[7, None, 5]]]), [[7, 5, 1]])
check('delete', solve([4, [[7, 5, None]]]), [[7, 5, -1]])
check('outside both', solve([4, [[7, 2, 3]]]), [])
check('no updates', solve([4, []]), [])
elif N == 5:
check('leaves filter', solve([5, [[7, 7, 4]]]), [[7, 7, -1]])
check('enters filter', solve([5, [[7, 4, 7]]]), [[7, 7, 1]])
check('changes within filter', solve([5, [[7, 6, 7]]]), [[7, 6, -1], [7, 7, 1]])
check('unchanged', solve([5, [[7, 5, 5]]]), [])
check('insert', solve([5, [[7, None, 6]]]), [[7, 6, 1]])
check('delete', solve([5, [[7, 6, None]]]), [[7, 6, -1]])
check('outside both', solve([5, [[7, 3, 4]]]), [])
check('no updates', solve([5, []]), [])
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 |
|---|---|---|---|
| leaves filter | [[7, 3, -1]] | [[7, 3, -1]] | Passed |
| enters filter | [[7, 3, 1]] | [[7, 3, 1]] | Passed |
| changes within filter | [[7, 3, 1], [7, 2, -1]] | [[7, 2, -1], [7, 3, 1]] | Failed |
| unchanged | [] | [] | Passed |
| insert | [[7, 2, 1]] | [[7, 2, 1]] | Passed |
| delete | [[7, 2, -1]] | [[7, 2, -1]] | Passed |
| outside both | [] | [] | Passed |
| no updates | [] | [] | Passed |
SHA-256 / 9a227737dc6e38765b059628cd068c5b26c64e34ff195ca77480c31326e7cd1b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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 stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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:14.755280+00:00.
Case digest / 3a750ffd477dd1d7ca1c9cc9cf180f9af523c30b73782ff20b760fc50c998f9f